{
  "info": {
    "name": "Slflo Integration API v1",
    "description": "Generated from openapi-v1.json. Set the slflo_token variable to your token (the sandbox token starts sfi_live_, like every token the console issues); base_url is https://api.slflo.com/api/integration/v1. Start with Client › Me. Every write sends a fresh Idempotency-Key ({{$guid}}); to replay one call, put a fixed key in its header.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{slflo_token}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.slflo.com/api/integration/v1"
    },
    {
      "key": "slflo_token",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Client",
      "item": [
        {
          "name": "Who am I",
          "request": {
            "method": "GET",
            "description": "getMe: The client, its company, scopes, token expiry and rate limit. Needs no scope; the first call to check settings.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/me",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me"
              ],
              "variable": []
            }
          }
        }
      ]
    },
    {
      "name": "Orders",
      "item": [
        {
          "name": "Answer many documents of one kind",
          "request": {
            "method": "POST",
            "description": "ackMany: Up to 500 acks for one entity (order, invoice, payment, return); each item applied on its own, with its own result. Needs that kind's :write scope. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/acks",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "acks"
              ],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"entity\": \"payment\",\n  \"items\": [\n    {\n      \"external_number\": \"JRN-000881\",\n      \"external_ref\": \"JRN-000881\",\n      \"id\": \"pay_01J9\",\n      \"message\": null,\n      \"outcome\": \"ACCEPTED\",\n      \"reason_code\": null\n    },\n    {\n      \"external_number\": null,\n      \"external_ref\": null,\n      \"id\": \"pay_01JA\",\n      \"message\": \"Customer CUST-0042 is on hold\",\n      \"outcome\": \"REJECTED\",\n      \"reason_code\": \"CUSTOMER_ON_HOLD\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Orders, by version",
          "request": {
            "method": "GET",
            "description": "listOrders: Oldest change first, keyset by version. Repeat with meta.next_version_after until has_more is false; stage by (id, version). Needs orders:read.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/orders",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "orders"
              ],
              "query": [
                {
                  "key": "filter[version_after]",
                  "value": "18000",
                  "description": "The cursor: the last version you staged, or meta.next_version_after. version_after is accepted too.",
                  "disabled": true
                },
                {
                  "key": "filter[updated_after]",
                  "value": "2026-10-01T00:00:00Z",
                  "description": "ISO-8601 time; starts a first load at the first change from then. Not beside a cursor.",
                  "disabled": true
                },
                {
                  "key": "filter[ack]",
                  "value": "pending",
                  "description": "pending (no ack at the current version), accepted, rejected or any (default).",
                  "disabled": true
                },
                {
                  "key": "filter[id]",
                  "value": "ord_01J9X,ord_01J9Y",
                  "description": "Comma list of our ids, at most 100.",
                  "disabled": true
                },
                {
                  "key": "filter[external_ref]",
                  "value": "SO-0012345",
                  "description": "Your key for the record, as you acked it.",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "100",
                  "description": "1 to 500, default 100.",
                  "disabled": true
                },
                {
                  "key": "filter[status]",
                  "value": "ERP_PENDING",
                  "description": "Comma list of order statuses.",
                  "disabled": true
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "One order",
          "request": {
            "method": "GET",
            "description": "getOrder: Needs orders:read.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/orders/:orderId",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "orders",
                ":orderId"
              ],
              "variable": [
                {
                  "key": "orderId",
                  "value": "ord_01J9X",
                  "description": "Slflo's id of the order, from the order feed."
                }
              ]
            }
          }
        },
        {
          "name": "Answer an order",
          "request": {
            "method": "POST",
            "description": "ackOrder: ACCEPTED with your number moves it to ERP_CONFIRMED; REJECTED with a reason to ERP_FAILED, where the office can send it again. Needs orders:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/orders/:orderId/ack",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "orders",
                ":orderId",
                "ack"
              ],
              "variable": [
                {
                  "key": "orderId",
                  "value": "ord_01J9X",
                  "description": "Slflo's id of the order, from the order feed."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"external_number\": \"SO-0012345\",\n  \"external_ref\": \"SO-0012345\",\n  \"message\": null,\n  \"outcome\": \"ACCEPTED\",\n  \"reason_code\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Documents",
      "item": [
        {
          "name": "Invoices, by version or by seq",
          "request": {
            "method": "GET",
            "description": "listInvoices: By version (every change, reversals included) or, with filter[seq_after], each invoice once as it is issued, with no gaps. Needs invoices:read.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/invoices",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "invoices"
              ],
              "query": [
                {
                  "key": "filter[version_after]",
                  "value": "18000",
                  "description": "The cursor: the last version you staged, or meta.next_version_after. version_after is accepted too.",
                  "disabled": true
                },
                {
                  "key": "filter[updated_after]",
                  "value": "2026-10-01T00:00:00Z",
                  "description": "ISO-8601 time; starts a first load at the first change from then. Not beside a cursor.",
                  "disabled": true
                },
                {
                  "key": "filter[ack]",
                  "value": "pending",
                  "description": "pending (no ack at the current version), accepted, rejected or any (default).",
                  "disabled": true
                },
                {
                  "key": "filter[id]",
                  "value": "ord_01J9X,ord_01J9Y",
                  "description": "Comma list of our ids, at most 100.",
                  "disabled": true
                },
                {
                  "key": "filter[external_ref]",
                  "value": "SO-0012345",
                  "description": "Your key for the record, as you acked it.",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "100",
                  "description": "1 to 500, default 100.",
                  "disabled": true
                },
                {
                  "key": "filter[seq_after]",
                  "value": "40",
                  "description": "Follow newly issued documents in issue order instead: the last seq you took (meta.last_seq). On its own.",
                  "disabled": true
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Where the invoice stream stands",
          "request": {
            "method": "GET",
            "description": "getInvoiceCursor: last_seq and high_water: start from now with filter[seq_after]=last_seq or filter[version_after]=high_water.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/invoices/cursor",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "invoices",
                "cursor"
              ],
              "variable": []
            }
          }
        },
        {
          "name": "One invoice",
          "request": {
            "method": "GET",
            "description": "getInvoice: Needs invoices:read.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/invoices/:id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "invoices",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "inv_01J9",
                  "description": "Slflo's id of the invoice, from the invoice feed."
                }
              ]
            }
          }
        },
        {
          "name": "Answer one invoice",
          "request": {
            "method": "POST",
            "description": "ackInvoice: Kept at the version it answered: a invoice that changes later is pending again. Needs invoices:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/invoices/:id/ack",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "invoices",
                ":id",
                "ack"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "inv_01J9",
                  "description": "Slflo's id of the invoice, from the invoice feed."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"external_number\": \"SO-0012345\",\n  \"external_ref\": \"SO-0012345\",\n  \"message\": null,\n  \"outcome\": \"ACCEPTED\",\n  \"reason_code\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Payments, by version or by seq",
          "request": {
            "method": "GET",
            "description": "listPayments: By version (every change, reversals included) or, with filter[seq_after], each payment once as it is issued, with no gaps. Needs payments:read.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/payments",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments"
              ],
              "query": [
                {
                  "key": "filter[version_after]",
                  "value": "18000",
                  "description": "The cursor: the last version you staged, or meta.next_version_after. version_after is accepted too.",
                  "disabled": true
                },
                {
                  "key": "filter[updated_after]",
                  "value": "2026-10-01T00:00:00Z",
                  "description": "ISO-8601 time; starts a first load at the first change from then. Not beside a cursor.",
                  "disabled": true
                },
                {
                  "key": "filter[ack]",
                  "value": "pending",
                  "description": "pending (no ack at the current version), accepted, rejected or any (default).",
                  "disabled": true
                },
                {
                  "key": "filter[id]",
                  "value": "ord_01J9X,ord_01J9Y",
                  "description": "Comma list of our ids, at most 100.",
                  "disabled": true
                },
                {
                  "key": "filter[external_ref]",
                  "value": "SO-0012345",
                  "description": "Your key for the record, as you acked it.",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "100",
                  "description": "1 to 500, default 100.",
                  "disabled": true
                },
                {
                  "key": "filter[seq_after]",
                  "value": "40",
                  "description": "Follow newly issued documents in issue order instead: the last seq you took (meta.last_seq). On its own.",
                  "disabled": true
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Where the payment stream stands",
          "request": {
            "method": "GET",
            "description": "getPaymentCursor: last_seq and high_water: start from now with filter[seq_after]=last_seq or filter[version_after]=high_water.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/payments/cursor",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments",
                "cursor"
              ],
              "variable": []
            }
          }
        },
        {
          "name": "One payment",
          "request": {
            "method": "GET",
            "description": "getPayment: Needs payments:read.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/payments/:id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "pay_01J9",
                  "description": "Slflo's id of the payment (receipt), from the payment feed."
                }
              ]
            }
          }
        },
        {
          "name": "Answer one payment",
          "request": {
            "method": "POST",
            "description": "ackPayment: Kept at the version it answered: a payment that changes later is pending again. Needs payments:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/payments/:id/ack",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments",
                ":id",
                "ack"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "pay_01J9",
                  "description": "Slflo's id of the payment (receipt), from the payment feed."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"external_number\": \"SO-0012345\",\n  \"external_ref\": \"SO-0012345\",\n  \"message\": null,\n  \"outcome\": \"ACCEPTED\",\n  \"reason_code\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Returns, by version or by seq",
          "request": {
            "method": "GET",
            "description": "listReturns: By version (every change, reversals included) or, with filter[seq_after], each return once as it is issued, with no gaps. Needs returns:read.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/returns",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "returns"
              ],
              "query": [
                {
                  "key": "filter[version_after]",
                  "value": "18000",
                  "description": "The cursor: the last version you staged, or meta.next_version_after. version_after is accepted too.",
                  "disabled": true
                },
                {
                  "key": "filter[updated_after]",
                  "value": "2026-10-01T00:00:00Z",
                  "description": "ISO-8601 time; starts a first load at the first change from then. Not beside a cursor.",
                  "disabled": true
                },
                {
                  "key": "filter[ack]",
                  "value": "pending",
                  "description": "pending (no ack at the current version), accepted, rejected or any (default).",
                  "disabled": true
                },
                {
                  "key": "filter[id]",
                  "value": "ord_01J9X,ord_01J9Y",
                  "description": "Comma list of our ids, at most 100.",
                  "disabled": true
                },
                {
                  "key": "filter[external_ref]",
                  "value": "SO-0012345",
                  "description": "Your key for the record, as you acked it.",
                  "disabled": true
                },
                {
                  "key": "per_page",
                  "value": "100",
                  "description": "1 to 500, default 100.",
                  "disabled": true
                },
                {
                  "key": "filter[seq_after]",
                  "value": "40",
                  "description": "Follow newly issued documents in issue order instead: the last seq you took (meta.last_seq). On its own.",
                  "disabled": true
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Where the return stream stands",
          "request": {
            "method": "GET",
            "description": "getReturnCursor: last_seq and high_water: start from now with filter[seq_after]=last_seq or filter[version_after]=high_water.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/returns/cursor",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "returns",
                "cursor"
              ],
              "variable": []
            }
          }
        },
        {
          "name": "One return",
          "request": {
            "method": "GET",
            "description": "getReturn: Needs returns:read.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/returns/:id",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "returns",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "ret_01J9",
                  "description": "Slflo's id of the return (credit note), from the return feed."
                }
              ]
            }
          }
        },
        {
          "name": "Answer one return",
          "request": {
            "method": "POST",
            "description": "ackReturn: Kept at the version it answered: a return that changes later is pending again. Needs returns:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/returns/:id/ack",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "returns",
                ":id",
                "ack"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "ret_01J9",
                  "description": "Slflo's id of the return (credit note), from the return feed."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"external_number\": \"SO-0012345\",\n  \"external_ref\": \"SO-0012345\",\n  \"message\": null,\n  \"outcome\": \"ACCEPTED\",\n  \"reason_code\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Master data",
      "item": [
        {
          "name": "Push up to 500 records in one call",
          "request": {
            "method": "POST",
            "description": "batch: entity is products, units or balances; each item is {ref, body} with the PUT's body and gets its own result. Counts as one request for the rate limit. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/batch/:entity",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "batch",
                ":entity"
              ],
              "variable": [
                {
                  "key": "entity",
                  "value": "products",
                  "description": "What the batch holds: products, units or balances."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"items\": [\n    {\n      \"body\": {\n        \"base_unit_ref\": \"pcs\",\n        \"name\": {\n          \"en\": \"Cola 330ml\"\n        }\n      },\n      \"ref\": \"ITEM-1001\"\n    },\n    {\n      \"body\": {\n        \"base_unit_ref\": \"box\",\n        \"name\": {\n          \"en\": \"Water 1.5l\"\n        }\n      },\n      \"ref\": \"ITEM-1002\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Remove a pushed customer",
          "request": {
            "method": "DELETE",
            "description": "deleteCustomer: A tombstone, never a hard delete. Needs customers:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/customers/:ref",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "customers",
                ":ref"
              ],
              "variable": [
                {
                  "key": "ref",
                  "value": "CUST-0042",
                  "description": "Your key for the customer — the account number in your ERP."
                }
              ]
            }
          }
        },
        {
          "name": "Push a customer by your key",
          "request": {
            "method": "PUT",
            "description": "putCustomer: Find or create; the same body twice is unchanged, an older source_version is stale. salflo_id adopts a customer that started in Slflo. Needs customers:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/customers/:ref",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "customers",
                ":ref"
              ],
              "variable": [
                {
                  "key": "ref",
                  "value": "CUST-0042",
                  "description": "Your key for the customer — the account number in your ERP."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"address\": \"12 Tahrir St, Giza\",\n  \"blocked\": false,\n  \"credit_limit\": 50000,\n  \"latitude\": 30.0131,\n  \"longitude\": 31.2089,\n  \"name\": {\n    \"ar\": \"سوق الأمل\",\n    \"en\": \"Al Amal Market\"\n  },\n  \"price_list_ref\": \"RETAIL\",\n  \"radius_metres\": 150,\n  \"salflo_id\": null,\n  \"source_version\": \"2026-10-05T10:40:00Z\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Push a customer's balance",
          "request": {
            "method": "PUT",
            "description": "putBalance: Your figure as of a time, plus money in flight. Needs balances:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/customers/:ref/balance",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "customers",
                ":ref",
                "balance"
              ],
              "variable": [
                {
                  "key": "ref",
                  "value": "CUST-0042",
                  "description": "Your key for the customer — the account number in your ERP."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"as_of\": \"2026-10-06T00:00:00Z\",\n  \"balance\": 12500,\n  \"credit_limit\": 50000\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Remove a pushed branch",
          "request": {
            "method": "DELETE",
            "description": "deleteBranch: Refused with BRANCH_ON_ROUTE while a route still visits it. Needs customers:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/customers/:ref/branches/:branchRef",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "customers",
                ":ref",
                "branches",
                ":branchRef"
              ],
              "variable": [
                {
                  "key": "ref",
                  "value": "CUST-0042",
                  "description": "Your key for the customer the branch belongs to."
                },
                {
                  "key": "branchRef",
                  "value": "CUST-0042-02",
                  "description": "Your key for the branch (delivery address) of that customer."
                }
              ]
            }
          }
        },
        {
          "name": "Push a branch by your keys",
          "request": {
            "method": "PUT",
            "description": "putBranch: Null overrides read the account's. Needs customers:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/customers/:ref/branches/:branchRef",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "customers",
                ":ref",
                "branches",
                ":branchRef"
              ],
              "variable": [
                {
                  "key": "ref",
                  "value": "CUST-0042",
                  "description": "Your key for the customer the branch belongs to."
                },
                {
                  "key": "branchRef",
                  "value": "CUST-0042-02",
                  "description": "Your key for the branch (delivery address) of that customer."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"address\": \"4 Mosadak St, Dokki\",\n  \"blocked\": false,\n  \"contact_name\": \"Hassan\",\n  \"credit_limit\": null,\n  \"latitude\": 30.0385,\n  \"longitude\": 31.2101,\n  \"name\": {\n    \"ar\": \"سوق الأمل، الدقي\",\n    \"en\": \"Al Amal Market, Dokki\"\n  },\n  \"payment_terms_days\": 30,\n  \"phone\": \"+201001234567\",\n  \"price_list_ref\": null,\n  \"radius_metres\": 100,\n  \"source_version\": \"2026-10-05T10:40:00Z\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Push a price list header",
          "request": {
            "method": "PUT",
            "description": "putPriceList: Needs prices:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/price-lists/:ref",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "price-lists",
                ":ref"
              ],
              "variable": [
                {
                  "key": "ref",
                  "value": "RETAIL",
                  "description": "Your key for the price list."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"currency\": \"EGP\",\n  \"name\": {\n    \"ar\": \"التجزئة\",\n    \"en\": \"Retail\"\n  },\n  \"source_version\": \"12\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Push resolved prices",
          "request": {
            "method": "PUT",
            "description": "putPrices: Up to 500 rows; mode=replace removes the list's other prices, merge (default) leaves them. Unknown refs refuse the whole call with each one in details. Needs prices:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/price-lists/:ref/prices",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "price-lists",
                ":ref",
                "prices"
              ],
              "query": [
                {
                  "key": "mode",
                  "value": "merge",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "ref",
                  "value": "RETAIL",
                  "description": "Your key for the price list."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"prices\": [\n    {\n      \"min_price\": 120,\n      \"price\": 125.5,\n      \"product_ref\": \"ITEM-1001\",\n      \"unit_ref\": \"cs\",\n      \"valid_from\": \"2026-10-01\",\n      \"valid_to\": null\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Push a product",
          "request": {
            "method": "PUT",
            "description": "putProduct: Its base unit by your unit key. Needs catalog:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/products/:ref",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "products",
                ":ref"
              ],
              "variable": [
                {
                  "key": "ref",
                  "value": "ITEM-1001",
                  "description": "Your key for the product — the item number in your ERP."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"active\": true,\n  \"base_unit_ref\": \"pcs\",\n  \"category_code\": \"DRINKS\",\n  \"name\": {\n    \"ar\": \"كولا ٣٣٠ مل\",\n    \"en\": \"Cola 330ml\"\n  },\n  \"salflo_id\": null,\n  \"source_version\": \"2026-10-05T10:40:00Z\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Replace a product's sellable units",
          "request": {
            "method": "PUT",
            "description": "putProductUnits: The whole list with factors to the base unit. Needs catalog:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/products/:ref/units",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "products",
                ":ref",
                "units"
              ],
              "variable": [
                {
                  "key": "ref",
                  "value": "ITEM-1001",
                  "description": "Your key for the product — the item number in your ERP."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"units\": [\n    {\n      \"factor_to_base\": 1,\n      \"order_default\": false,\n      \"unit_ref\": \"pcs\"\n    },\n    {\n      \"factor_to_base\": 24,\n      \"order_default\": true,\n      \"unit_ref\": \"cs\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Push a unit",
          "request": {
            "method": "PUT",
            "description": "putUnit: A unit of ours with the same code is adopted. Needs catalog:write. Send an Idempotency-Key header; a retry with the same key and body answers the first answer again, with Idempotent-Replayed: true.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/units/:ref",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "units",
                ":ref"
              ],
              "variable": [
                {
                  "key": "ref",
                  "value": "pcs",
                  "description": "Your key for the unit of measure."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": {\n    \"ar\": \"كرتونة\",\n    \"en\": \"Case\"\n  },\n  \"source_version\": \"7\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Lookup",
      "item": [
        {
          "name": "Find a record by your key or ours",
          "request": {
            "method": "GET",
            "description": "lookup: entity is customer, branch (your key is CUSTOMER_REF/BRANCH_REF), product, unit, price_list, warehouse, order, invoice, payment (or receipt) or return (or credit_note); send external_ref or id. A miss is exists: false. Needs a scope of the entity's family.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/lookup",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "lookup"
              ],
              "query": [
                {
                  "key": "entity",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "id",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "external_ref",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "A code list to map",
          "request": {
            "method": "GET",
            "description": "getReferenceList: kind is payment-methods, return-reasons, order-statuses, return-statuses, cheque-statuses, tax-codes, currencies, units, warehouses or price-lists. Needs no scope.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/reference/:kind",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "reference",
                ":kind"
              ],
              "variable": [
                {
                  "key": "kind",
                  "value": "payment-methods",
                  "description": "Which list: payment-methods, return-reasons, order-statuses, return-statuses, cheque-statuses, tax-codes, currencies, units, warehouses or price-lists."
                }
              ]
            }
          }
        }
      ]
    }
  ]
}
