This endpoint allows you to copy a order identified by its code.
You can choose scope in which will be the order copied. The scope can be
all- copy the order with all its itemsno-billing-shipping- copy the order without billing and shipping itemscontact-only- copy the order without any items
Please note, that copy order creates stock demand (if stock module is active and negative stock amount is not allowed) and if this demand overflows the stock, the order will be fully created with error order-duplication-stock-overflow.
You can use include parameter to include additional parts of response, same as in GET order detail, to retrieve more information about the copied order in copy response.
Security
shoptetAccessToken or shoptetPrivateApiToken
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/orders/{code}/copy
- https://api.myshoptet.comhttps://api.myshoptet.com/api/orders/{code}/copy
- shoptetAccessToken
- shoptetPrivateApiToken
curl -i -X POST \
'https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/orders/2018000012/copy?include=notes%2Cimages%2CshippingDetails%2CstockLocation%2CproductFlags' \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"data": {
"scope": "all"
}
}'Response
{ "data": { "order": { … } }, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }