Consulter les sous-vendeurs enregistrés dans la marketplace
Ajoutons maintenant /sellers à l'url précédente pour examiner les sous-vendeurs de la marketplace:.
Exemple de requête
GET https://secure.lyra.com/marketplace/v1/marketplaces/57595c55-b096-41d8-9287-b98640de3f25/sellers
Exemple de réponse
{ "count": 6, "next": "https://secure.lyra.com/marketplace-test/v1/marketplaces/57595c55-b096-41d8-9287-b98640de3f25/sellers?page=2", "previous": null, "results": [ { "uuid": "881ad090-e666-4d38-a4e2-399597938204", "external_ref": null, "href": "https://secure.lyra.com/marketplace-test/v1/sellers/881ad090-e666-4d38-a4e2-399597938204", "created_at": "2021-06-01T09:15:43.233105Z", "updated_at": "2021-06-30T13:12:22.015935Z", "marketplace": "57595c55-b096-41d8-9287-b98640de3f25", "reference": "SL641141", "description": "Chez Mimi", "bic": "", "iban": "", "status": "ACTIVE", "cashout_delay": 1, "is_marketplace_seller": false, "links": { "items": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/881ad090-e666-4d38-a4e2-399597938204/items" }, "transfers": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/881ad090-e666-4d38-a4e2-399597938204/transfers" } }, "vouchers": [ { "contract_type": "CONECS", "contract_number": "2222222" } ] }, { "uuid": "cb4ae0c3-1ecf-4e28-add4-0db75b129324", "external_ref": null, "href": "https://secure.lyra.com/marketplace-test/v1/sellers/cb4ae0c3-1ecf-4e28-add4-0db75b129324", "created_at": "2021-06-01T09:15:43.218895Z", "updated_at": "2021-06-24T10:00:40.037762Z", "marketplace": "57595c55-b096-41d8-9287-b98640de3f25", "reference": "SL498459", "description": "Chef Martin", "bic": "", "iban": "", "status": "ACTIVE", "cashout_delay": 1, "is_marketplace_seller": false, "links": { "items": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/cb4ae0c3-1ecf-4e28-add4-0db75b129324/items" }, "transfers": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/cb4ae0c3-1ecf-4e28-add4-0db75b129324/transfers" } }, "vouchers": [] }, { "uuid": "a7dfdb01-bf23-4980-adc6-34c17ed3f887", "external_ref": null, "href": "https://secure.lyra.com/marketplace-test/v1/sellers/a7dfdb01-bf23-4980-adc6-34c17ed3f887", "created_at": "2021-06-01T09:15:43.201011Z", "updated_at": "2021-06-01T09:15:43.213411Z", "marketplace": "57595c55-b096-41d8-9287-b98640de3f25", "reference": "SL271155", "description": "Tout pour la cuisine", "bic": "", "iban": "", "status": "ACTIVE", "cashout_delay": 1, "is_marketplace_seller": false, "links": { "items": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/a7dfdb01-bf23-4980-adc6-34c17ed3f887/items" }, "transfers": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/a7dfdb01-bf23-4980-adc6-34c17ed3f887/transfers" } }, "vouchers": [] }, { "uuid": "975b7c49-0e8e-4291-8d25-e50744718fc1", "external_ref": null, "href": "https://secure.lyra.com/marketplace-test/v1/sellers/975b7c49-0e8e-4291-8d25-e50744718fc1", "created_at": "2021-06-01T08:30:41.898179Z", "updated_at": "2021-06-30T13:41:30.475289Z", "marketplace": "57595c55-b096-41d8-9287-b98640de3f25", "reference": "SL922137", "description": "Les délices d'Antan", "bic": "", "iban": "", "status": "ACTIVE", "cashout_delay": 1, "is_marketplace_seller": false, "links": { "items": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/975b7c49-0e8e-4291-8d25-e50744718fc1/items" }, "transfers": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/975b7c49-0e8e-4291-8d25-e50744718fc1/transfers" } }, "vouchers": [ { "contract_type": "CONECS", "contract_number": "2222223" } ] }, { "uuid": "bb89cdf6-33e5-4d71-a364-051436c4272b", "external_ref": null, "href": "https://secure.lyra.com/marketplace-test/v1/sellers/bb89cdf6-33e5-4d71-a364-051436c4272b", "created_at": "2021-06-01T07:45:31.885870Z", "updated_at": "2021-06-01T07:45:31.895917Z", "marketplace": "57595c55-b096-41d8-9287-b98640de3f25", "reference": "SL818678", "description": "Saveurs de l'Est", "bic": "", "iban": "", "status": "INACTIVE", "cashout_delay": 1, "is_marketplace_seller": false, "links": { "items": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/bb89cdf6-33e5-4d71-a364-051436c4272b/items" }, "transfers": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/bb89cdf6-33e5-4d71-a364-051436c4272b/transfers" } }, "vouchers": [] } ] }
Dans cet exemple, la marketplace compte actuellement 6 vendeurs; et l'un deux, "Saveur de l'Est" est inactif. Par ailleurs, deux d'entre eux - "Chez Mimi" et "Les délices d'Antan" - peuvent proposer le mode de paiement CONECS, car le numéro de contrat acquéreur correspondant est bien enregistré.
Autre point important, les valeurs "is_seller_marketplace": false indiquent que les 5 objets retournés sont des sous-vendeurs, et non l'opérateur marketplace.
En effet, l'opérateur marketplace peut aussi proposer de la vente en propre. Il est donc lui aussi systématiquement enregistré en tant que seller, au côté de ses sous-vendeurs. A la différence qu'il est le seul à avoir "is_seller_marketplace": true comme nous le voyons en consultant la page suivante.
{ "count": 6, "next": null, "previous": "https://secure.lyra.com/marketplace-test/v1/marketplaces/57595c55-b096-41d8-9287-b98640de3f25/sellers", "results": [ { "uuid": "52bc75e6-0bfa-4ccb-a35e-0c6e2d3dea36", "external_ref": "", "href": "https://secure.lyra.com/marketplace-test/v1/sellers/52bc75e6-0bfa-4ccb-a35e-0c6e2d3dea36", "created_at": "2021-06-01T07:45:31.801669Z", "updated_at": "2021-06-24T12:30:37.862466Z", "marketplace": "57595c55-b096-41d8-9287-b98640de3f25", "reference": "MK271205", "description": "PLAYGROUND - LA MAISON DU CHEESECAKE", "bic": "", "iban": "", "status": "ACTIVE", "cashout_delay": 0, "is_marketplace_seller": true, "links": { "items": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/52bc75e6-0bfa-4ccb-a35e-0c6e2d3dea36/items" }, "transfers": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/52bc75e6-0bfa-4ccb-a35e-0c6e2d3dea36/transfers" } }, "vouchers": [] } ] }
<p class="p"/>
<p class="p">Bien sûr, il est aussi possible d'appeler le détails des sous-vendeurs directement, par la
requête.</p>
Exemple de requête :
GET https://secure.lyra.com/marketplace-test/v1/sellers/v1/a7dfdb01-bf23-4980-adc6-34c17ed3f887
<p class="p"/>
<p class="p">Exemple de réponse :</p>
{ "uuid": "a7dfdb01-bf23-4980-adc6-34c17ed3f887", "external_ref": null, "href": "https://secure.lyra.com/marketplace-test/v1/sellers/a7dfdb01-bf23-4980-adc6-34c17ed3f887", "created_at": "2021-06-01T09:15:43.201011Z", "updated_at": "2021-06-01T09:15:43.213411Z", "marketplace": "57595c55-b096-41d8-9287-b98640de3f25", "reference": "SL271155", "description": "Tout pour la cuisine", "bic": "", "iban": "", "status": "ACTIVE", "cashout_delay": 1, "is_marketplace_seller": false, "links": { "items": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/a7dfdb01-bf23-4980-adc6-34c17ed3f887/items" }, "transfers": { "href": "https://secure.lyra.com/marketplace-test/v1/sellers/a7dfdb01-bf23-4980-adc6-34c17ed3f887/transfers" } }, "vouchers": [] }
<p class="lines" id="hxj1531405389108__lines_ymc_2jf_tvb"/>