Platitun · API · Listings · Copy a listing
Copy a listing
POST /api/v1/listings/{number}/copyKey scope: listings · changes data, the Idempotency-Key header is required
A new listing with all the fields of the old one. The copy is born SWITCHED OFF and the stock is NOT copied: stock units are goods, not settings, and one unit cannot be sold twice.
Response fields
| Field | Type | What it is |
|---|---|---|
number | integer | The copy’s number. |
isActive | boolean | Always false. |
stockCopied | boolean | Always false — not an omission but a rule. |
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. |
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}/test— Mark a listing as testPUT /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