commerce

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-commerce"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/a95d6f25-c648-492d-bcb5-a74907109222/social-card.svg?v=3e7ae33eec8b" alt="commerce" width="600" height="315"></a>
PUThttps://hermeticor.com/v1/commerce/stores/{storeId}/orders/{id}

Create or replace the order under the store's own order id

Parameters

storeIdstringpathrequired
idstringpathrequired

Request body

application/json
emailstring
profileIdstring
statusstring
pending | paid | shipped | cancelled | refunded = paid
currencystringrequired
totalMinorinteger
discountMinorinteger
= 0
taxMinorinteger
= 0
shippingMinorinteger
= 0
promoCodestring
promoPoolIdstring
campaignIdstring
conversionSourcestring
trackingUrlstring
placedAtstring
landingPageIdstring
adRefstring
clickIdstring
utmobject
shippingAddressobject
Show child parameters
namestring
address1string
address2string
citystring
provincestring
provinceCodestring
postalCodestring
countrystring
countryCodestring
phonestring
companystring
billingAddressobject
Show child parameters
namestring
address1string
address2string
citystring
provincestring
provinceCodestring
postalCodestring
countrystring
countryCodestring
phonestring
companystring
orderUrlstring
financialStatusstring
fulfillmentStatusstring
linesLinesItem[]
= []
Show child parameters
idstringrequired
productIdstring
variantIdstring
titlestring
quantityinteger
= 1
priceMinorinteger
= 0
discountMinorinteger
= 0
{
  "email": "string",
  "profileId": "string",
  "status": "paid",
  "currency": "string",
  "totalMinor": 0,
  "discountMinor": 0,
  "taxMinor": 0,
  "shippingMinor": 0,
  "promoCode": "string",
  "promoPoolId": "string",
  "campaignId": "string",
  "conversionSource": "string",
  "trackingUrl": "string",
  "placedAt": "2024-01-01T00:00:00Z",
  "landingPageId": "string",
  "adRef": "string",
  "clickId": "string",
  "utm": {},
  "shippingAddress": {
    "name": "string",
    "address1": "string",
    "address2": "string",
    "city": "string",
    "province": "string",
    "provinceCode": "string",
    "postalCode": "string",
    "country": "string",
    "countryCode": "string",
    "phone": "string",
    "company": "string"
  },
  "billingAddress": {
    "name": "string",
    "address1": "string",
    "address2": "string",
    "city": "string",
    "province": "string",
    "provinceCode": "string",
    "postalCode": "string",
    "country": "string",
    "countryCode": "string",
    "phone": "string",
    "company": "string"
  },
  "orderUrl": "string",
  "financialStatus": "string",
  "fulfillmentStatus": "string",
  "lines": []
}

Code samples

cURL
curl -X PUT "https://hermeticor.com/v1/commerce/stores/{storeId}/orders/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"string","profileId":"string","status":"paid","currency":"string","totalMinor":0,"discountMinor":0,"taxMinor":0,"shippingMinor":0,"promoCode":"string","promoPoolId":"string","campaignId":"string","conversionSource":"string","trackingUrl":"string","placedAt":"2024-01-01T00:00:00Z","landingPageId":"string","adRef":"string","clickId":"string","utm":{},"shippingAddress":{"name":"string","address1":"string","address2":"string","city":"string","province":"string","provinceCode":"string","postalCode":"string","country":"string","countryCode":"string","phone":"string","company":"string"},"billingAddress":{"name":"string","address1":"string","address2":"string","city":"string","province":"string","provinceCode":"string","postalCode":"string","country":"string","countryCode":"string","phone":"string","company":"string"},"orderUrl":"string","financialStatus":"string","fulfillmentStatus":"string","lines":[]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "storeId": "string",
  "externalId": "string",
  "profileId": "string",
  "email": "string",
  "status": "pending",
  "currency": "string",
  "totalMinor": 0,
  "discountMinor": 0,
  "taxMinor": 0,
  "shippingMinor": 0,
  "refundedMinor": 0,
  "promoCode": "string",
  "promoPoolId": "string",
  "campaignId": "string",
  "conversionSource": "string",
  "trackingUrl": "string",
  "placedAt": "2024-01-01T00:00:00Z",
  "landingPageId": "string",
  "adRef": "string",
  "clickId": "string",
  "utm": {},
  "shippingAddress": {},
  "billingAddress": {},
  "orderUrl": "string",
  "financialStatus": "string",
  "fulfillmentStatus": "string",
  "shippedAt": "2024-01-01T00:00:00Z",
  "lines": [
    {
      "id": "string",
      "externalId": "string",
      "productId": "string",
      "variantId": "string",
      "title": "string",
      "quantity": 0,
      "priceMinor": 0,
      "discountMinor": 0
    }
  ]
}
Schema
idstringrequired
storeIdstringrequired
externalIdstringrequired
profileIdstringrequired
emailstringrequired
statusstringrequired
pending | paid | shipped | cancelled | refunded
currencystringrequired
totalMinorintegerrequired
discountMinorintegerrequired
taxMinorintegerrequired
shippingMinorintegerrequired
refundedMinorintegerrequired
promoCodestringrequired
promoPoolIdstringrequired
campaignIdstringrequired
conversionSourcestringrequired
trackingUrlstringrequired
placedAtstringrequired
landingPageIdstringrequired
adRefstringrequired
clickIdstringrequired
utmobjectrequired
shippingAddressobjectrequired
billingAddressobjectrequired
orderUrlstringrequired
financialStatusstringrequired
fulfillmentStatusstringrequired
shippedAtstringrequired
linesLinesItem2[]required
Show child parameters
idstringrequired
externalIdstringrequired
productIdstringrequired
variantIdstringrequired
titlestringrequired
quantityintegerrequired
priceMinorintegerrequired
discountMinorintegerrequired
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
DELETEhttps://hermeticor.com/v1/commerce/stores/{storeId}/orders/{id}

Parameters

storeIdstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://hermeticor.com/v1/commerce/stores/{storeId}/orders/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "ok": true
}
Schema
okbooleanrequired
true
PATCHhttps://hermeticor.com/v1/commerce/stores/{storeId}/orders/{id}

Parameters

storeIdstringpathrequired
idstringpathrequired

Request body

application/json
statusstring
pending | paid | shipped | cancelled | refunded
refundedMinorinteger
trackingUrlstring
promoCodestring
promoPoolIdstring
campaignIdstring
conversionSourcestring
landingPageIdstring
adRefstring
clickIdstring
utmobject
shippingAddressobject
Show child parameters
namestring
address1string
address2string
citystring
provincestring
provinceCodestring
postalCodestring
countrystring
countryCodestring
phonestring
companystring
billingAddressobject
Show child parameters
namestring
address1string
address2string
citystring
provincestring
provinceCodestring
postalCodestring
countrystring
countryCodestring
phonestring
companystring
orderUrlstring
financialStatusstring
fulfillmentStatusstring
{
  "status": "pending",
  "refundedMinor": 0,
  "trackingUrl": "string",
  "promoCode": "string",
  "promoPoolId": "string",
  "campaignId": "string",
  "conversionSource": "string",
  "landingPageId": "string",
  "adRef": "string",
  "clickId": "string",
  "utm": {},
  "shippingAddress": {
    "name": "string",
    "address1": "string",
    "address2": "string",
    "city": "string",
    "province": "string",
    "provinceCode": "string",
    "postalCode": "string",
    "country": "string",
    "countryCode": "string",
    "phone": "string",
    "company": "string"
  },
  "billingAddress": {
    "name": "string",
    "address1": "string",
    "address2": "string",
    "city": "string",
    "province": "string",
    "provinceCode": "string",
    "postalCode": "string",
    "country": "string",
    "countryCode": "string",
    "phone": "string",
    "company": "string"
  },
  "orderUrl": "string",
  "financialStatus": "string",
  "fulfillmentStatus": "string"
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/commerce/stores/{storeId}/orders/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"pending","refundedMinor":0,"trackingUrl":"string","promoCode":"string","promoPoolId":"string","campaignId":"string","conversionSource":"string","landingPageId":"string","adRef":"string","clickId":"string","utm":{},"shippingAddress":{"name":"string","address1":"string","address2":"string","city":"string","province":"string","provinceCode":"string","postalCode":"string","country":"string","countryCode":"string","phone":"string","company":"string"},"billingAddress":{"name":"string","address1":"string","address2":"string","city":"string","province":"string","provinceCode":"string","postalCode":"string","country":"string","countryCode":"string","phone":"string","company":"string"},"orderUrl":"string","financialStatus":"string","fulfillmentStatus":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

GEThttps://hermeticor.com/v1/commerce/stores/{storeId}/orders/{id}/lines

Parameters

limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page
storeIdstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/commerce/stores/{storeId}/orders/{id}/lines" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "externalId": "string",
      "productId": "string",
      "variantId": "string",
      "title": "string",
      "quantity": 0,
      "priceMinor": 0,
      "discountMinor": 0
    }
  ],
  "nextCursor": "string"
}
Schema
itemsLinesItem2[]required
Show child parameters
idstringrequired
externalIdstringrequired
productIdstringrequired
variantIdstringrequired
titlestringrequired
quantityintegerrequired
priceMinorintegerrequired
discountMinorintegerrequired
nextCursorstringrequired

Updated