Salta ai contenuti

Create order from legacy payload shape (V4 endpoint)

POST
/v4/order-import/{apiChannelKey}
curl --request POST \
--url https://api-crm-staging.divinea.com/api/v4/order-import/example \
--header 'APIKey: <APIKey>' \
--header 'Content-Type: application/json' \
--data '{ "address": "example", "addressName": "example", "amountCents": 1, "amountDiscountCents": 1, "amountExciseDutyCents": 1, "amountShipmentCents": 1, "amountVatCents": 1, "amountVatPercentage": 1, "buyerEmail": "example", "buyerFirstname": "example", "buyerLastname": "example", "buyerPhone": "example", "city": "example", "countryIso": "example", "date": "2026-04-15", "extraMetadata": {}, "id": "example", "items": [ { "amountCents": 1, "amountDiscountCents": 1, "attributesSnapshot": {}, "commercialDiscounts": {}, "discounts": {}, "externalId": "example", "extraMetadata": {}, "name": "example", "pricingBreakdown": {}, "quantity": 1, "sku": "example", "type": "example", "unitPriceCents": 1, "vatPercentage": 1 } ], "marketingManual": true, "notes": "example", "paymentMethod": "example", "province": "example", "quantity": 1, "region": "example", "schemaVersion": "example", "sourceExternal": { "id": "example", "type": "example" }, "sourceSyncedAt": "2026-04-15T12:00:00Z", "status": "example", "totals": { "discountCents": 1, "discounts": {}, "extraMetadata": {}, "shipmentCents": 1, "subtotalCents": 1, "taxCents": 1, "totalCents": 1 }, "userMetadata": {}, "zipcode": "example" }'

Supports optional Idempotency-Key header. Terminal context must use sourceExternal.type/sourceExternal.id (no terminal_id column).

apiChannelKey
required
string

ApiChannelKey

Idempotency-Key
string

Idempotency-Key

Request

Media typeapplication/json
RequestExternalOrder
object
address
string
addressName
string
amountCents
integer format: int64
amountDiscountCents
integer format: int64
amountExciseDutyCents
integer format: int32
amountShipmentCents
integer format: int64
amountVatCents
integer format: int32
amountVatPercentage
number format: double
buyerEmail
string
buyerFirstname
string
buyerLastname
string
buyerPhone
string
city
string
countryIso
string
date
string format: date
extraMetadata
object
id
string
items
Array<object>
Item
object
amountCents
integer format: int64
amountDiscountCents
integer format: int64
attributesSnapshot
object
commercialDiscounts
object
discounts
object
externalId
string
extraMetadata
object
name
string
pricingBreakdown
object
quantity
integer format: int64
sku
string
type
string
unitPriceCents
integer format: int32
vatPercentage
integer format: int32
marketingManual
boolean
notes
string
paymentMethod
string
province
string
quantity
integer format: int64
region
string
schemaVersion
string
sourceExternal
SourceExternal
object
id
string
type
string
sourceSyncedAt
string format: date-time
status
string
totals
Totals
object
discountCents
integer format: int32
discounts
object
extraMetadata
object
shipmentCents
integer format: int32
subtotalCents
integer format: int32
taxCents
integer format: int32
totalCents
integer format: int32
userMetadata
object
zipcode
string
Examplegenerated
{
"address": "example",
"addressName": "example",
"amountCents": 1,
"amountDiscountCents": 1,
"amountExciseDutyCents": 1,
"amountShipmentCents": 1,
"amountVatCents": 1,
"amountVatPercentage": 1,
"buyerEmail": "example",
"buyerFirstname": "example",
"buyerLastname": "example",
"buyerPhone": "example",
"city": "example",
"countryIso": "example",
"date": "2026-04-15",
"extraMetadata": {},
"id": "example",
"items": [
{
"amountCents": 1,
"amountDiscountCents": 1,
"attributesSnapshot": {},
"commercialDiscounts": {},
"discounts": {},
"externalId": "example",
"extraMetadata": {},
"name": "example",
"pricingBreakdown": {},
"quantity": 1,
"sku": "example",
"type": "example",
"unitPriceCents": 1,
"vatPercentage": 1
}
],
"marketingManual": true,
"notes": "example",
"paymentMethod": "example",
"province": "example",
"quantity": 1,
"region": "example",
"schemaVersion": "example",
"sourceExternal": {
"id": "example",
"type": "example"
},
"sourceSyncedAt": "2026-04-15T12:00:00Z",
"status": "example",
"totals": {
"discountCents": 1,
"discounts": {},
"extraMetadata": {},
"shipmentCents": 1,
"subtotalCents": 1,
"taxCents": 1,
"totalCents": 1
},
"userMetadata": {},
"zipcode": "example"
}

OK

Media type*/*
object