Skip to content

Order copy

Request

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 items
  • no-billing-shipping - copy the order without billing and shipping items
  • contact-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
Path
codestringrequired
Example:2018000012
Query
includestring

optional parts of response

Example:include=notes,images,shippingDetails,stockLocation,productFlags
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobjectrequired
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"
    }
  }'

Responses

Created

Bodyapplication/json
dataobjectrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": { "order": {} }, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }