{
  "info": {
    "description": "Generated from the OpenAPI document (/developers/openapi.json). Set `base_url` (sandbox by default) and `api_key` (your key; never commit it) in the collection variables.",
    "name": "PazarCloud Developer API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "item": [
        {
          "name": "Who the key acts as and what it may do",
          "request": {
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me"
              ],
              "raw": "{{base_url}}/me"
            }
          }
        }
      ],
      "name": "Account"
    },
    {
      "item": [
        {
          "name": "List customers (stable order for sync)",
          "request": {
            "description": "Requires the integration's role to hold: `definitions.ofa_customer.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "customers"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                },
                {
                  "description": "this integration's reference",
                  "disabled": true,
                  "key": "external_ref",
                  "value": ""
                },
                {
                  "description": "VKN / TCKN",
                  "disabled": true,
                  "key": "tax_number",
                  "value": ""
                },
                {
                  "description": "customer code",
                  "disabled": true,
                  "key": "code",
                  "value": ""
                },
                {
                  "description": "RFC 3339; changed after",
                  "disabled": true,
                  "key": "updated_since",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/customers"
            }
          }
        },
        {
          "name": "Create or update a customer by this integration's reference",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"address\": {\n    \"city\": \"\",\n    \"country\": \"\",\n    \"district\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"postal_code\": \"\"\n  },\n  \"e_invoice_kind\": \"\",\n  \"email\": \"\",\n  \"id_number\": \"\",\n  \"is_active\": false,\n  \"kind\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"tax_number\": \"\",\n  \"tax_office\": \"\"\n}"
            },
            "description": "Requires the integration's role to hold: `definitions.ofa_customer.create`, `definitions.ofa_customer.edit`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "PUT",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "customers",
                "by-ref",
                ":external_ref"
              ],
              "raw": "{{base_url}}/customers/by-ref/:external_ref",
              "variable": [
                {
                  "key": "external_ref",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Get a customer",
          "request": {
            "description": "Requires the integration's role to hold: `definitions.ofa_customer.view`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "customers",
                ":id"
              ],
              "raw": "{{base_url}}/customers/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        }
      ],
      "name": "Customers"
    },
    {
      "item": [
        {
          "name": "List suppliers (stable order for sync)",
          "request": {
            "description": "Requires the integration's role to hold: `definitions.ofa_supplier.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "suppliers"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                },
                {
                  "description": "this integration's reference",
                  "disabled": true,
                  "key": "external_ref",
                  "value": ""
                },
                {
                  "description": "VKN / TCKN",
                  "disabled": true,
                  "key": "tax_number",
                  "value": ""
                },
                {
                  "description": "supplier code",
                  "disabled": true,
                  "key": "code",
                  "value": ""
                },
                {
                  "description": "RFC 3339; changed after",
                  "disabled": true,
                  "key": "updated_since",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/suppliers"
            }
          }
        },
        {
          "name": "Create or update a supplier by this integration's reference",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"address\": {\n    \"city\": \"\",\n    \"country\": \"\",\n    \"district\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"postal_code\": \"\"\n  },\n  \"e_invoice_kind\": \"\",\n  \"email\": \"\",\n  \"id_number\": \"\",\n  \"is_active\": false,\n  \"kind\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"tax_number\": \"\",\n  \"tax_office\": \"\"\n}"
            },
            "description": "Requires the integration's role to hold: `definitions.ofa_supplier.create`, `definitions.ofa_supplier.edit`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "PUT",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "suppliers",
                "by-ref",
                ":external_ref"
              ],
              "raw": "{{base_url}}/suppliers/by-ref/:external_ref",
              "variable": [
                {
                  "key": "external_ref",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Get a supplier",
          "request": {
            "description": "Requires the integration's role to hold: `definitions.ofa_supplier.view`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "suppliers",
                ":id"
              ],
              "raw": "{{base_url}}/suppliers/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        }
      ],
      "name": "Suppliers"
    },
    {
      "item": [
        {
          "name": "List the cash boxes and bank accounts a tender may name (fund_id)",
          "request": {
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "funds"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/funds"
            }
          }
        },
        {
          "name": "List payment methods",
          "request": {
            "description": "Requires the integration's role to hold: `definitions.payment_methods.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payment-methods"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/payment-methods"
            }
          }
        },
        {
          "name": "List services",
          "request": {
            "description": "Requires the integration's role to hold: `definitions.services.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "services"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/services"
            }
          }
        },
        {
          "name": "List tax types",
          "request": {
            "description": "Requires the integration's role to hold: `definitions.tax_types.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "tax-types"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/tax-types"
            }
          }
        },
        {
          "name": "List the income / expense titles a slip line names (title_id), of the kinds the role may list",
          "request": {
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "titles"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                },
                {
                  "description": "income or expense; omitted: both",
                  "disabled": true,
                  "key": "kind",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/titles"
            }
          }
        },
        {
          "name": "List units",
          "request": {
            "description": "Requires the integration's role to hold: `definitions.units.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "units"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/units"
            }
          }
        },
        {
          "name": "List warehouses",
          "request": {
            "description": "Requires the integration's role to hold: `definitions.warehouses.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "warehouses"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/warehouses"
            }
          }
        }
      ],
      "name": "Lookups"
    },
    {
      "item": [
        {
          "name": "Price lines by the pricing rules (channel ordinary or online)",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"channel\": \"\",\n  \"customer_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"date\": \"\",\n  \"lines\": [\n    {\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"quantity\": \"0.0000\",\n      \"variant_id\": \"00000000-0000-0000-0000-000000000000\"\n    }\n  ]\n}"
            },
            "description": "Requires the integration's role to hold: `sales.pricing.view`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "prices",
                "quote"
              ],
              "raw": "{{base_url}}/prices/quote"
            }
          }
        },
        {
          "name": "General price timeline per item: today's price and dated changes (no customer, quantity 1)",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"channel\": \"\",\n  \"days\": 0,\n  \"from\": \"\",\n  \"items\": [\n    {\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"variant_id\": \"00000000-0000-0000-0000-000000000000\"\n    }\n  ]\n}"
            },
            "description": "Requires the integration's role to hold: `sales.pricing.view`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "prices",
                "schedule"
              ],
              "raw": "{{base_url}}/prices/schedule"
            }
          }
        },
        {
          "name": "List products (with updated_since: the changed ones, stable order for sync)",
          "request": {
            "description": "Requires the integration's role to hold: `definitions.products.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "products"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                },
                {
                  "description": "true (active only) or false (inactive only); omitted: both",
                  "disabled": true,
                  "key": "is_active",
                  "value": ""
                },
                {
                  "description": "RFC 3339; the product, one of its variants or its online-store identity changed after",
                  "disabled": true,
                  "key": "updated_since",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/products"
            }
          }
        },
        {
          "name": "Get a product with its variants",
          "request": {
            "description": "Requires the integration's role to hold: `definitions.products.view`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "products",
                ":id"
              ],
              "raw": "{{base_url}}/products/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Current stock per item and warehouse",
          "request": {
            "description": "Requires the integration's role to hold: `sales.current_stock.list`. Needs the organisation's `inventory` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "stock"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                },
                {
                  "description": "UUID",
                  "disabled": true,
                  "key": "warehouse_id",
                  "value": ""
                },
                {
                  "description": "UUID",
                  "disabled": true,
                  "key": "product_id",
                  "value": ""
                },
                {
                  "description": "UUID",
                  "disabled": true,
                  "key": "variant_id",
                  "value": ""
                },
                {
                  "description": "RFC 3339; the row's quantity changed after (a reservation alone moves no row)",
                  "disabled": true,
                  "key": "updated_since",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/stock"
            }
          }
        },
        {
          "name": "Online-store groups with their products (what a shop sells and its categories)",
          "request": {
            "description": "Requires the integration's role to hold: `settings.storefront_groups.list`. Needs the organisation's `ecommerce` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "storefront-groups"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/storefront-groups"
            }
          }
        }
      ],
      "name": "Products"
    },
    {
      "item": [
        {
          "name": "List the sales of the fiscal year (stable order for sync), or find one by this integration's reference",
          "request": {
            "description": "Requires the integration's role to hold: `sales.invoices.list`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-invoices"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                },
                {
                  "description": "RFC 3339; changed after",
                  "disabled": true,
                  "key": "updated_since",
                  "value": ""
                },
                {
                  "description": "YYYY-MM-DD; invoice date on or after",
                  "disabled": true,
                  "key": "date_from",
                  "value": ""
                },
                {
                  "description": "YYYY-MM-DD; invoice date on or before",
                  "disabled": true,
                  "key": "date_to",
                  "value": ""
                },
                {
                  "description": "this integration's reference; when given, the one sale with it in whichever fiscal year it lives (the other parameters are ignored)",
                  "disabled": true,
                  "key": "external_ref",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/sales-invoices"
            }
          }
        },
        {
          "name": "Create a sale (optionally send its e-invoice)",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"currency\": \"\",\n  \"customer\": {\n    \"anonymous\": false,\n    \"external_ref\": \"\",\n    \"id\": \"00000000-0000-0000-0000-000000000000\",\n    \"name\": \"\",\n    \"phone\": \"\",\n    \"tax_number\": \"\"\n  },\n  \"due_date\": \"\",\n  \"e_invoice\": {\n    \"internet_sale\": {\n      \"carrier_name\": \"\",\n      \"carrier_tax_id\": \"\",\n      \"payment_agent\": \"\",\n      \"payment_date\": \"\",\n      \"payment_description\": \"\",\n      \"payment_method\": \"\",\n      \"shipment_date\": \"\",\n      \"web_address\": \"\"\n    },\n    \"send\": false\n  },\n  \"exchange_rate\": \"0.0000\",\n  \"external_ref\": \"\",\n  \"invoice_date\": \"\",\n  \"lines\": [\n    {\n      \"description\": \"\",\n      \"discount\": \"0.0000\",\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"quantity\": \"0.0000\",\n      \"service_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"tax_type_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"taxes\": [],\n      \"unit_price\": \"0.0000\",\n      \"variant_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"warehouse_id\": \"00000000-0000-0000-0000-000000000000\"\n    }\n  ],\n  \"notes\": \"\",\n  \"reference_number\": \"\",\n  \"settlement\": {\n    \"tenders\": [\n      {\n        \"amount\": null,\n        \"due_date\": null,\n        \"fund_id\": null,\n        \"payment_method_id\": null\n      }\n    ]\n  },\n  \"warehouse_id\": \"00000000-0000-0000-0000-000000000000\"\n}"
            },
            "description": "Requires the integration's role to hold: `sales.invoices.create`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-invoices"
              ],
              "raw": "{{base_url}}/sales-invoices"
            }
          }
        },
        {
          "name": "Totals of a would-be sale or sales order (nothing is written, no number is taken)",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"currency\": \"\",\n  \"customer\": {\n    \"anonymous\": false,\n    \"external_ref\": \"\",\n    \"id\": \"00000000-0000-0000-0000-000000000000\",\n    \"name\": \"\",\n    \"phone\": \"\",\n    \"tax_number\": \"\"\n  },\n  \"due_date\": \"\",\n  \"exchange_rate\": \"0.0000\",\n  \"external_ref\": \"\",\n  \"lines\": [\n    {\n      \"description\": \"\",\n      \"discount\": \"0.0000\",\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"quantity\": \"0.0000\",\n      \"service_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"tax_type_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"taxes\": [],\n      \"unit_price\": \"0.0000\",\n      \"variant_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"warehouse_id\": \"00000000-0000-0000-0000-000000000000\"\n    }\n  ],\n  \"notes\": \"\",\n  \"order_date\": \"\",\n  \"reference_number\": \"\",\n  \"type\": \"\",\n  \"warehouse_id\": \"00000000-0000-0000-0000-000000000000\"\n}"
            },
            "description": "Requires the integration's role to hold: `sales.invoices.create`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-invoices",
                "preview"
              ],
              "raw": "{{base_url}}/sales-invoices/preview"
            }
          }
        },
        {
          "name": "Get a sale",
          "request": {
            "description": "Requires the integration's role to hold: `sales.invoices.view`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-invoices",
                ":id"
              ],
              "raw": "{{base_url}}/sales-invoices/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "The sale's live share link (the invoice page, 30 days; minted when none is live, else the same link)",
          "request": {
            "description": "Requires the integration's role to hold: `sales.invoices.view`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-invoices",
                ":id",
                "share-link"
              ],
              "raw": "{{base_url}}/sales-invoices/:id/share-link",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        }
      ],
      "name": "Sales invoices"
    },
    {
      "item": [
        {
          "name": "The sale's e-invoice state",
          "request": {
            "description": "Requires the integration's role to hold: `tr_tax.documents.view`. Needs the organisation's `e_invoice` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-invoices",
                ":id",
                "e-invoice"
              ],
              "raw": "{{base_url}}/sales-invoices/:id/e-invoice",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Send (or re-send) the sale's e-invoice",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"internet_sale\": {\n    \"carrier_name\": \"\",\n    \"carrier_tax_id\": \"\",\n    \"payment_agent\": \"\",\n    \"payment_date\": \"\",\n    \"payment_description\": \"\",\n    \"payment_method\": \"\",\n    \"shipment_date\": \"\",\n    \"web_address\": \"\"\n  }\n}"
            },
            "description": "Requires the integration's role to hold: `tr_tax.documents.send`, `tr_tax.documents.edit`. Needs the organisation's `e_invoice` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-invoices",
                ":id",
                "e-invoice"
              ],
              "raw": "{{base_url}}/sales-invoices/:id/e-invoice",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "The e-invoice PDF (once handed over to GİB)",
          "request": {
            "description": "Requires the integration's role to hold: `tr_tax.documents.view`. Needs the organisation's `e_invoice` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-invoices",
                ":id",
                "e-invoice",
                "pdf"
              ],
              "raw": "{{base_url}}/sales-invoices/:id/e-invoice/pdf",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        }
      ],
      "name": "E-invoices (Türkiye)"
    },
    {
      "item": [
        {
          "name": "Get a sales return (lines with the sale lines they return; refunds only with treasury.payments.list and treasury.payments.view, else [])",
          "request": {
            "description": "Requires the integration's role to hold: `sales.invoices.view`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-returns",
                ":id"
              ],
              "raw": "{{base_url}}/sales-returns/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        }
      ],
      "name": "Sales returns"
    },
    {
      "item": [
        {
          "name": "List the receipts and payments of the fiscal year (stable order for sync), or find one by this integration's reference",
          "request": {
            "description": "Requires the integration's role to hold: `treasury.payments.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                },
                {
                  "description": "RFC 3339; changed after",
                  "disabled": true,
                  "key": "updated_since",
                  "value": ""
                },
                {
                  "description": "YYYY-MM-DD; document date on or after",
                  "disabled": true,
                  "key": "date_from",
                  "value": ""
                },
                {
                  "description": "YYYY-MM-DD; document date on or before",
                  "disabled": true,
                  "key": "date_to",
                  "value": ""
                },
                {
                  "description": "this integration's reference; when given, the one document with it in whichever fiscal year it lives (the other parameters are ignored)",
                  "disabled": true,
                  "key": "external_ref",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/payments"
            }
          }
        },
        {
          "name": "Record a stand-alone receipt or payment (cash, transfer or card rows; held for a second signature above the threshold)",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"external_ref\": \"\",\n  \"lines\": [\n    {\n      \"amount\": \"0.0000\",\n      \"currency\": \"\",\n      \"exchange_amount\": \"0.0000\",\n      \"exchange_rate\": \"0.0000\",\n      \"fund_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"notes\": \"\",\n      \"payment_method_id\": \"00000000-0000-0000-0000-000000000000\"\n    }\n  ],\n  \"notes\": \"\",\n  \"origin_invoice_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"party\": {\n    \"external_ref\": \"\",\n    \"id\": \"00000000-0000-0000-0000-000000000000\",\n    \"kind\": \"\"\n  },\n  \"payment_date\": \"\",\n  \"reference_number\": \"\",\n  \"settles_role\": \"\",\n  \"type\": \"\"\n}"
            },
            "description": "Requires the integration's role to hold: `treasury.payments.create`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments"
              ],
              "raw": "{{base_url}}/payments"
            }
          }
        },
        {
          "name": "Get a receipt or payment (lines: method, fund, amount; the document it was recorded for)",
          "request": {
            "description": "Requires the integration's role to hold: `treasury.payments.view`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments",
                ":id"
              ],
              "raw": "{{base_url}}/payments/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Delete a receipt or payment (its entry and references go with it)",
          "request": {
            "description": "Requires the integration's role to hold: `treasury.payments.delete`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "DELETE",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments",
                ":id"
              ],
              "raw": "{{base_url}}/payments/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        }
      ],
      "name": "Payments"
    },
    {
      "item": [
        {
          "name": "List the purchases of the fiscal year (stable order for sync), or find one by this integration's reference",
          "request": {
            "description": "Requires the integration's role to hold: `purchases.invoices.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "purchase-invoices"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                },
                {
                  "description": "RFC 3339; changed after",
                  "disabled": true,
                  "key": "updated_since",
                  "value": ""
                },
                {
                  "description": "YYYY-MM-DD; document date on or after",
                  "disabled": true,
                  "key": "date_from",
                  "value": ""
                },
                {
                  "description": "YYYY-MM-DD; document date on or before",
                  "disabled": true,
                  "key": "date_to",
                  "value": ""
                },
                {
                  "description": "this integration's reference; when given, the one document with it in whichever fiscal year it lives (the other parameters are ignored)",
                  "disabled": true,
                  "key": "external_ref",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/purchase-invoices"
            }
          }
        },
        {
          "name": "Record a purchase (posted with its entry in the same transaction)",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"exchange_rate\": \"0.0000\",\n  \"external_ref\": \"\",\n  \"header_discount_amount\": \"0.0000\",\n  \"invoice_date\": \"\",\n  \"lines\": [\n    {\n      \"description\": \"\",\n      \"discount\": \"0.0000\",\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"quantity\": \"0.0000\",\n      \"service_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"tax_type_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"taxes\": [],\n      \"unit_price\": \"0.0000\",\n      \"variant_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"warehouse_id\": \"00000000-0000-0000-0000-000000000000\"\n    }\n  ],\n  \"notes\": \"\",\n  \"reference_number\": \"\",\n  \"supplier\": {\n    \"external_ref\": \"\",\n    \"id\": \"00000000-0000-0000-0000-000000000000\"\n  },\n  \"warehouse_id\": \"00000000-0000-0000-0000-000000000000\"\n}"
            },
            "description": "Requires the integration's role to hold: `purchases.invoices.create`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "purchase-invoices"
              ],
              "raw": "{{base_url}}/purchase-invoices"
            }
          }
        },
        {
          "name": "Get a purchase",
          "request": {
            "description": "Requires the integration's role to hold: `purchases.invoices.view`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "purchase-invoices",
                ":id"
              ],
              "raw": "{{base_url}}/purchase-invoices/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Delete a purchase (its stock, entry and references go with it)",
          "request": {
            "description": "Requires the integration's role to hold: `purchases.invoices.delete`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "DELETE",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "purchase-invoices",
                ":id"
              ],
              "raw": "{{base_url}}/purchase-invoices/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        }
      ],
      "name": "Purchase invoices"
    },
    {
      "item": [
        {
          "name": "List the expense slips of the fiscal year, or find one by this integration's reference",
          "request": {
            "description": "Requires the integration's role to hold: `treasury.expense_slips.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "expense-slips"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                },
                {
                  "description": "RFC 3339; changed after",
                  "disabled": true,
                  "key": "updated_since",
                  "value": ""
                },
                {
                  "description": "YYYY-MM-DD; document date on or after",
                  "disabled": true,
                  "key": "date_from",
                  "value": ""
                },
                {
                  "description": "YYYY-MM-DD; document date on or before",
                  "disabled": true,
                  "key": "date_to",
                  "value": ""
                },
                {
                  "description": "this integration's reference; when given, the one document with it in whichever fiscal year it lives (the other parameters are ignored)",
                  "disabled": true,
                  "key": "external_ref",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/expense-slips"
            }
          }
        },
        {
          "name": "Record an expense slip (lines on expense titles, taxes by tax type; held for a second signature above the threshold when paid from funds)",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"currency\": \"\",\n  \"description\": \"\",\n  \"exchange_rate\": \"0.0000\",\n  \"external_ref\": \"\",\n  \"fund_rows\": [\n    {\n      \"amount\": \"0.0000\",\n      \"description\": \"\",\n      \"fund_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"line_date\": \"\",\n      \"payment_method_id\": \"00000000-0000-0000-0000-000000000000\"\n    }\n  ],\n  \"header_discount_amount\": \"0.0000\",\n  \"header_discount_percent\": \"0.0000\",\n  \"lines\": [\n    {\n      \"description\": \"\",\n      \"discount\": \"0.0000\",\n      \"exchange_discount\": \"0.0000\",\n      \"exchange_price\": \"0.0000\",\n      \"quantity\": \"0.0000\",\n      \"tax_type_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"taxes\": [],\n      \"title_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"unit_price\": \"0.0000\"\n    }\n  ],\n  \"party\": {\n    \"external_ref\": \"\",\n    \"id\": \"00000000-0000-0000-0000-000000000000\",\n    \"kind\": \"\"\n  },\n  \"reference_number\": \"\",\n  \"slip_date\": \"\"\n}"
            },
            "description": "Requires the integration's role to hold: `treasury.expense_slips.create`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "expense-slips"
              ],
              "raw": "{{base_url}}/expense-slips"
            }
          }
        },
        {
          "name": "Get an expense slip",
          "request": {
            "description": "Requires the integration's role to hold: `treasury.expense_slips.view`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "expense-slips",
                ":id"
              ],
              "raw": "{{base_url}}/expense-slips/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Delete an expense slip (its entry and references go with it; linked payments stay)",
          "request": {
            "description": "Requires the integration's role to hold: `treasury.expense_slips.delete`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "DELETE",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "expense-slips",
                ":id"
              ],
              "raw": "{{base_url}}/expense-slips/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "List the income slips of the fiscal year, or find one by this integration's reference",
          "request": {
            "description": "Requires the integration's role to hold: `treasury.income_slips.list`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "income-slips"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                },
                {
                  "description": "RFC 3339; changed after",
                  "disabled": true,
                  "key": "updated_since",
                  "value": ""
                },
                {
                  "description": "YYYY-MM-DD; document date on or after",
                  "disabled": true,
                  "key": "date_from",
                  "value": ""
                },
                {
                  "description": "YYYY-MM-DD; document date on or before",
                  "disabled": true,
                  "key": "date_to",
                  "value": ""
                },
                {
                  "description": "this integration's reference; when given, the one document with it in whichever fiscal year it lives (the other parameters are ignored)",
                  "disabled": true,
                  "key": "external_ref",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/income-slips"
            }
          }
        },
        {
          "name": "Record an income slip (lines on income titles; no taxes)",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"currency\": \"\",\n  \"description\": \"\",\n  \"exchange_rate\": \"0.0000\",\n  \"external_ref\": \"\",\n  \"fund_rows\": [\n    {\n      \"amount\": \"0.0000\",\n      \"description\": \"\",\n      \"fund_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"line_date\": \"\",\n      \"payment_method_id\": \"00000000-0000-0000-0000-000000000000\"\n    }\n  ],\n  \"header_discount_amount\": \"0.0000\",\n  \"header_discount_percent\": \"0.0000\",\n  \"lines\": [\n    {\n      \"description\": \"\",\n      \"discount\": \"0.0000\",\n      \"exchange_discount\": \"0.0000\",\n      \"exchange_price\": \"0.0000\",\n      \"quantity\": \"0.0000\",\n      \"tax_type_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"taxes\": [],\n      \"title_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"unit_price\": \"0.0000\"\n    }\n  ],\n  \"party\": {\n    \"external_ref\": \"\",\n    \"id\": \"00000000-0000-0000-0000-000000000000\",\n    \"kind\": \"\"\n  },\n  \"reference_number\": \"\",\n  \"slip_date\": \"\"\n}"
            },
            "description": "Requires the integration's role to hold: `treasury.income_slips.create`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "income-slips"
              ],
              "raw": "{{base_url}}/income-slips"
            }
          }
        },
        {
          "name": "Get an income slip",
          "request": {
            "description": "Requires the integration's role to hold: `treasury.income_slips.view`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "income-slips",
                ":id"
              ],
              "raw": "{{base_url}}/income-slips/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Delete an income slip (its entry and references go with it; linked payments stay)",
          "request": {
            "description": "Requires the integration's role to hold: `treasury.income_slips.delete`.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "DELETE",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "income-slips",
                ":id"
              ],
              "raw": "{{base_url}}/income-slips/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        }
      ],
      "name": "Income and expense slips"
    },
    {
      "item": [
        {
          "name": "Find the sales order of this integration's reference",
          "request": {
            "description": "Requires the integration's role to hold: `sales.invoices.view`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-orders"
              ],
              "query": [
                {
                  "description": "this integration's reference (required)",
                  "disabled": true,
                  "key": "external_ref",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/sales-orders"
            }
          }
        },
        {
          "name": "Create a reserving sales order (a shop order placed; customer by this integration's reference)",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"currency\": \"\",\n  \"customer\": {\n    \"anonymous\": false,\n    \"external_ref\": \"\",\n    \"id\": \"00000000-0000-0000-0000-000000000000\",\n    \"name\": \"\",\n    \"phone\": \"\",\n    \"tax_number\": \"\"\n  },\n  \"due_date\": \"\",\n  \"exchange_rate\": \"0.0000\",\n  \"external_ref\": \"\",\n  \"lines\": [\n    {\n      \"description\": \"\",\n      \"discount\": \"0.0000\",\n      \"product_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"quantity\": \"0.0000\",\n      \"service_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"tax_type_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"taxes\": [],\n      \"unit_price\": \"0.0000\",\n      \"variant_id\": \"00000000-0000-0000-0000-000000000000\",\n      \"warehouse_id\": \"00000000-0000-0000-0000-000000000000\"\n    }\n  ],\n  \"notes\": \"\",\n  \"order_date\": \"\",\n  \"reference_number\": \"\",\n  \"warehouse_id\": \"00000000-0000-0000-0000-000000000000\"\n}"
            },
            "description": "Requires the integration's role to hold: `sales.invoices.create`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-orders"
              ],
              "raw": "{{base_url}}/sales-orders"
            }
          }
        },
        {
          "name": "Invoice the sales order of this integration's reference",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"e_invoice\": {\n    \"internet_sale\": {\n      \"carrier_name\": \"\",\n      \"carrier_tax_id\": \"\",\n      \"payment_agent\": \"\",\n      \"payment_date\": \"\",\n      \"payment_description\": \"\",\n      \"payment_method\": \"\",\n      \"shipment_date\": \"\",\n      \"web_address\": \"\"\n    }\n  },\n  \"invoice_date\": \"\",\n  \"notes\": \"\",\n  \"settlement\": {\n    \"tenders\": [\n      {\n        \"amount\": null,\n        \"due_date\": null,\n        \"fund_id\": null,\n        \"payment_method_id\": null\n      }\n    ]\n  }\n}"
            },
            "description": "Requires the integration's role to hold: `sales.invoices.create`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-orders",
                "by-ref",
                ":external_ref",
                "invoice"
              ],
              "raw": "{{base_url}}/sales-orders/by-ref/:external_ref/invoice",
              "variable": [
                {
                  "key": "external_ref",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Get a sales order (invoiced and remaining per line, the sales made from it)",
          "request": {
            "description": "Requires the integration's role to hold: `sales.invoices.view`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-orders",
                ":id"
              ],
              "raw": "{{base_url}}/sales-orders/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Cancel a sales order with nothing invoiced (a shop order abandoned); idempotent",
          "request": {
            "description": "Requires the integration's role to hold: `sales.invoices.edit`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-orders",
                ":id",
                "cancel"
              ],
              "raw": "{{base_url}}/sales-orders/:id/cancel",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Invoice the sales order (a shop order paid): a sale of every remaining line at the order's prices",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"e_invoice\": {\n    \"internet_sale\": {\n      \"carrier_name\": \"\",\n      \"carrier_tax_id\": \"\",\n      \"payment_agent\": \"\",\n      \"payment_date\": \"\",\n      \"payment_description\": \"\",\n      \"payment_method\": \"\",\n      \"shipment_date\": \"\",\n      \"web_address\": \"\"\n    }\n  },\n  \"invoice_date\": \"\",\n  \"notes\": \"\",\n  \"settlement\": {\n    \"tenders\": [\n      {\n        \"amount\": null,\n        \"due_date\": null,\n        \"fund_id\": null,\n        \"payment_method_id\": null\n      }\n    ]\n  }\n}"
            },
            "description": "Requires the integration's role to hold: `sales.invoices.create`. Needs the organisation's `sales` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "sales-orders",
                ":id",
                "invoice"
              ],
              "raw": "{{base_url}}/sales-orders/:id/invoice",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        }
      ],
      "name": "Sales orders"
    },
    {
      "item": [
        {
          "name": "Find the record of a reference",
          "request": {
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "external-refs"
              ],
              "query": [
                {
                  "description": "customer, supplier, product, product_variant, service, sales_invoice, sales_order, purchase_invoice, income_slip or expense_slip",
                  "disabled": true,
                  "key": "entity_type",
                  "value": ""
                },
                {
                  "description": "the reference",
                  "disabled": true,
                  "key": "external_ref",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/external-refs"
            }
          }
        },
        {
          "name": "Pair an existing record with a reference",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"entity_id\": \"00000000-0000-0000-0000-000000000000\"\n}"
            },
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "PUT",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "external-refs",
                ":entity_type",
                ":external_ref"
              ],
              "raw": "{{base_url}}/external-refs/:entity_type/:external_ref",
              "variable": [
                {
                  "key": "entity_type",
                  "value": ""
                },
                {
                  "key": "external_ref",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Unpair a reference (the record stays)",
          "request": {
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "DELETE",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "external-refs",
                ":entity_type",
                ":external_ref"
              ],
              "raw": "{{base_url}}/external-refs/:entity_type/:external_ref",
              "variable": [
                {
                  "key": "entity_type",
                  "value": ""
                },
                {
                  "key": "external_ref",
                  "value": ""
                }
              ]
            }
          }
        }
      ],
      "name": "External references"
    },
    {
      "item": [
        {
          "name": "Delivery log (30 days)",
          "request": {
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhook-deliveries"
              ],
              "query": [
                {
                  "description": "page number, from 1",
                  "disabled": true,
                  "key": "page",
                  "value": ""
                },
                {
                  "description": "page size, 1 to 100 (default 25)",
                  "disabled": true,
                  "key": "per_page",
                  "value": ""
                },
                {
                  "description": "UUID",
                  "disabled": true,
                  "key": "endpoint_id",
                  "value": ""
                },
                {
                  "description": "pending, failed, delivered or gave_up",
                  "disabled": true,
                  "key": "state",
                  "value": ""
                }
              ],
              "raw": "{{base_url}}/webhook-deliveries"
            }
          }
        },
        {
          "name": "Deliver again",
          "request": {
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhook-deliveries",
                ":id",
                "redeliver"
              ],
              "raw": "{{base_url}}/webhook-deliveries/:id/redeliver",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "This integration's webhook endpoints",
          "request": {
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhook-endpoints"
              ],
              "raw": "{{base_url}}/webhook-endpoints"
            }
          }
        },
        {
          "name": "Register an endpoint (the signing secret is shown once)",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"description\": \"\",\n  \"events\": [\n    \"\"\n  ],\n  \"url\": \"\"\n}"
            },
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhook-endpoints"
              ],
              "raw": "{{base_url}}/webhook-endpoints"
            }
          }
        },
        {
          "name": "Change an endpoint",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"description\": \"\",\n  \"events\": [\n    \"\"\n  ],\n  \"is_active\": false,\n  \"url\": \"\"\n}"
            },
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "PATCH",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhook-endpoints",
                ":id"
              ],
              "raw": "{{base_url}}/webhook-endpoints/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Remove an endpoint",
          "request": {
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "DELETE",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhook-endpoints",
                ":id"
              ],
              "raw": "{{base_url}}/webhook-endpoints/:id",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "New signing secret (the previous one stays valid 24 h)",
          "request": {
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhook-endpoints",
                ":id",
                "rotate-secret"
              ],
              "raw": "{{base_url}}/webhook-endpoints/:id/rotate-secret",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Send a webhook.test event",
          "request": {
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "POST",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "webhook-endpoints",
                ":id",
                "test"
              ],
              "raw": "{{base_url}}/webhook-endpoints/:id/test",
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          }
        }
      ],
      "name": "Webhooks"
    },
    {
      "item": [
        {
          "name": "Report a refused or failed shop action (needs attention); params never hold shopper personal data",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"attempts\": 0,\n  \"code\": \"\",\n  \"kind\": \"\",\n  \"params\": {},\n  \"woo_id\": 0\n}"
            },
            "description": "Needs the organisation's `ecommerce` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "PUT",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "connector",
                "issues",
                ":key"
              ],
              "raw": "{{base_url}}/connector/issues/:key",
              "variable": [
                {
                  "key": "key",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Clear an issue once its action succeeded",
          "request": {
            "description": "Needs the organisation's `ecommerce` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "DELETE",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "connector",
                "issues",
                ":key"
              ],
              "raw": "{{base_url}}/connector/issues/:key",
              "variable": [
                {
                  "key": "key",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Report shop products / variations that matched nothing (one batch, up to 500), and remove the ones no longer unmatched",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"items\": [\n    {\n      \"gtin\": \"\",\n      \"name\": \"\",\n      \"sku\": \"\",\n      \"woo_id\": 0,\n      \"woo_parent_id\": 0\n    }\n  ],\n  \"removed_woo_ids\": [\n    0\n  ]\n}"
            },
            "description": "Needs the organisation's `ecommerce` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "PUT",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "connector",
                "remote-items"
              ],
              "raw": "{{base_url}}/connector/remote-items"
            }
          }
        },
        {
          "name": "The connection's settings the merchant keeps in the app (warehouses, buffer, rounding, gateway and service mappings)",
          "request": {
            "description": "Needs the organisation's `ecommerce` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              }
            ],
            "method": "GET",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "connector",
                "settings"
              ],
              "raw": "{{base_url}}/connector/settings"
            }
          }
        },
        {
          "name": "Report the connected shop (versions, time zone, currency, gateways, shipping methods, fees); mappings keep their targets",
          "request": {
            "body": {
              "mode": "raw",
              "options": {
                "raw": {
                  "language": "json"
                }
              },
              "raw": "{\n  \"fees\": [\n    {\n      \"enabled\": false,\n      \"key\": \"\",\n      \"title\": \"\"\n    }\n  ],\n  \"gateways\": [\n    {\n      \"enabled\": false,\n      \"key\": \"\",\n      \"title\": \"\"\n    }\n  ],\n  \"plugin_version\": \"\",\n  \"price_decimals\": 0,\n  \"prices_include_tax\": false,\n  \"shipping_methods\": [\n    {\n      \"enabled\": false,\n      \"key\": \"\",\n      \"title\": \"\"\n    }\n  ],\n  \"site_url\": \"\",\n  \"store_currency\": \"\",\n  \"wc_version\": \"\",\n  \"wp_timezone\": \"\",\n  \"wp_version\": \"\"\n}"
            },
            "description": "Needs the organisation's `ecommerce` module.",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{api_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "method": "PUT",
            "url": {
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "connector",
                "site"
              ],
              "raw": "{{base_url}}/connector/site"
            }
          }
        }
      ],
      "name": "WooCommerce connector"
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "https://stg-app.pazarcloud.ir/api/public/v1"
    },
    {
      "key": "api_key",
      "value": ""
    }
  ]
}
