Platitun · API · Listings · Mark a listing as test
Mark a listing as test
POST /api/v1/listings/{number}/testKey scope: listings · changes data, the Idempotency-Key header is required
A test listing can only be bought by a test buyer, and a regular buyer cannot buy it at all. Turning it back into a real one is possible only if the seller’s admission is complete: otherwise the storefront would show goods from a seller without documents.
Request fields
| Field | Type | What it is |
|---|---|---|
isTest required | boolean | true — make it a test one, false — turn it back to real. |
Response fields
| Field | Type | What it is |
|---|---|---|
isTest | boolean | The state after the action. |
Refusal reasons
A rule refusal arrives as {"error":"rejected","refusal":{"kind":"…"}} with status 409. Refusals common to all endpoints are in the rules section.
| Code | What happened and what to do |
|---|---|
not_found | The record does not exist or is not yours. The ownership condition is in the database query itself, so someone else’s record looks like a missing one. |
test_to_real_needs_papers | A test listing can become a real one only when your seller admission is complete: otherwise the storefront would show goods from a seller without documents. |
bad_request | The request is malformed: a required field is missing or a value is of the wrong kind. The specifics are in the detail field. |
Nearby in this section
GET /api/v1/listings— My listingsPOST /api/v1/listings— Create a listingGET /api/v1/listings/{number}— One of my listingsPATCH /api/v1/listings/{number}— Update a listingDELETE /api/v1/listings/{number}— Remove a listingPOST /api/v1/listings/{number}/state— Switch on, switch off, auto-deliveryPOST /api/v1/listings/{number}/copy— Copy a listingPUT /api/v1/listings/{number}/image— The listing imageDELETE /api/v1/listings/{number}/image— Remove the imageGET /api/v1/questions— Questions about my listingsPOST /api/v1/questions/{id}/answer— Answer a question