{
  "info": {
    "name": "Cartenvo Integration Hub sync API",
    "description": "The calls an ERP, warehouse or automation tool needs to stay in sync with a nopCommerce store: what changed, orders, products, customers, bulk stock and prices, statuses, shipments, ERP numbers and webhook registration. Keys are made in admin under Configuration → Integration Hub → API keys; each operation's x-scope names the scope it needs. JSON uses camelCase, dates are UTC, and amounts are in the store's primary currency.\n\nSet **baseUrl** (your store, ending in /api/cartenvo/v1) and **apiKey** (cih_…) in the collection's variables. Stock and price examples are dry runs.\n\nBuilt from openapi.json 1.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://shop.example.com/api/cartenvo/v1",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "cih_…",
      "type": "secret"
    }
  ],
  "item": [
    {
      "name": "Keys",
      "item": [
        {
          "name": "The key that is calling",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "me"
              ],
              "query": [],
              "variable": []
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Changes",
      "item": [
        {
          "name": "What changed since the last call",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/changes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "changes"
              ],
              "query": [
                {
                  "key": "since",
                  "value": "latest",
                  "description": "A cursor, \"latest\", or empty.",
                  "disabled": false
                },
                {
                  "key": "types",
                  "value": "",
                  "description": "Comma-separated: order, product, stock, customer. Default all.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "50",
                  "disabled": false
                }
              ],
              "variable": []
            },
            "description": "Pass the cursor from the previous answer as since. An empty since starts at the beginning; since=latest returns no items and the newest cursor, to start from now. Changes are recorded while any enabled key has changes:read. Changes from the last 2 seconds wait for the next call.\n\nScope: `changes:read`"
          }
        }
      ]
    },
    {
      "name": "Orders",
      "item": [
        {
          "name": "List orders, oldest first",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "description": "Pending, Processing, Complete or Cancelled.",
                  "disabled": true
                },
                {
                  "key": "paymentStatus",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "shippingStatus",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "createdSince",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "paidSince",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "externalSystem",
                  "value": "",
                  "description": "With externalReference: find by a number in another system.",
                  "disabled": true
                },
                {
                  "key": "externalReference",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "afterId",
                  "value": "",
                  "description": "The nextAfterId of the previous page.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "50",
                  "disabled": false
                }
              ],
              "variable": []
            },
            "description": "Scope: `orders:read`"
          }
        },
        {
          "name": "Get an order",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/orders/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                }
              ]
            },
            "description": "Scope: `orders:read`"
          }
        },
        {
          "name": "Set the order or payment status",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:id/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":id",
                "status"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                }
              ]
            },
            "description": "Through nopCommerce's order processing: Cancelled returns stock; Paid, Refunded (offline, whole order) and Voided follow the payment rules. Shipping status follows shipments. Answers with the order.\n\nScope: `orders:write`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"orderStatus\": \"Processing\",\n  \"notifyCustomer\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Add a shipment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:id/shipments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":id",
                "shipments"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                }
              ]
            },
            "description": "As admin's Add shipment, optionally shipped (or ready for pickup) and delivered at once, with nopCommerce's emails.\n\nScope: `orders:write`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"trackingNumber\": \"1Z999AA10123456784\",\n  \"ship\": true,\n  \"notifyCustomer\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Add an order note",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:id/notes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":id",
                "notes"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                }
              ]
            },
            "description": "Scope: `orders:write`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"note\": \"Invoice INV-0042 created in the ERP.\",\n  \"displayToCustomer\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a shipment",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/shipments/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "shipments",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                }
              ]
            },
            "description": "Scope: `orders:read`"
          }
        },
        {
          "name": "Set tracking, or mark shipped or delivered",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/shipments/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "shipments",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                }
              ]
            },
            "description": "Scope: `orders:write`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"trackingNumber\": \"1Z999AA10123456784\",\n  \"deliver\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Catalog",
      "item": [
        {
          "name": "List products, oldest first",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products"
              ],
              "query": [
                {
                  "key": "sku",
                  "value": "",
                  "description": "A product's or a combination's SKU.",
                  "disabled": true
                },
                {
                  "key": "updatedSince",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "includeDeleted",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "externalSystem",
                  "value": "",
                  "description": "With externalReference: find by a number in another system.",
                  "disabled": true
                },
                {
                  "key": "externalReference",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "afterId",
                  "value": "",
                  "description": "The nextAfterId of the previous page.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "50",
                  "disabled": false
                }
              ],
              "variable": []
            },
            "description": "Scope: `catalog:read`"
          }
        },
        {
          "name": "Get a product with its combinations",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/products/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                }
              ]
            },
            "description": "Scope: `catalog:read`"
          }
        },
        {
          "name": "Set stock by SKU, up to 1,000 lines",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/stock",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "stock"
              ],
              "query": [
                {
                  "key": "dryRun",
                  "value": "",
                  "description": "Check and report without changing anything. Same as \"dryRun\": true in the body.",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Each line is applied on its own and reported. Uses nopCommerce's stock history and back-in-stock emails, as the product page in admin does.\n\nScope: `stock:write`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"lines\": [\n    {\n      \"sku\": \"TSHIRT-RED-L\",\n      \"quantity\": 25\n    },\n    {\n      \"sku\": \"MUG-01\",\n      \"adjustment\": -3\n    }\n  ],\n  \"dryRun\": true,\n  \"reason\": \"ERP sync\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Set prices, old prices and costs by SKU, up to 1,000 lines",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/prices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "prices"
              ],
              "query": [
                {
                  "key": "dryRun",
                  "value": "",
                  "description": "Check and report without changing anything. Same as \"dryRun\": true in the body.",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `prices:write`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"lines\": [\n    {\n      \"sku\": \"TSHIRT-RED-L\",\n      \"price\": 19.9,\n      \"oldPrice\": 24.9\n    }\n  ],\n  \"dryRun\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Customers",
      "item": [
        {
          "name": "List registered customers, oldest first",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/customers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "customers"
              ],
              "query": [
                {
                  "key": "email",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "createdSince",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "externalSystem",
                  "value": "",
                  "description": "With externalReference: find by a number in another system.",
                  "disabled": true
                },
                {
                  "key": "externalReference",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "afterId",
                  "value": "",
                  "description": "The nextAfterId of the previous page.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "50",
                  "disabled": false
                }
              ],
              "variable": []
            },
            "description": "Scope: `customers:read`"
          }
        },
        {
          "name": "Get a customer",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/customers/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "customers",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                }
              ]
            },
            "description": "Scope: `customers:read`"
          }
        }
      ]
    },
    {
      "name": "References",
      "item": [
        {
          "name": "Save a order's number in another system",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:id/external-references/:system",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":id",
                "external-references",
                ":system"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                },
                {
                  "key": "system",
                  "value": "odoo"
                }
              ]
            },
            "description": "Scope: `references:write`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"SO0042\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Remove a order's number in another system",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:id/external-references/:system",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":id",
                "external-references",
                ":system"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                },
                {
                  "key": "system",
                  "value": "odoo"
                }
              ]
            },
            "description": "Scope: `references:write`"
          }
        },
        {
          "name": "Save a product's number in another system",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/products/:id/external-references/:system",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products",
                ":id",
                "external-references",
                ":system"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                },
                {
                  "key": "system",
                  "value": "odoo"
                }
              ]
            },
            "description": "Scope: `references:write`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"PRD-00017\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Remove a product's number in another system",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/products/:id/external-references/:system",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products",
                ":id",
                "external-references",
                ":system"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                },
                {
                  "key": "system",
                  "value": "odoo"
                }
              ]
            },
            "description": "Scope: `references:write`"
          }
        },
        {
          "name": "Save a customer's number in another system",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/customers/:id/external-references/:system",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "customers",
                ":id",
                "external-references",
                ":system"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                },
                {
                  "key": "system",
                  "value": "odoo"
                }
              ]
            },
            "description": "Scope: `references:write`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"CUST-0099\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Remove a customer's number in another system",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/customers/:id/external-references/:system",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "customers",
                ":id",
                "external-references",
                ":system"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                },
                {
                  "key": "system",
                  "value": "odoo"
                }
              ]
            },
            "description": "Scope: `references:write`"
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "The events a webhook can receive",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/webhooks/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                "events"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `webhooks:manage`"
          }
        },
        {
          "name": "The webhooks this key registered",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/webhooks/targets",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                "targets"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `webhooks:manage`"
          }
        },
        {
          "name": "Register a webhook",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/targets",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                "targets"
              ],
              "query": [],
              "variable": []
            },
            "description": "For Zapier, Make and n8n instant triggers. The answer has the signing secret, once.\n\nScope: `webhooks:manage`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"My automation\",\n  \"url\": \"https://hooks.example.com/abc123\",\n  \"events\": [\n    \"order.paid\"\n  ],\n  \"format\": \"full\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Remove a webhook this key registered",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "A new value for each different change; repeat it to retry safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/targets/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                "targets",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "1"
                }
              ]
            },
            "description": "Scope: `webhooks:manage`"
          }
        }
      ]
    }
  ]
}
