{"swagger":"2.0","info":{"version":"v3","title":"Edara API 3.0","description":"Welcome to the Edara API. This reference covers the V3 endpoints that\r\nback the Edara platform.\r\n\r\nThe current server is shown in the **Server** panel on the right. All V3\r\nendpoints sit under that host scoped by the version segment:\r\n\r\n```\r\n{server}/v3/...\r\n```\r\n\r\n## Authentication\r\n\r\nEvery public endpoint requires a Bearer token sent in the `Authorization`\r\nheader:\r\n\r\n```\r\nAuthorization: Bearer {token}\r\n```\r\n\r\nEdara accepts two token formats on the same header\r\n- **JWT**.\r\n- **Edara-issued bearer token**.\r\n\r\n### Getting a token\r\n\r\nTokens are not issued from this API. To create an Edara-issued bearer\r\ntoken tied to a specific set of capabilities:\r\n\r\n1. Sign in to your Edara portal as a user that can manage integrations.\r\n2. Open **Data → Integration**.\r\n3. Click **MANAGE** on the **Rest APIs** tile (\"Build your own\r\n   integration\").\r\n4. Click **ADD NEW USER** in the top right.\r\n5. Give the API user a **Name** that identifies the integration.\r\n6. Under **Roles**, tick every action the integration is allowed to perform\r\n   (each role maps to a specific endpoint capability — pick the smallest\r\n   set that covers your use case).\r\n7. Click **SAVE**.\r\n\r\nThe new entry appears in the list with an **Authorization token** column\r\nthat already contains the full header value (`Bearer …`). Copy it as-is\r\nand send it on the `Authorization` header of every request.\r\n\r\nThe token grants exactly the roles you selected — adding or removing\r\npermissions later updates the same row without rotating the token.\r\n\r\n## Tenant header\r\n\r\nMost requests need to identify which tenant they target. The header is:\r\n\r\n```\r\nTenantId: {your-tenant-id}\r\n```\r\n\r\nJWT requests always need this header — Edara-issued bearer tokens don't need it. If a JWT request omits the header, it fails with\r\n`401 Unauthorized`.\r\n\r\n## Pagination\r\n\r\nList endpoints use offset/limit query parameters:\r\n\r\n| Parameter | Default | Maximum | Description                                |\r\n|-----------|---------|---------|--------------------------------------------|\r\n| `offset`  | `0`     | —       | Number of items to skip.                   |\r\n| `limit`   | `100`   | `1000`  | Maximum number of items in the response.   |\r\n\r\nResponses include the page plus enough metadata to fetch the next one:\r\n\r\n```json\r\n{\r\n  \"items\": [ ... ],\r\n  \"totalCount\": 142,\r\n  \"page\": 2,\r\n  \"pageSize\": 100,\r\n  \"totalPages\": 2\r\n}\r\n```\r\n\r\n`page` is 1-based and is derived from `offset / limit + 1`; `pageSize`\r\nmirrors the effective `limit` applied to the request.\r\n\r\n## Error model\r\n\r\nAll non-2xx responses follow [RFC 7807 Problem Details](https://www.rfc-editor.org/rfc/rfc7807)\r\nwith `Content-Type: application/problem+json`.\r\n\r\nA typical validation failure:\r\n\r\n```json\r\n{\r\n  \"type\": \"https://tools.ietf.org/html/rfc7231#section-6.5.1\",\r\n  \"title\": \"Bad Request\",\r\n  \"status\": 400,\r\n  \"detail\": \"Invalid input or validation failure.\",\r\n  \"instance\": \"/v3/customers\",\r\n  \"traceId\": \"0f3a8c0a4e0c4b8d9f1a2b3c4d5e6f70\",\r\n  \"errors\": {\r\n    \"fieldName\": [ \"The provided value is invalid.\" ]\r\n  }\r\n}\r\n```\r\n\r\nEndpoints that have domain-specific failure modes additionally surface a\r\n**Business Errors** card listing the deterministic error codes you can\r\nreceive (e.g. `409 Conflict — DuplicatedCode`, carried on the `errorCode`\r\nproperty).\r\n\r\n## Permissions\r\n\r\nEndpoints that demand a specific permission show a `Permission: {scope}`\r\ntag above the operation title. The scope follows a `verb:resource` shape\r\n(for example `create:customer`). A user without the\r\nrequired scope receives `403 Forbidden`.\r\n\r\n## Conventions\r\n\r\n- Request and response bodies use camelCase property names.\r\n\r\n## Rate Limits\r\n\r\nThis API limits how many requests a single client may make. When you exceed a limit you receive `HTTP 429 Too Many Requests` with a `Retry-After` header indicating how many seconds to wait before retrying. Every response (success or 429) carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`, and `X-RateLimit-Scope` headers reflecting the cap closest to tripping, so well-behaved clients can self-throttle.\r\n\r\nThe public caps that apply to any caller are:\r\n\r\n- **Per user** on any endpoint — 5 / second · 250 / minute · 5,500 / hour\r\n"},"host":"edara-api.edara.io","schemes":["https"],"paths":{"/v3/accounts":{"get":{"tags":["Accounts"],"summary":"Lists accounts.","operationId":"GetAccounts","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"classificationCode","in":"query","description":"The classification code filter.","required":false,"type":"string"},{"name":"type","in":"query","description":"The account type filter.","required":false,"type":"string","enum":["RealizedGainExchange","RealizedLossExchange","UnrealizedGainExchange","UnrealizedLossExchange","Cash","AccountsReceivable","AccountsPayable","Sales","ServicesSales","SalesReturns","Purchase","PurchaseReturns","NotesReceivable","NotesPayable","Inventory","COGS","SalesDiscount","OtherRevenue","Waste","Bank","RetainedEarning","SalesTax","WithholdingTax","PurchaseDiscount","Adjustment","AddedTax","EndingInventory","PurchaseAddedTax"]},{"name":"relatedCustomerCode","in":"query","description":"The related customer code filter.","required":false,"type":"string"},{"name":"customerExternalId","in":"query","description":"The related customer external-id filter.","required":false,"type":"string"},{"name":"relatedCustomerId","in":"query","description":"The related customer identifier filter.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"description","in":"query","description":"The account description filter.","required":false,"type":"string"},{"name":"updateDate","in":"query","description":"The updated-after filter.","required":false,"type":"string","format":"date-time"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of accounts.","schema":{"$ref":"#/definitions/PagedResult[AccountResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/accounts","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/accounts"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/accounts"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/accounts"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/accounts","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:account","position":"before"}]}},"/v3/accounts/nodes":{"get":{"tags":["Accounts"],"summary":"Lists leaf account nodes.","operationId":"GetAccountNodes","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"type","in":"query","description":"The account node type.","required":true,"type":"string","enum":["RealizedGainExchange","RealizedLossExchange","UnrealizedGainExchange","UnrealizedLossExchange","Cash","AccountsReceivable","AccountsPayable","Sales","ServicesSales","SalesReturns","Purchase","PurchaseReturns","NotesReceivable","NotesPayable","Inventory","COGS","SalesDiscount","OtherRevenue","Waste","Bank","RetainedEarning","SalesTax","WithholdingTax","PurchaseDiscount","Adjustment","AddedTax","EndingInventory","PurchaseAddedTax"]},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Leaf account nodes.","schema":{"type":"array","items":{"$ref":"#/definitions/AccountNodeResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/accounts/nodes","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/accounts/nodes"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/accounts/nodes"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/accounts/nodes"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/accounts/nodes","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:account","position":"before"}]}},"/v3/accounts/{id}":{"get":{"tags":["Accounts"],"summary":"Gets an account by id.","operationId":"GetAccountById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The account id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The account.","schema":{"$ref":"#/definitions/AccountResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/accounts/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/accounts/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/accounts/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/accounts/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/accounts/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/accounts/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:account","position":"before"}]}},"/v3/accounts/{id}/balance":{"get":{"tags":["Accounts"],"summary":"Gets account balance.","operationId":"GetAccountBalance","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The account id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"date","in":"query","description":"The balance date.","required":false,"type":"string","format":"date-time"},{"name":"costCenterId","in":"query","description":"The cost-center filter.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"customerId","in":"query","description":"The customer filter.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"supplierId","in":"query","description":"The supplier filter.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"isPostedOnly","in":"query","description":"Whether only posted transactions are included.","required":false,"type":"boolean","default":true},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Account balance.","schema":{"$ref":"#/definitions/AccountBalanceResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/accounts/{id}/balance","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/accounts/{id}/balance"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/accounts/{id}/balance"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/accounts/{id}/balance"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/accounts/{id}/balance"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/accounts/{id}/balance","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:account-balance","position":"before"}]}},"/v3/brands":{"get":{"tags":["Brands"],"summary":"Lists brands.","operationId":"GetBrands","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"name","in":"query","description":"Brand name filter.","required":false,"type":"string"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of brands.","schema":{"$ref":"#/definitions/PagedResult[BrandResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/brands","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/brands"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/brands"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/brands"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/brands","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:brand","position":"before"}]},"post":{"tags":["Brands"],"summary":"Creates a brand.","operationId":"CreateBrand","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The brand to create.","required":true,"schema":{"$ref":"#/definitions/BrandUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/brands"}}},"201":{"description":"Brand created.","schema":{"$ref":"#/definitions/BrandResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/brands","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/brands"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/brands"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/brands","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/brands","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:brand","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another brand already uses the same name."},{"code":"NameContainsInvalidSpecialCharacters","description":"The brand name contains unsupported special characters such as quotes, pipes, commas, backslashes, or angle brackets."}]}},"/v3/brands/{id}":{"get":{"tags":["Brands"],"summary":"Gets a brand by id.","operationId":"GetBrandById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The brand id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The brand.","schema":{"$ref":"#/definitions/BrandResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/brands/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/brands/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/brands/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/brands/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/brands/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/brands/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:brand","position":"before"}]}},"/v3/bundles":{"get":{"tags":["Bundles"],"summary":"Lists bundles.","operationId":"GetBundles","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"updateDate","in":"query","description":"Returns only bundles inserted or updated at or after this timestamp.","required":false,"type":"string","format":"date-time"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of bundles.","schema":{"$ref":"#/definitions/PagedResult[BundleResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/bundles","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/bundles"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/bundles"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/bundles"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/bundles","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:bundle","position":"before"}]},"post":{"tags":["Bundles"],"summary":"Creates a bundle.","operationId":"CreateBundle","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The bundle to create.","required":true,"schema":{"$ref":"#/definitions/CreateBundleRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/bundles"}}},"201":{"description":"Bundle created.","schema":{"$ref":"#/definitions/BundleResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/bundles","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/bundles"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/bundles"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/bundles","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/bundles","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:bundle","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another bundle already uses the same description."}]}},"/v3/bundles/{id}":{"get":{"tags":["Bundles"],"summary":"Gets a bundle by id.","operationId":"GetBundleById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The bundle id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The bundle.","schema":{"$ref":"#/definitions/BundleResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/bundles/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/bundles/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/bundles/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/bundles/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/bundles/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/bundles/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:bundle","position":"before"}]},"delete":{"tags":["Bundles"],"summary":"Deletes a bundle.","operationId":"DeleteBundleById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The bundle id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/bundles/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/bundles/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/bundles/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/bundles/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/bundles/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/bundles/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/bundles/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:bundle","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The bundle is referenced by existing documents or related records."}]}},"/v3/cash-in":{"post":{"tags":["Cash In/Out"],"summary":"Records a cash-in.","operationId":"CreateCashIn","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The cash-in request.","required":true,"schema":{"$ref":"#/definitions/CashTransactionRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/cash-in"}}},"201":{"description":"Cash transaction created.","schema":{"$ref":"#/definitions/CashTransactionResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/cash-in","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/cash-in"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/cash-in"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/cash-in","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/cash-in","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:cash-transaction","position":"before"}],"x-business-errors":[{"code":"CannotInsertDocumentBeforeClosingDate","description":"The document date is before the closing date."},{"code":"CK_NoCustomerOrSupplierSelectedforAccount","description":"The selected account requires a linked customer or supplier, but none was provided."},{"code":"CK_NocustomerSelectedforAR","description":"The selected receivable account requires a linked customer, but none was provided."},{"code":"CK_NoSupplierSelectedforAP","description":"The selected payable account requires a linked supplier, but none was provided."},{"code":"DocumentmainAccountHasNoAlias","description":"The selected main account does not have the cash-account alias required by this document type."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate has too many decimal places."},{"code":"PreventSaveDocumentsInFutureDate","description":"The document date is in the future."}]}},"/v3/cash-out":{"post":{"tags":["Cash In/Out"],"summary":"Records a cash-out.","operationId":"CreateCashOut","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The cash-out request.","required":true,"schema":{"$ref":"#/definitions/CashTransactionRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/cash-out"}}},"201":{"description":"Cash transaction created.","schema":{"$ref":"#/definitions/CashTransactionResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/cash-out","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/cash-out"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/cash-out"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/cash-out","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/cash-out","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:cash-transaction","position":"before"}],"x-business-errors":[{"code":"CannotInsertDocumentBeforeClosingDate","description":"The document date is before the closing date."},{"code":"CK_NoCustomerOrSupplierSelectedforAccount","description":"The selected account requires a linked customer or supplier, but none was provided."},{"code":"CK_NocustomerSelectedforAR","description":"The selected receivable account requires a linked customer, but none was provided."},{"code":"CK_NoSupplierSelectedforAP","description":"The selected payable account requires a linked supplier, but none was provided."},{"code":"DocumentmainAccountHasNoAlias","description":"The selected main account does not have the cash-account alias required by this document type."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate has too many decimal places."},{"code":"PreventSaveDocumentsInFutureDate","description":"The document date is in the future."}]}},"/v3/cities":{"get":{"tags":["Cities"],"summary":"Lists cities.","operationId":"GetCities","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"name","in":"query","description":"Optional city name filter.","required":false,"type":"string"},{"name":"countryId","in":"query","description":"Optional country identifier filter.","required":false,"type":"integer","format":"int32"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of cities.","schema":{"$ref":"#/definitions/PagedResult[CityResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/cities","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/cities"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/cities"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/cities"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/cities","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:city","position":"before"}]},"post":{"tags":["Cities"],"summary":"Creates a city.","operationId":"CreateCity","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The city to create.","required":true,"schema":{"$ref":"#/definitions/CityUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/cities"}}},"201":{"description":"The created city.","schema":{"$ref":"#/definitions/CityResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/cities","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/cities"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/cities"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/cities","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/cities","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:city","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another city already uses the same name."}]}},"/v3/cities/{id}":{"get":{"tags":["Cities"],"summary":"Gets a city by id.","operationId":"GetCityById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The city id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The city.","schema":{"$ref":"#/definitions/CityResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/cities/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/cities/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/cities/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/cities/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/cities/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/cities/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:city","position":"before"}]},"put":{"tags":["Cities"],"summary":"Updates a city.","operationId":"UpdateCity","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The city id.","required":true,"type":"integer","format":"int32"},{"name":"request","in":"body","description":"The updated city values.","required":true,"schema":{"$ref":"#/definitions/CityUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated city.","schema":{"$ref":"#/definitions/CityResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/cities/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/cities/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/cities/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/cities/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/cities/{id}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/cities/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/cities/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:city","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another city already uses the same name."}]},"delete":{"tags":["Cities"],"summary":"Deletes a city.","operationId":"DeleteCity","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The city id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/cities/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/cities/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/cities/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/cities/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/cities/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/cities/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/cities/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:city","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The city is still referenced by related records and cannot be deleted."}]}},"/v3/classifications/common":{"get":{"tags":["Classifications"],"summary":"Lists common classifications.","operationId":"GetCommonClassifications","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"description","in":"query","description":"Optional description filter; exact match when supplied.","required":false,"type":"string"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of common classifications.","schema":{"$ref":"#/definitions/PagedResult[CommonClassificationResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/classifications/common","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/classifications/common"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/classifications/common"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/classifications/common"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/classifications/common","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:classification","position":"before"}]}},"/v3/classifications/common/{id}":{"get":{"tags":["Classifications"],"summary":"Gets a common classification by id.","operationId":"GetCommonClassificationById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The classification id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The common classification.","schema":{"$ref":"#/definitions/CommonClassificationResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/classifications/common/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/classifications/common/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/classifications/common/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/classifications/common/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/classifications/common/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/classifications/common/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:classification","position":"before"}]}},"/v3/classifications/stock-items":{"get":{"tags":["Classifications"],"summary":"Lists stock-item classifications.","operationId":"GetStockItemClassifications","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of stock-item classifications.","schema":{"$ref":"#/definitions/PagedResult[StockItemClassificationResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/classifications/stock-items","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/classifications/stock-items"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/classifications/stock-items"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/classifications/stock-items"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/classifications/stock-items","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:classification","position":"before"}]},"post":{"tags":["Classifications"],"summary":"Creates a stock-item classification.","operationId":"CreateStockItemClassification","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The classification to create.","required":true,"schema":{"$ref":"#/definitions/StockItemClassificationUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/classifications/stock-items"}}},"201":{"description":"Classification created.","schema":{"$ref":"#/definitions/StockItemClassificationResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/classifications/stock-items","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/classifications/stock-items"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/classifications/stock-items"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/classifications/stock-items","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/classifications/stock-items","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:classification","position":"before"}],"x-business-errors":[{"code":"ClassificationParentIsLeafWithStockItems","description":"The parent classification is a leaf containing stock items; pick a non-leaf parent."},{"code":"DupplicatedCode","description":"Another stock-item classification already uses the same code."},{"code":"DupplicatedName","description":"Another stock-item classification already uses the same description."}]}},"/v3/classifications/stock-items/tree/{userId}":{"get":{"tags":["Classifications"],"summary":"Gets the stock-item classification tree for a user.","operationId":"GetStockItemClassificationTree","consumes":[],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"The user id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Stock-item classification tree.","schema":{"type":"array","items":{"$ref":"#/definitions/StockItemClassificationTreeResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/classifications/stock-items/tree/{userId}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/classifications/stock-items/tree/{userId}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/classifications/stock-items/tree/{userId}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/classifications/stock-items/tree/{userId}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/classifications/stock-items/tree/{userId}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/classifications/stock-items/tree/{userId}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:classification","position":"before"}]}},"/v3/common/adjust-invoiced-quantity":{"put":{"tags":["Common"],"summary":"Adjusts the Invoiced Quantity on one or more Source Document Lines belonging to the same Source Document.","description":"Adds each line's quantityAdjustment onto InvoicedQuantity on Sales.DocumentDetails (SO/SR) or\r\nWarehouse.WHWorkOrderDetails (IO/RR/RS/IR). Any other sourceDocumentType is refused.","operationId":"AdjustInvoicedQuantity","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The source document and line adjustments to apply.","required":true,"schema":{"$ref":"#/definitions/AdjustInvoicedQuantityRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Lines updated.","schema":{"$ref":"#/definitions/AdjustInvoicedQuantityResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/common/adjust-invoiced-quantity","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/common/adjust-invoiced-quantity"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/common/adjust-invoiced-quantity"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/common/adjust-invoiced-quantity","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/common/adjust-invoiced-quantity"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/common/adjust-invoiced-quantity","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:invoiced-quantity","position":"before"}],"x-business-errors":[{"code":"DocumentNotApproved","description":"Source Document is not Approved."},{"code":"DuplicateSourceLineId","description":"sourceLineId must be distinct across lines."},{"code":"InvalidQuantityAdjustment","description":"Quantity Adjustment is invalid."},{"code":"InvalidSourceDocumentType","description":"Supported values are SO, SR, IO, RR, RS, and IR."},{"code":"InvoicedQuantityExceeded","description":"Resulting Invoiced Quantity exceeds the document line quantity."},{"code":"InvoicingModeNotSupported","description":"Tenant is not operating in Advanced Mode."},{"code":"NegativeInvoicedQuantity","description":"Resulting Invoiced Quantity would become negative."},{"code":"RelatedDocumentExistsSO","description":"Source Document Line is linked to a related SO document and cannot be adjusted directly."},{"code":"RelatedDocumentExistsSR","description":"Source Document Line is linked to a related SR document and cannot be adjusted directly."},{"code":"RelatedDocumentExistsPO","description":"Source Document Line is linked to a related PO document and cannot be adjusted directly."},{"code":"RelatedDocumentExistsPR","description":"Source Document Line is linked to a related PR document and cannot be adjusted directly."},{"code":"SourceDocumentNotFound","description":"Source Document does not exist."},{"code":"SourceLineNotFound","description":"Source Document Line does not exist."}]}},"/v3/common/convert-money-to-arabic-words":{"get":{"tags":["Common"],"summary":"Converts money to Arabic words.","operationId":"ConvertMoneyToArabicWords","consumes":[],"produces":["application/json"],"parameters":[{"name":"numberValue","in":"query","description":"The monetary amount to convert.","required":true,"type":"number","format":"double"},{"name":"currency","in":"query","description":"The currency name (e.g. جنيه).","required":true,"type":"string"},{"name":"currencyFraction","in":"query","description":"The currency fraction name (e.g. قرش).","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The amount in Arabic words.","schema":{"type":"string"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/common/convert-money-to-arabic-words","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/common/convert-money-to-arabic-words"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/common/convert-money-to-arabic-words"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/common/convert-money-to-arabic-words"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/common/convert-money-to-arabic-words","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:common-utility","position":"before"}]}},"/v3/common/convert-money-to-english-words":{"get":{"tags":["Common"],"summary":"Converts money to English words.","operationId":"ConvertMoneyToEnglishWords","consumes":[],"produces":["application/json"],"parameters":[{"name":"numberValue","in":"query","description":"The monetary amount to convert.","required":true,"type":"number","format":"double"},{"name":"currency","in":"query","description":"The currency name (e.g. Pound).","required":true,"type":"string"},{"name":"currencyFraction","in":"query","description":"The currency fraction name (e.g. Piastre).","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The amount in English words.","schema":{"type":"string"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/common/convert-money-to-english-words","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/common/convert-money-to-english-words"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/common/convert-money-to-english-words"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/common/convert-money-to-english-words"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/common/convert-money-to-english-words","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:common-utility","position":"before"}]}},"/v3/common/files/{token}":{"get":{"tags":["Common"],"summary":"Resolves a file download token and redirects to the file.","operationId":"GetFile","consumes":[],"produces":[],"parameters":[{"name":"token","in":"path","description":"The file download token.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"204":{"description":"No Content"},"302":{"description":"Redirects to the signed file URL."},"404":{"description":"The token is invalid or expired.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/common/files/{token}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/common/files/{token}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/common/files/{token}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/common/files/{token}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/common/files/{token}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/common/files/{token}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/common/files/{token}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:common-utility","position":"before"}],"x-business-errors":[{"code":"ExpiredLink","description":"The token has expired and the request is redirected to the expired-link page."},{"code":"InvalidLink","description":"The token is missing or malformed."}]}},"/v3/cost-centers":{"get":{"tags":["Cost Centers"],"summary":"Lists cost centers.","operationId":"GetCostCenters","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of cost centers.","schema":{"$ref":"#/definitions/PagedResult[CostCenterResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/cost-centers","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/cost-centers"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/cost-centers"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/cost-centers"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/cost-centers","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:cost-center","position":"before"}]}},"/v3/cost-centers/{id}":{"get":{"tags":["Cost Centers"],"summary":"Gets a cost center by id.","operationId":"GetCostCenterById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The cost center id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The cost center.","schema":{"$ref":"#/definitions/CostCenterResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/cost-centers/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/cost-centers/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/cost-centers/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/cost-centers/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/cost-centers/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/cost-centers/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:cost-center","position":"before"}]}},"/v3/countries":{"get":{"tags":["Countries"],"summary":"Lists countries.","operationId":"GetCountries","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"name","in":"query","description":"Optional exact country name filter.","required":false,"type":"string"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of countries.","schema":{"$ref":"#/definitions/PagedResult[CountryResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/countries","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/countries"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/countries"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/countries"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/countries","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:country","position":"before"}]},"post":{"tags":["Countries"],"summary":"Creates a country.","operationId":"CreateCountry","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The country to create.","required":true,"schema":{"$ref":"#/definitions/CountryUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/countries"}}},"201":{"description":"The created country.","schema":{"$ref":"#/definitions/CountryResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/countries","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/countries"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/countries"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/countries","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/countries","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:country","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another country already uses the same name."}]}},"/v3/countries/{id}":{"get":{"tags":["Countries"],"summary":"Gets a country by id.","operationId":"GetCountryById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The country id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The country.","schema":{"$ref":"#/definitions/CountryResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/countries/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/countries/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/countries/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/countries/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/countries/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/countries/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:country","position":"before"}]},"put":{"tags":["Countries"],"summary":"Updates a country.","operationId":"UpdateCountry","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The country id.","required":true,"type":"integer","format":"int32"},{"name":"request","in":"body","description":"The updated country values.","required":true,"schema":{"$ref":"#/definitions/CountryUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated country.","schema":{"$ref":"#/definitions/CountryResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/countries/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/countries/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/countries/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/countries/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/countries/{id}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/countries/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/countries/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:country","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another country already uses the same name."}]},"delete":{"tags":["Countries"],"summary":"Deletes a country.","operationId":"DeleteCountry","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The country id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/countries/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/countries/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/countries/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/countries/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/countries/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/countries/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/countries/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:country","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The country is still referenced by related records and cannot be deleted."}]}},"/v3/currencies":{"get":{"tags":["Currencies"],"summary":"Lists currencies.","operationId":"GetCurrencies","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"code","in":"query","description":"The currency code filter.","required":false,"type":"string"},{"name":"updateDate","in":"query","description":"The updated-after filter.","required":false,"type":"string","format":"date-time"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of currencies.","schema":{"$ref":"#/definitions/PagedResult[CurrencyResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/currencies","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/currencies"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/currencies"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/currencies"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/currencies","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:currency","position":"before"}]},"post":{"tags":["Currencies"],"summary":"Creates a currency.","description":"No uniqueness is enforced on currency symbol / international code / description (matches legacy V2 behavior).","operationId":"CreateCurrency","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The currency to create.","required":true,"schema":{"$ref":"#/definitions/CurrencyUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/currencies"}}},"201":{"description":"Currency created.","schema":{"$ref":"#/definitions/CurrencyResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/currencies","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/currencies"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/currencies"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/currencies","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/currencies","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:currency","position":"before"}],"x-business-errors":[{"code":"DupplicatedCode","description":"Another currency already uses the same code."}]}},"/v3/currencies/code/{code}":{"put":{"tags":["Currencies"],"summary":"Updates a currency by code.","description":"No uniqueness is enforced on currency symbol / international code / description (matches legacy V2 behavior).","operationId":"UpdateCurrencyByCode","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The currency code.","required":true,"type":"string"},{"name":"request","in":"body","description":"The updated currency values.","required":true,"schema":{"$ref":"#/definitions/CurrencyUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated currency.","schema":{"$ref":"#/definitions/CurrencyResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/currencies/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/currencies/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/currencies/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/currencies/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/currencies/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/currencies/code/{code}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/currencies/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:currency","position":"before"}],"x-business-errors":[{"code":"DupplicatedCode","description":"Another currency already uses the same code."}]},"delete":{"tags":["Currencies"],"summary":"Deletes a currency by code.","operationId":"DeleteCurrencyByCode","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The currency code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/currencies/code/{code}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/currencies/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/currencies/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/currencies/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/currencies/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/currencies/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/currencies/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:currency","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The currency is referenced by existing documents or related records."}]}},"/v3/currencies/{id}":{"get":{"tags":["Currencies"],"summary":"Gets a currency by id.","operationId":"GetCurrencyById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The currency id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The currency.","schema":{"$ref":"#/definitions/CurrencyResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/currencies/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/currencies/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/currencies/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/currencies/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/currencies/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/currencies/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:currency","position":"before"}]},"put":{"tags":["Currencies"],"summary":"Updates a currency by id.","description":"No uniqueness is enforced on currency symbol / international code / description (matches legacy V2 behavior).","operationId":"UpdateCurrency","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The currency id.","required":true,"type":"integer","format":"int32"},{"name":"request","in":"body","description":"The updated currency values.","required":true,"schema":{"$ref":"#/definitions/CurrencyUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated currency.","schema":{"$ref":"#/definitions/CurrencyResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/currencies/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/currencies/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/currencies/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/currencies/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/currencies/{id}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/currencies/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/currencies/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:currency","position":"before"}],"x-business-errors":[{"code":"DupplicatedCode","description":"Another currency already uses the same code."}]},"delete":{"tags":["Currencies"],"summary":"Deletes a currency by id.","operationId":"DeleteCurrency","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The currency id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/currencies/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/currencies/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/currencies/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/currencies/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/currencies/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/currencies/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/currencies/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:currency","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The currency is referenced by existing documents or related records."}]}},"/v3/customers":{"get":{"tags":["Customers"],"summary":"Lists customers.","operationId":"GetCustomers","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"code","in":"query","description":"CONTAINS filter on code.","required":false,"type":"string","maxLength":50,"minLength":0},{"name":"name","in":"query","description":"CONTAINS filter on name.","required":false,"type":"string","maxLength":250,"minLength":0},{"name":"phone","in":"query","description":"CONTAINS filter on primary phone.","required":false,"type":"string","maxLength":50,"minLength":0},{"name":"mobile","in":"query","description":"CONTAINS filter on mobile.","required":false,"type":"string","maxLength":50,"minLength":0},{"name":"email","in":"query","description":"CONTAINS filter on email.","required":false,"type":"string","maxLength":250,"minLength":0},{"name":"externalId","in":"query","description":"CONTAINS filter on external id.","required":false,"type":"string","maxLength":50,"minLength":0},{"name":"updateDate","in":"query","description":"Returns records modified on or after this date (UTC, inclusive).","required":false,"type":"string","format":"date-time"},{"name":"search","in":"query","description":"Free-text search across name/code/phone/mobile/email. Takes precedence over individual filters.","required":false,"type":"string"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of customers.","schema":{"$ref":"#/definitions/PagedResult[CustomerResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:customer","position":"before"}]},"post":{"tags":["Customers"],"summary":"Creates a customer.","operationId":"CreateCustomer","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The customer to create.","required":true,"schema":{"$ref":"#/definitions/CustomerUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers"}}},"201":{"description":"Customer created.","schema":{"$ref":"#/definitions/CustomerResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/customers","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:customer","position":"before"}],"x-business-errors":[{"code":"CityNotFound","description":"A city with the specified identifier was not found."},{"code":"CountryNotFound","description":"A country with the specified identifier was not found."},{"code":"CustomerAddressMustContainBuildingNumber","description":"Address must include a building number."},{"code":"CustomerAddressMustHaveDistrict","description":"Address district is required."},{"code":"CustomerAddressRequired","description":"Customer addresses are required."},{"code":"CustomerCodeExists","description":"Another customer already uses the same code."},{"code":"CustomerCodeRequired","description":"Customer code is required."},{"code":"CustomerEmailExists","description":"Another customer already uses the same email."},{"code":"CustomerEmailRequired","description":"Customer email is required."},{"code":"CustomerMobileExists","description":"Another customer already uses the same mobile."},{"code":"CustomerMobileRequired","description":"Customer mobile is required."},{"code":"CustomerNameExists","description":"Another customer already uses the same name."},{"code":"CustomerNationalIDRequired","description":"Customer national identifier is required."},{"code":"DistrictNotFound","description":"A district with the specified identifier was not found."},{"code":"DuplicatedExternalId","description":"Another customer already uses the same external identifier."},{"code":"DupplicatedARAccount","description":"Another customer already uses the same accounting name."},{"code":"DupplicatedName","description":"Another customer already uses the same name."},{"code":"NationalIDExists","description":"Another customer already uses the same national identifier."},{"code":"NationalIDMustBeOfLength","description":"National identifier length is invalid."},{"code":"TaxRegisterationIDExists","description":"Another customer already uses the same tax registration identifier."},{"code":"TaxRegisterationIDMustBeOfLength","description":"Tax registration identifier length is invalid."},{"code":"TaxRegistrationIdRequired","description":"Customer tax registration identifier is required."}]}},"/v3/customers/batch":{"post":{"tags":["Customers"],"summary":"Creates customers in batch.","description":"See {M:Edara.API.Controllers.V3.Sales.CustomersController.CreateCustomer(Edara.API.DTOs.Sales.Customers.Requests.CustomerUpsertRequest,System.Threading.CancellationToken)} for the list of business errors that can be reported per item.","operationId":"CreateCustomersBatch","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"requests","in":"body","description":"The customers to create.","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/CustomerUpsertRequest"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Batch insert result.","schema":{"$ref":"#/definitions/BatchResult[CustomerResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/batch","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/batch"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/batch"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/customers/batch","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/batch"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/batch","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:customer","position":"before"}],"x-business-errors":[{"code":"CityNotFound","description":"A city with the specified identifier was not found."},{"code":"CountryNotFound","description":"A country with the specified identifier was not found."},{"code":"CustomerAddressMustContainBuildingNumber","description":"Address must include a building number."},{"code":"CustomerAddressMustHaveDistrict","description":"Address district is required."},{"code":"CustomerAddressRequired","description":"Customer addresses are required."},{"code":"CustomerCodeExists","description":"Another customer already uses the same code."},{"code":"CustomerCodeRequired","description":"Customer code is required."},{"code":"CustomerEmailExists","description":"Another customer already uses the same email."},{"code":"CustomerEmailRequired","description":"Customer email is required."},{"code":"CustomerMobileExists","description":"Another customer already uses the same mobile."},{"code":"CustomerMobileRequired","description":"Customer mobile is required."},{"code":"CustomerNameExists","description":"Another customer already uses the same name."},{"code":"CustomerNationalIDRequired","description":"Customer national identifier is required."},{"code":"DistrictNotFound","description":"A district with the specified identifier was not found."},{"code":"DuplicatedExternalId","description":"Another customer already uses the same external identifier."},{"code":"DupplicatedARAccount","description":"Another customer already uses the same accounting name."},{"code":"DupplicatedName","description":"Another customer already uses the same name."},{"code":"NationalIDExists","description":"Another customer already uses the same national identifier."},{"code":"NationalIDMustBeOfLength","description":"National identifier length is invalid."},{"code":"TaxRegisterationIDExists","description":"Another customer already uses the same tax registration identifier."},{"code":"TaxRegisterationIDMustBeOfLength","description":"Tax registration identifier length is invalid."},{"code":"TaxRegistrationIdRequired","description":"Customer tax registration identifier is required."}]}},"/v3/customers/batch/by-code":{"put":{"tags":["Customers"],"summary":"Updates customers in batch by code.","operationId":"BatchUpdateCustomersByCode","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"requests","in":"body","description":"The customers to update.","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/CustomerUpsertRequest"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Batch update result.","schema":{"$ref":"#/definitions/BatchResult[CustomerResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/batch/by-code","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/batch/by-code"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/batch/by-code"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/customers/batch/by-code","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/batch/by-code"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/batch/by-code","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:customer","position":"before"}],"x-business-errors":[{"code":"CannotDeleteCustomerAddress","description":"An existing customer address cannot be removed because it is referenced by other records."},{"code":"CityNotFound","description":"A city with the specified identifier was not found."},{"code":"CountryNotFound","description":"A country with the specified identifier was not found."},{"code":"CustomerAddressMustContainBuildingNumber","description":"Address must include a building number."},{"code":"CustomerAddressMustHaveDistrict","description":"Address district is required."},{"code":"CustomerAddressRequired","description":"Customer addresses are required."},{"code":"CustomerCodeExists","description":"Another customer already uses the same code."},{"code":"CustomerCodeRequired","description":"Customer code is required."},{"code":"CustomerEmailExists","description":"Another customer already uses the same email."},{"code":"CustomerEmailRequired","description":"Customer email is required."},{"code":"CustomerMobileExists","description":"Another customer already uses the same mobile."},{"code":"CustomerMobileRequired","description":"Customer mobile is required."},{"code":"CustomerNameExists","description":"Another customer already uses the same name."},{"code":"CustomerNationalIDRequired","description":"Customer national identifier is required."},{"code":"CutomerMustHaveSingleDefaultAddress","description":"Customer cannot have more than one default address."},{"code":"DistrictNotFound","description":"A district with the specified identifier was not found."},{"code":"DuplicatedExternalId","description":"Another customer already uses the same external identifier."},{"code":"DupplicatedName","description":"Another customer already uses the same name."},{"code":"NationalIDExists","description":"Another customer already uses the same national identifier."},{"code":"NationalIDMustBeOfLength","description":"National identifier length is invalid."},{"code":"TaxRegisterationIDExists","description":"Another customer already uses the same tax registration identifier."},{"code":"TaxRegisterationIDMustBeOfLength","description":"Tax registration identifier length is invalid."},{"code":"TaxRegistrationIdRequired","description":"Customer tax registration identifier is required."}]}},"/v3/customers/batch/by-id":{"put":{"tags":["Customers"],"summary":"Updates customers in batch by id.","operationId":"BatchUpdateCustomersById","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"requests","in":"body","description":"The customers to update.","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/CustomerUpsertRequest"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Batch update result.","schema":{"$ref":"#/definitions/BatchResult[CustomerResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/batch/by-id","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/batch/by-id"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/batch/by-id"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/customers/batch/by-id","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/batch/by-id"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/batch/by-id","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:customer","position":"before"}],"x-business-errors":[{"code":"CannotDeleteCustomerAddress","description":"An existing customer address cannot be removed because it is referenced by other records."},{"code":"CityNotFound","description":"A city with the specified identifier was not found."},{"code":"CountryNotFound","description":"A country with the specified identifier was not found."},{"code":"CustomerAddressMustContainBuildingNumber","description":"Address must include a building number."},{"code":"CustomerAddressMustHaveDistrict","description":"Address district is required."},{"code":"CustomerAddressRequired","description":"Customer addresses are required."},{"code":"CustomerCodeExists","description":"Another customer already uses the same code."},{"code":"CustomerCodeRequired","description":"Customer code is required."},{"code":"CustomerEmailExists","description":"Another customer already uses the same email."},{"code":"CustomerEmailRequired","description":"Customer email is required."},{"code":"CustomerMobileExists","description":"Another customer already uses the same mobile."},{"code":"CustomerMobileRequired","description":"Customer mobile is required."},{"code":"CustomerNameExists","description":"Another customer already uses the same name."},{"code":"CustomerNationalIDRequired","description":"Customer national identifier is required."},{"code":"CutomerMustHaveSingleDefaultAddress","description":"Customer cannot have more than one default address."},{"code":"DistrictNotFound","description":"A district with the specified identifier was not found."},{"code":"DuplicatedExternalId","description":"Another customer already uses the same external identifier."},{"code":"DupplicatedName","description":"Another customer already uses the same name."},{"code":"NationalIDExists","description":"Another customer already uses the same national identifier."},{"code":"NationalIDMustBeOfLength","description":"National identifier length is invalid."},{"code":"TaxRegisterationIDExists","description":"Another customer already uses the same tax registration identifier."},{"code":"TaxRegisterationIDMustBeOfLength","description":"Tax registration identifier length is invalid."},{"code":"TaxRegistrationIdRequired","description":"Customer tax registration identifier is required."}]}},"/v3/customers/batch/by-name":{"put":{"tags":["Customers"],"summary":"Updates customers in batch by name.","operationId":"BatchUpdateCustomersByName","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"requests","in":"body","description":"The customers to update.","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/CustomerUpsertRequest"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Batch update result.","schema":{"$ref":"#/definitions/BatchResult[CustomerResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/batch/by-name","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/batch/by-name"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/batch/by-name"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/customers/batch/by-name","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/batch/by-name"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/batch/by-name","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:customer","position":"before"}],"x-business-errors":[{"code":"CannotDeleteCustomerAddress","description":"An existing customer address cannot be removed because it is referenced by other records."},{"code":"CityNotFound","description":"A city with the specified identifier was not found."},{"code":"CountryNotFound","description":"A country with the specified identifier was not found."},{"code":"CustomerAddressMustContainBuildingNumber","description":"Address must include a building number."},{"code":"CustomerAddressMustHaveDistrict","description":"Address district is required."},{"code":"CustomerAddressRequired","description":"Customer addresses are required."},{"code":"CustomerCodeExists","description":"Another customer already uses the same code."},{"code":"CustomerCodeRequired","description":"Customer code is required."},{"code":"CustomerEmailExists","description":"Another customer already uses the same email."},{"code":"CustomerEmailRequired","description":"Customer email is required."},{"code":"CustomerMobileExists","description":"Another customer already uses the same mobile."},{"code":"CustomerMobileRequired","description":"Customer mobile is required."},{"code":"CustomerNameExists","description":"Another customer already uses the same name."},{"code":"CustomerNationalIDRequired","description":"Customer national identifier is required."},{"code":"CutomerMustHaveSingleDefaultAddress","description":"Customer cannot have more than one default address."},{"code":"DistrictNotFound","description":"A district with the specified identifier was not found."},{"code":"DuplicatedExternalId","description":"Another customer already uses the same external identifier."},{"code":"DupplicatedName","description":"Another customer already uses the same name."},{"code":"NationalIDExists","description":"Another customer already uses the same national identifier."},{"code":"NationalIDMustBeOfLength","description":"National identifier length is invalid."},{"code":"TaxRegisterationIDExists","description":"Another customer already uses the same tax registration identifier."},{"code":"TaxRegisterationIDMustBeOfLength","description":"Tax registration identifier length is invalid."},{"code":"TaxRegistrationIdRequired","description":"Customer tax registration identifier is required."}]}},"/v3/customers/code/{code}":{"put":{"tags":["Customers"],"summary":"Updates a customer by code.","operationId":"UpdateCustomerByCode","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The customer code.","required":true,"type":"string"},{"name":"request","in":"body","description":"The updated customer values.","required":true,"schema":{"$ref":"#/definitions/CustomerUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated customer.","schema":{"$ref":"#/definitions/CustomerResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/customers/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/customers/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/code/{code}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:customer","position":"before"}],"x-business-errors":[{"code":"CannotDeleteCustomerAddress","description":"An existing customer address cannot be removed because it is referenced by other records."},{"code":"CityNotFound","description":"A city with the specified identifier was not found."},{"code":"CountryNotFound","description":"A country with the specified identifier was not found."},{"code":"CustomerAddressMustContainBuildingNumber","description":"Address must include a building number."},{"code":"CustomerAddressMustHaveDistrict","description":"Address district is required."},{"code":"CustomerAddressRequired","description":"Customer addresses are required."},{"code":"CustomerCodeExists","description":"Another customer already uses the same code."},{"code":"CustomerCodeRequired","description":"Customer code is required."},{"code":"CustomerEmailExists","description":"Another customer already uses the same email."},{"code":"CustomerEmailRequired","description":"Customer email is required."},{"code":"CustomerMobileExists","description":"Another customer already uses the same mobile."},{"code":"CustomerMobileRequired","description":"Customer mobile is required."},{"code":"CustomerNameExists","description":"Another customer already uses the same name."},{"code":"CustomerNationalIDRequired","description":"Customer national identifier is required."},{"code":"CutomerMustHaveSingleDefaultAddress","description":"Customer cannot have more than one default address."},{"code":"DistrictNotFound","description":"A district with the specified identifier was not found."},{"code":"DuplicatedExternalId","description":"Another customer already uses the same external identifier."},{"code":"DupplicatedName","description":"Another customer already uses the same name."},{"code":"NationalIDExists","description":"Another customer already uses the same national identifier."},{"code":"NationalIDMustBeOfLength","description":"National identifier length is invalid."},{"code":"TaxRegisterationIDExists","description":"Another customer already uses the same tax registration identifier."},{"code":"TaxRegisterationIDMustBeOfLength","description":"Tax registration identifier length is invalid."},{"code":"TaxRegistrationIdRequired","description":"Customer tax registration identifier is required."}]},"delete":{"tags":["Customers"],"summary":"Deletes a customer by code.","operationId":"DeleteCustomerByCode","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The customer code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/code/{code}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/customers/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/customers/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:customer","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The customer is referenced by existing documents or related records."}]}},"/v3/customers/code/{code}/deactivate":{"patch":{"tags":["Customers"],"summary":"Deactivates a customer by code.","operationId":"DeactivateCustomerByCode","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The customer code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Customer deactivated."},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/code/{code}/deactivate","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/code/{code}/deactivate"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/code/{code}/deactivate"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/customers/code/{code}/deactivate"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/code/{code}/deactivate"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/code/{code}/deactivate","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:customer-status","position":"before"}]}},"/v3/customers/find-by-external-ids":{"post":{"tags":["Customers"],"summary":"Finds customers by external ids.","operationId":"FindCustomersByExternalIds","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"externalIds","in":"body","description":"The customer external ids.","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Matched customers.","schema":{"type":"array","items":{"$ref":"#/definitions/CustomerResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/find-by-external-ids","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/find-by-external-ids"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/find-by-external-ids"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/find-by-external-ids"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/find-by-external-ids","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:customer","position":"before"}]}},"/v3/customers/find-by-ids":{"post":{"tags":["Customers"],"summary":"Finds customers by ids.","operationId":"FindCustomersByIds","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"ids","in":"body","description":"The customer ids.","required":true,"schema":{"type":"array","items":{"format":"int32","type":"integer"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Matched customers.","schema":{"type":"array","items":{"$ref":"#/definitions/CustomerResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/find-by-ids","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/find-by-ids"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/find-by-ids"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/find-by-ids"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/find-by-ids","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:customer","position":"before"}]}},"/v3/customers/{id}":{"get":{"tags":["Customers"],"summary":"Gets a customer by id.","operationId":"GetCustomerById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The customer id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The customer.","schema":{"$ref":"#/definitions/CustomerResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/customers/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:customer","position":"before"}]},"put":{"tags":["Customers"],"summary":"Updates a customer by id.","operationId":"UpdateCustomerById","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The customer id.","required":true,"type":"integer","format":"int32"},{"name":"request","in":"body","description":"The updated customer values.","required":true,"schema":{"$ref":"#/definitions/CustomerUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated customer.","schema":{"$ref":"#/definitions/CustomerResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/customers/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/customers/{id}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:customer","position":"before"}],"x-business-errors":[{"code":"CannotDeleteCustomerAddress","description":"An existing customer address cannot be removed because it is referenced by other records."},{"code":"CityNotFound","description":"A city with the specified identifier was not found."},{"code":"CountryNotFound","description":"A country with the specified identifier was not found."},{"code":"CustomerAddressMustContainBuildingNumber","description":"Address must include a building number."},{"code":"CustomerAddressMustHaveDistrict","description":"Address district is required."},{"code":"CustomerAddressRequired","description":"Customer addresses are required."},{"code":"CustomerCodeExists","description":"Another customer already uses the same code."},{"code":"CustomerCodeRequired","description":"Customer code is required."},{"code":"CustomerEmailExists","description":"Another customer already uses the same email."},{"code":"CustomerEmailRequired","description":"Customer email is required."},{"code":"CustomerMobileExists","description":"Another customer already uses the same mobile."},{"code":"CustomerMobileRequired","description":"Customer mobile is required."},{"code":"CustomerNameExists","description":"Another customer already uses the same name."},{"code":"CustomerNationalIDRequired","description":"Customer national identifier is required."},{"code":"CutomerMustHaveSingleDefaultAddress","description":"Customer cannot have more than one default address."},{"code":"DistrictNotFound","description":"A district with the specified identifier was not found."},{"code":"DuplicatedExternalId","description":"Another customer already uses the same external identifier."},{"code":"DupplicatedName","description":"Another customer already uses the same name."},{"code":"NationalIDExists","description":"Another customer already uses the same national identifier."},{"code":"NationalIDMustBeOfLength","description":"National identifier length is invalid."},{"code":"TaxRegisterationIDExists","description":"Another customer already uses the same tax registration identifier."},{"code":"TaxRegisterationIDMustBeOfLength","description":"Tax registration identifier length is invalid."},{"code":"TaxRegistrationIdRequired","description":"Customer tax registration identifier is required."}]},"delete":{"tags":["Customers"],"summary":"Deletes a customer by id.","operationId":"DeleteCustomerById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The customer id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/customers/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/customers/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:customer","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The customer is referenced by existing documents or related records."}]}},"/v3/customers/{id}/addresses":{"get":{"tags":["Customers"],"summary":"Gets customer addresses by id.","operationId":"GetCustomerAddresses","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The customer id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Customer addresses.","schema":{"type":"array","items":{"$ref":"#/definitions/CustomerAddressWithLocationResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/{id}/addresses","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/{id}/addresses"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/{id}/addresses"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/customers/{id}/addresses"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/{id}/addresses"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/{id}/addresses","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:customer","position":"before"}]}},"/v3/customers/{id}/balance":{"get":{"tags":["Customers"],"summary":"Gets a customer balance by id.","operationId":"GetCustomerBalance","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The customer id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Customer balance.","schema":{"format":"double","type":"number"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/{id}/balance","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/{id}/balance"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/{id}/balance"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/customers/{id}/balance"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/{id}/balance"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/{id}/balance","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:customer","position":"before"}]}},"/v3/customers/{id}/deactivate":{"patch":{"tags":["Customers"],"summary":"Deactivates a customer by id.","operationId":"DeactivateCustomerById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The customer id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Customer deactivated."},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/{id}/deactivate","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/{id}/deactivate"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/{id}/deactivate"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/customers/{id}/deactivate"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/{id}/deactivate"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/{id}/deactivate","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:customer-status","position":"before"}]}},"/v3/customers/{id}/invoiceable-documents":{"get":{"tags":["Customers"],"summary":"Lists invoiceable source documents for a customer.","operationId":"GetInvoiceableDocuments","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The customer id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"documentTypes","in":"query","description":"The source document types to include. Supported values: SO, SR, IO, RR.","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi","default":[]},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":true,"type":"integer","format":"int32","default":100,"maximum":20,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of invoiceable documents.","schema":{"$ref":"#/definitions/PagedResult[InvoiceableDocumentResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/customers/{id}/invoiceable-documents","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/customers/{id}/invoiceable-documents"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/customers/{id}/invoiceable-documents"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/customers/{id}/invoiceable-documents"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/customers/{id}/invoiceable-documents"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/customers/{id}/invoiceable-documents","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:customer","position":"before"}]}},"/v3/districts":{"get":{"tags":["Districts"],"summary":"Lists districts.","operationId":"GetDistricts","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"name","in":"query","description":"Optional district name filter.","required":false,"type":"string"},{"name":"cityId","in":"query","description":"Optional city identifier filter.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of districts.","schema":{"$ref":"#/definitions/PagedResult[DistrictResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/districts","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/districts"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/districts"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/districts"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/districts","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:district","position":"before"}]},"post":{"tags":["Districts"],"summary":"Creates a district.","operationId":"CreateDistrict","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The district to create.","required":true,"schema":{"$ref":"#/definitions/DistrictUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/districts"}}},"201":{"description":"The created district.","schema":{"$ref":"#/definitions/DistrictResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/districts","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/districts"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/districts"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/districts","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/districts","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:district","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another district already uses the same name in the same city."}]}},"/v3/districts/{id}":{"get":{"tags":["Districts"],"summary":"Gets a district by id.","operationId":"GetDistrictById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The district id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The district.","schema":{"$ref":"#/definitions/DistrictResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/districts/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/districts/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/districts/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/districts/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/districts/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/districts/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:district","position":"before"}]},"put":{"tags":["Districts"],"summary":"Updates a district.","operationId":"UpdateDistrict","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The district id.","required":true,"type":"integer","format":"int32"},{"name":"request","in":"body","description":"The updated district values.","required":true,"schema":{"$ref":"#/definitions/DistrictUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated district.","schema":{"$ref":"#/definitions/DistrictResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/districts/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/districts/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/districts/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/districts/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/districts/{id}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/districts/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/districts/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:district","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another district already uses the same name in the same city."}]},"delete":{"tags":["Districts"],"summary":"Deletes a district.","operationId":"DeleteDistrict","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The district id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/districts/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/districts/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/districts/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/districts/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/districts/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/districts/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/districts/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:district","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The district is still referenced by related records and cannot be deleted."}]}},"/v3/documents/{code}/manual-links":{"get":{"tags":["Document Manual Links"],"summary":"Gets manual links for a document.","description":"An empty list is a valid response when no manual links exist.","operationId":"GetDocumentManualLinks","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The document code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Manual links for the document.","schema":{"type":"array","items":{"type":"string"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/documents/{code}/manual-links","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/documents/{code}/manual-links"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/documents/{code}/manual-links"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/documents/{code}/manual-links"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/documents/{code}/manual-links"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/documents/{code}/manual-links","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:common-utility","position":"before"}]},"post":{"tags":["Document Manual Links"],"summary":"Adds manual links to a document.","description":"Returns the normalized codes that were processed. Self-links and codes without a dash separator are silently skipped.","operationId":"AddDocumentManualLinks","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The document code.","required":true,"type":"string"},{"name":"targetCodes","in":"body","description":"The codes to link.","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Links added.","schema":{"type":"array","items":{"type":"string"}}},"404":{"description":"Document not found.","schema":{"$ref":"#/definitions/ProblemDetails"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/documents/{code}/manual-links","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/documents/{code}/manual-links"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/documents/{code}/manual-links"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/documents/{code}/manual-links"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/documents/{code}/manual-links","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:common-utility","position":"before"}]}},"/v3/documents/{code}/manual-links/{linkedCode}":{"delete":{"tags":["Document Manual Links"],"summary":"Deletes a manual link between two documents.","description":"Always returns 204 even when the linked code was not found.","operationId":"DeleteDocumentManualLink","consumes":[],"produces":[],"parameters":[{"name":"code","in":"path","description":"The document code.","required":true,"type":"string"},{"name":"linkedCode","in":"path","description":"The linked document code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"204":{"description":"No Content."},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/documents/{code}/manual-links/{linkedCode}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/documents/{code}/manual-links/{linkedCode}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/documents/{code}/manual-links/{linkedCode}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/documents/{code}/manual-links/{linkedCode}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/documents/{code}/manual-links/{linkedCode}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/documents/{code}/manual-links/{linkedCode}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:common-utility","position":"before"}]}},"/v3/dynamic-properties":{"get":{"tags":["Dynamic Properties"],"summary":"Lists dynamic properties.","description":"- offset must be zero or greater; omit to use the default (0).\r\n- limit must be between 1 and 1000; omit to use the default (100).","operationId":"GetDynamicProperties","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"names","in":"query","description":"Optional names to filter by.","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of dynamic properties.","schema":{"$ref":"#/definitions/PagedResult[DynamicPropertyResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/dynamic-properties","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/dynamic-properties"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/dynamic-properties"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/dynamic-properties","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/dynamic-properties"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/dynamic-properties","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:dynamic-property","position":"before"}],"x-business-errors":[{"code":"DynamicPropertiesDisabled","description":"The warehouse setting UseDynamicPropertiesInStockitems is disabled."}]}},"/v3/dynamic-properties/batch":{"post":{"tags":["Dynamic Properties"],"summary":"Creates dynamic properties in batch.","description":"Per-item errors returned in the response failed map:\r\nCodeRequiredForPropertyWhenCodingIsFree - The warehouse coding method is free coding and the property code is missing.\r\nCodeRequiredForPropertyWhenNoCoding - The warehouse coding method is no coding and the property code is missing.\r\nCodeRequiredForValueWhenCodingIsFree - The warehouse coding method is free coding and a value code is missing.\r\nCodeRequiredForValueWhenNoCoding - The warehouse coding method is no coding and a value code is missing.\r\nAlreadyExists - Another dynamic property with the same name already exists.","operationId":"BatchInsertDynamicProperties","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The dynamic properties to insert.","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/DynamicPropertyBatchInsertRequest"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Batch insert result.","schema":{"$ref":"#/definitions/DynamicPropertyBatchInsertResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/dynamic-properties/batch","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/dynamic-properties/batch"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/dynamic-properties/batch"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/dynamic-properties/batch","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/dynamic-properties/batch"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/dynamic-properties/batch","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:dynamic-property","position":"before"}],"x-business-errors":[{"code":"DynamicPropertiesDisabled","description":"The warehouse setting UseDynamicPropertiesInStockitems is disabled."}]}},"/v3/dynamic-properties/tree/{userId}":{"get":{"tags":["Dynamic Properties"],"summary":"Gets the dynamic property tree for a user.","operationId":"GetDynamicPropertiesTree","consumes":[],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"The user id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Dynamic property tree.","schema":{"type":"array","items":{"$ref":"#/definitions/DynamicPropertyTreeResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/dynamic-properties/tree/{userId}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/dynamic-properties/tree/{userId}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/dynamic-properties/tree/{userId}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/dynamic-properties/tree/{userId}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/dynamic-properties/tree/{userId}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/dynamic-properties/tree/{userId}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:dynamic-property","position":"before"}]}},"/v3/dynamic-properties/{id}":{"put":{"tags":["Dynamic Properties"],"summary":"Updates a dynamic property.","operationId":"UpdateDynamicPropertyById","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The dynamic property id.","required":true,"type":"integer","format":"int32"},{"name":"request","in":"body","description":"The updated dynamic property values.","required":true,"schema":{"$ref":"#/definitions/DynamicPropertyValuesUpdateRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated dynamic property.","schema":{"$ref":"#/definitions/DynamicPropertyResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/dynamic-properties/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/dynamic-properties/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/dynamic-properties/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/dynamic-properties/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/dynamic-properties/{id}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/dynamic-properties/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/dynamic-properties/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:dynamic-property","position":"before"}],"x-business-errors":[{"code":"CannotDeleteInUse","description":"One of the removed values is still referenced by stock items."},{"code":"CodeRequiredForValueWhenCodingIsFree","description":"The warehouse coding method is free coding and a value code is missing."},{"code":"CodeRequiredForValueWhenNoCoding","description":"The warehouse coding method is no coding and a value code is missing."},{"code":"DynamicPropertiesDisabled","description":"The warehouse setting UseDynamicPropertiesInStockitems is disabled."},{"code":"InvalidParentId","description":"The dynamic property identifier does not exist."}]}},"/v3/journal-entries":{"get":{"tags":["Journal Entries"],"summary":"Lists journal entries.","operationId":"GetJournalEntries","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"code","in":"query","description":"The journal entry code.","required":false,"type":"string"},{"name":"paperNumber","in":"query","description":"The journal entry paper number.","required":false,"type":"string"},{"name":"relatedIOCode","in":"query","description":"The related issue-offering code.","required":false,"type":"string"},{"name":"accountId","in":"query","description":"Returns journal entries where any detail line hits this general-ledger account.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"customerId","in":"query","description":"Narrows to journal entries whose matched account line carries this customer.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"supplierId","in":"query","description":"Narrows to journal entries whose matched account line carries this supplier.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"costCenterId","in":"query","description":"Narrows to journal entries whose matched account line is tagged with this cost center.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"dateFrom","in":"query","description":"Only journal entries on or after this document date.","required":false,"type":"string","format":"date-time"},{"name":"dateTo","in":"query","description":"Only journal entries on or before this document date.","required":false,"type":"string","format":"date-time"},{"name":"isPostedOnly","in":"query","description":"When false, unposted/draft journal entries are also included. Defaults to true.","required":false,"type":"boolean","default":true},{"name":"currencyId","in":"query","description":"Only journal entries recorded in this currency.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The matching journal entries.","schema":{"$ref":"#/definitions/PagedResult[JournalEntryResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/journal-entries","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/journal-entries"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/journal-entries"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/journal-entries"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/journal-entries","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:journal-entry","position":"before"}]},"post":{"tags":["Journal Entries"],"summary":"Creates a journal entry.","operationId":"CreateJournalEntry","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The journal entry to create.","required":true,"schema":{"$ref":"#/definitions/CreateJournalEntryRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/journal-entries"}}},"201":{"description":"Journal entry created.","schema":{"$ref":"#/definitions/JournalEntryMutationResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/journal-entries","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/journal-entries"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/journal-entries"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/journal-entries","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/journal-entries","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:journal-entry","position":"before"}],"x-business-errors":[{"code":"CannotInsertDocumentBeforeClosingDate","description":"The document date is before the closing date."},{"code":"CK_NoCustomerOrSupplierSelectedforAccount","description":"Occurs when posting a journal line to a control account that requires a linked customer or supplier, but neither party was supplied."},{"code":"CK_NocustomerSelectedforAR","description":"Occurs when posting a journal line to an AR account that requires a linked customer, but no customer was selected."},{"code":"CK_NoSupplierSelectedforAP","description":"Occurs when posting a journal line to an AP account that requires a linked supplier, but no supplier was selected."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate has too many decimal places."},{"code":"PreventSaveDocumentsInFutureDate","description":"The document date is in the future."}]}},"/v3/journal-entries/code/{code}":{"put":{"tags":["Journal Entries"],"summary":"Updates a journal entry by code.","description":"- Returns 204 with no body on success.","operationId":"UpdateJournalEntryByCode","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The journal entry code.","required":true,"type":"string"},{"name":"request","in":"body","description":"The updated journal entry values.","required":true,"schema":{"$ref":"#/definitions/UpdateJournalEntryRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/journal-entries/code/{code}"}}},"204":{"description":"Journal entry updated."},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/journal-entries/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/journal-entries/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/journal-entries/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/journal-entries/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/journal-entries/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/journal-entries/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:journal-entry","position":"before"}],"x-business-errors":[{"code":"CannotUpdateDeletedRelatedToCashedCNDN","description":"The entry is tied to a deleted or cashed document."},{"code":"CannotUpdateDocumentBeforeClosingDate","description":"The document date is before the closing date."},{"code":"DirtyRead","description":"The document changed while it was being updated."},{"code":"DocumentCannotUpdateAfterPosting","description":"The journal entry has already been posted."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate has too many decimal places."},{"code":"ItemCannotDeleteItInUse","description":"The journal entry is referenced by another document or process."},{"code":"PhantomRead","description":"The related document details changed while it was being updated."},{"code":"PostedDocumentsCannotBeUpdatedOrDeleted","description":"The journal entry is posted and cannot be changed."}]},"delete":{"tags":["Journal Entries"],"summary":"Deletes a journal entry by code.","operationId":"DeleteJournalEntryByCode","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The journal entry code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/journal-entries/code/{code}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/journal-entries/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/journal-entries/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/journal-entries/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/journal-entries/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/journal-entries/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/journal-entries/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:journal-entry","position":"before"}],"x-business-errors":[{"code":"CannotDeleteSystemJournalEntry","description":"The journal entry is a system-generated document (e.g. created for an issue offering) and cannot be deleted."},{"code":"CannotUpdateDeletedRelatedToCashedCNDN","description":"The entry is tied to a deleted or cashed document."},{"code":"DirtyRead","description":"The document changed while it was being deleted."},{"code":"ItemCannotDeleteItInUse","description":"The journal entry is referenced by another document or process."},{"code":"PostedDocumentsCannotBeUpdatedOrDeleted","description":"The journal entry is posted and cannot be deleted."}]}},"/v3/journal-entries/payment":{"post":{"tags":["Journal Entries"],"summary":"Creates a payment journal entry.","operationId":"CreatePaymentJournalEntry","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The payment journal entry to create.","required":true,"schema":{"$ref":"#/definitions/CreatePaymentJournalEntryRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/journal-entries/payment"}}},"201":{"description":"Payment journal entry created.","schema":{"$ref":"#/definitions/JournalEntryResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/journal-entries/payment","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/journal-entries/payment"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/journal-entries/payment"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/journal-entries/payment","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/journal-entries/payment","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:journal-entry","position":"before"}],"x-business-errors":[{"code":"CannotInsertDocumentBeforeClosingDate","description":"The document date is before the closing date."},{"code":"CK_NoCustomerOrSupplierSelectedforAccount","description":"Occurs when posting a journal line to a control account that requires a linked customer or supplier, but neither party was supplied."},{"code":"CK_NocustomerSelectedforAR","description":"Occurs when posting a journal line to an AR account that requires a linked customer, but no customer was selected."},{"code":"CK_NoSupplierSelectedforAP","description":"Occurs when posting a journal line to an AP account that requires a linked supplier, but no supplier was selected."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate has too many decimal places."},{"code":"PreventSaveDocumentsInFutureDate","description":"The document date is in the future."},{"code":"RelatedSalesOrderAlreadyCashedIn","description":"Occurs when the linked sales order has already been settled by cash-in, so another payment journal entry cannot be created from it."},{"code":"RelatedSalesOrderCancelled","description":"Occurs when the linked sales order is already canceled, so the payment journal entry cannot be created from it."}]}},"/v3/purchase-orders":{"get":{"tags":["Purchase Orders"],"summary":"Lists purchase orders.","operationId":"GetPurchaseOrders","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"code","in":"query","description":"Optional exact document-code filter.","required":false,"type":"string"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of purchase orders.","schema":{"$ref":"#/definitions/PagedResult[PurchaseOrderResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/purchase-orders","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/purchase-orders"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/purchase-orders"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/purchase-orders"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/purchase-orders","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:purchase-order","position":"before"}]}},"/v3/purchase-orders/find":{"post":{"tags":["Purchase Orders"],"summary":"Finds purchase orders.","operationId":"FindPurchaseOrders","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"Purchase order filters.","required":true,"schema":{"$ref":"#/definitions/FindPurchaseOrdersRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of purchase orders.","schema":{"$ref":"#/definitions/PagedResult[PurchaseOrderResponse]"}},"404":{"description":"The referenced supplier was not found.","schema":{"$ref":"#/definitions/ProblemDetails"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/purchase-orders/find","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/purchase-orders/find"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/purchase-orders/find"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/purchase-orders/find"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/purchase-orders/find","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:purchase-order","position":"before"}]}},"/v3/purchase-orders/purchase-returns/find":{"post":{"tags":["Purchase Orders"],"summary":"Finds purchase returns.","operationId":"FindPurchaseReturns","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"Purchase return filters.","required":true,"schema":{"$ref":"#/definitions/FindPurchaseReturnsRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of purchase returns.","schema":{"$ref":"#/definitions/PagedResult[PurchaseOrderResponse]"}},"404":{"description":"The referenced supplier was not found.","schema":{"$ref":"#/definitions/ProblemDetails"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/purchase-orders/purchase-returns/find","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/purchase-orders/purchase-returns/find"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/purchase-orders/purchase-returns/find"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/purchase-orders/purchase-returns/find"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/purchase-orders/purchase-returns/find","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:purchase-return","position":"before"}]}},"/v3/purchase-orders/{id}":{"get":{"tags":["Purchase Orders"],"summary":"Gets a purchase order by id.","operationId":"GetPurchaseOrderById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The purchase order id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The purchase order.","schema":{"$ref":"#/definitions/PurchaseOrderResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/purchase-orders/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/purchase-orders/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/purchase-orders/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/purchase-orders/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/purchase-orders/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/purchase-orders/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:purchase-order","position":"before"}]}},"/v3/sales-orders":{"get":{"tags":["Sales Orders"],"summary":"Lists sales orders.","description":"- offset is zero-based; limit defaults to 100.\r\n- orderDateFrom and orderDateTo filter on or after / on or before the document date (inclusive bounds).","operationId":"GetSalesOrders","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"documentCode","in":"query","description":"Document code filter.","required":false,"type":"string"},{"name":"paperNumber","in":"query","description":"Paper/reference number filter.","required":false,"type":"string"},{"name":"warehouseId","in":"query","description":"Warehouse id filter.","required":false,"type":"integer","format":"int32"},{"name":"salesPersonId","in":"query","description":"Sales person id filter.","required":false,"type":"integer","format":"int32"},{"name":"tags","in":"query","description":"Tags filter.","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"orderDateFrom","in":"query","description":"Inclusive lower bound of the document date range.","required":false,"type":"string","format":"date-time"},{"name":"orderDateTo","in":"query","description":"Inclusive upper bound of the document date range.","required":false,"type":"string","format":"date-time"},{"name":"orderStatus","in":"query","description":"Order status filter.","required":false,"type":"string","enum":["Cancelled","Confirmed","Pending","Processing","OutForDelivery","Shipped","Returned","Open"]},{"name":"createdBy","in":"query","description":"Creator filter.","required":false,"type":"string"},{"name":"warehouseOnly","in":"query","description":"Whether to limit to warehouse orders only.","required":false,"type":"boolean","default":true},{"name":"onlyMyOrders","in":"query","description":"Whether to limit results to orders created by the current user. Defaults to true.","required":false,"type":"boolean","default":true},{"name":"customerId","in":"query","description":"Customer id filter.","required":false,"type":"integer","format":"int32"},{"name":"paymentStatus","in":"query","description":"Payment status filter.","required":false,"type":"string","enum":["Unpaid","Paid"]},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of sales orders.","schema":{"$ref":"#/definitions/PagedResult[SalesOrderHeaderListResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:sales-order","position":"before"}]},"post":{"tags":["Sales Orders"],"summary":"Creates a sales order.","operationId":"CreateSalesOrder","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The sales order to create.","required":true,"schema":{"$ref":"#/definitions/SalesOrderRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders"}}},"201":{"description":"Sales order created.","schema":{"$ref":"#/definitions/SalesOrderResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-orders","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:sales-order","position":"before"}],"x-business-errors":[{"code":"BundleNotFound","description":"A referenced bundle was not found."},{"code":"CannotAssignInactiveTax","description":"An inactive tax cannot be assigned."},{"code":"CannotSetCreditPaymentForCustomersOfTypeCashPayment","description":"Credit installments cannot be used for cash-payment customers."},{"code":"CostCenterNotFound","description":"The specified cost center was not found."},{"code":"CostCenterNotPermitted","description":"The user is not permitted to use the specified cost center."},{"code":"CostCenterRequiredOnSalesDocument","description":"A cost center is required on the document."},{"code":"CustomerNotFound","description":"The referenced customer was not found."},{"code":"DuplicatedRefenceDocuments","description":"Another document already references the same source document."},{"code":"DupplicatedCode","description":"Another sales order already uses the same document code."},{"code":"DupplicatedDate","description":"Another sales order already exists with the same document date."},{"code":"EdaraBusinessError","description":"A legacy business-rule violation occurred (see message for details)."},{"code":"EInvoice_Egypt_MissingCustomersAddress","description":"Egypt e-invoicing requires the customer address."},{"code":"EInvoice_Egypt_MissingCustomersTaxRegistrationID","description":"Egypt e-invoicing requires the customer tax registration id."},{"code":"EInvoice_KSA_AllDetailsMustBeTaxable","description":"KSA e-invoicing requires every detail line to be taxable."},{"code":"EInvoice_KSA_BundleDetailsMustHaveSameTaxRate","description":"KSA e-invoicing requires all bundle items to share the same tax rate."},{"code":"EInvoice_KSA_MissingShippingDate","description":"KSA e-invoicing requires a shipping date."},{"code":"EInvoice_KSA_SalesOrderMustBeTaxable","description":"KSA e-invoicing requires the order to be taxable."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate exceeds the allowed decimal precision."},{"code":"InvalidTaxScopeForItem","description":"The tax scope is not valid for this item."},{"code":"InvalidTaxTypeForItem","description":"The tax type is not valid for this item."},{"code":"MustSelectValidTaxType","description":"A valid tax type must be selected."},{"code":"MustSelectValidWHTaxType","description":"A valid withholding-tax type must be selected."},{"code":"NoSystemCurrency","description":"A system currency must be configured before saving the document."},{"code":"PreventSaveDocumentsInFutureDate","description":"The document date cannot be in the future."},{"code":"PrventStockItemsExceedStoreQuotaLimit","description":"One or more items exceed the sales-store quota limit."},{"code":"SerialAlreadyReserved","description":"One or more serials are already reserved on another document."},{"code":"SO_PO_TaxHasBeenDeleted","description":"A tax referenced by the order has been deleted."},{"code":"TaxNotFound","description":"The specified tax was not found."}]}},"/v3/sales-orders/cash-in":{"post":{"tags":["Sales Orders"],"summary":"Records a sales order cash-in.","operationId":"CreateCashInForSalesOrder","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The cash-in to create.","required":true,"schema":{"$ref":"#/definitions/CashInForSalesOrderRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/cash-in"}}},"201":{"description":"Cash-in document created.","schema":{"$ref":"#/definitions/CashTransactionResponse"}},"404":{"description":"Related sales order or cash account not found.","schema":{"$ref":"#/definitions/ProblemDetails"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/cash-in","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/cash-in"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/cash-in"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-orders/cash-in","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/cash-in","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:cash-transaction","position":"before"}],"x-business-errors":[{"code":"CannotInsertDocumentBeforeClosingDate","description":"The document date is before the closing date."},{"code":"CK_NoCustomerOrSupplierSelectedforAccount","description":"The selected account requires a linked customer or supplier, but none was provided."},{"code":"CK_NocustomerSelectedforAR","description":"The selected receivable account requires a linked customer, but none was provided."},{"code":"CK_NoSupplierSelectedforAP","description":"The selected payable account requires a linked supplier, but none was provided."},{"code":"CustomerHaveNoRelatedAccount","description":"The selected customer has no related GL account; raised when the journal entry for the cash-in is created (AccDocumentLogic)."},{"code":"DocumentmainAccountHasNoAlias","description":"The selected main account does not have the cash-account alias required by this document type."},{"code":"DupplicatedCode","description":"Another document already uses the same document code."},{"code":"DupplicatedDate","description":"Another document already exists with the same document date."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate has too many decimal places."},{"code":"PreventSaveDocumentsInFutureDate","description":"The document date is in the future."},{"code":"RelatedSalesOrderCancelled","description":"Occurs when the linked sales order is already canceled, so the payment journal entry cannot be created from it."}]}},"/v3/sales-orders/code/{code}":{"put":{"tags":["Sales Orders"],"summary":"Updates a sales order by code.","description":"- When SalesOrderDetails is supplied, the full document (header + details + installments) is replaced.","operationId":"UpdateSalesOrderByCode","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The sales order code.","required":true,"type":"string"},{"name":"request","in":"body","description":"The updated sales order values.","required":true,"schema":{"$ref":"#/definitions/SalesOrderRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated sales order.","schema":{"$ref":"#/definitions/SalesOrderResponse"}},"404":{"description":"Sales order not found.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-orders/code/{code}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-orders/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/code/{code}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:sales-order","position":"before"}],"x-business-errors":[{"code":"CannotAssignInactiveTax","description":"An inactive tax cannot be assigned."},{"code":"CannotDeleteOrderAsItHasRelatedManualDocuments","description":"The order has related manual documents that prevent the update."},{"code":"DuplicatedRefenceDocuments","description":"Another document already references the same source document."},{"code":"EdaraBusinessError","description":"A legacy business-rule violation occurred (see message for details)."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate exceeds the allowed decimal precision."},{"code":"InvalidTaxScopeForItem","description":"The tax scope is not valid for this item."},{"code":"InvalidTaxTypeForItem","description":"The tax type is not valid for this item."},{"code":"MustSelectValidTaxType","description":"A valid tax type must be selected."},{"code":"MustSelectValidWHTaxType","description":"A valid withholding-tax type must be selected."},{"code":"NoSystemCurrency","description":"A system currency must be configured before saving the document."},{"code":"PhantomRead","description":"The sales order was modified by another user; reload and retry."},{"code":"PreventSaveDocumentsInFutureDate","description":"The document date cannot be in the future."},{"code":"PrventStockItemsExceedStoreQuotaLimit","description":"One or more items exceed the sales-store quota limit."},{"code":"SerialAlreadyReserved","description":"One or more serials are already reserved on another document."},{"code":"StockItemAlreadyReturned","description":"A detail line targets an item that has already been returned."},{"code":"TaxNotFound","description":"The specified tax was not found."}]}},"/v3/sales-orders/code/{code}/cancel":{"patch":{"tags":["Sales Orders"],"summary":"Cancels a sales order by code.","operationId":"CancelSalesOrderByCode","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The sales order code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The cancelled sales order.","schema":{"$ref":"#/definitions/SalesOrderActionResponse"}},"404":{"description":"Sales order not found or not in a cancellable state.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-orders/code/{code}/cancel"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/code/{code}/cancel","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/code/{code}/cancel"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/code/{code}/cancel"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-orders/code/{code}/cancel","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/code/{code}/cancel"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/code/{code}/cancel","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:sales-order","position":"before"}],"x-business-errors":[{"code":"CannotDeleteOrderAsItHasRelatedManualDocuments","description":"The order has related manual accounting documents that prevent cancellation."}]}},"/v3/sales-orders/code/{code}/status":{"patch":{"tags":["Sales Orders"],"summary":"Updates sales order status by code.","description":"- Accepted values: Cancelled, Confirmed, OutForDelivery.","operationId":"UpdateSalesOrderStatus","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The sales order code.","required":true,"type":"string"},{"name":"request","in":"body","description":"The updated status values.","required":true,"schema":{"$ref":"#/definitions/UpdateSalesOrderStatusRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated sales order.","schema":{"$ref":"#/definitions/SalesOrderActionResponse"}},"404":{"description":"Sales order not found.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-orders/code/{code}/status"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/code/{code}/status","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/code/{code}/status"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/code/{code}/status"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-orders/code/{code}/status","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/code/{code}/status"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/code/{code}/status","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:sales-order","position":"before"}],"x-business-errors":[{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate exceeds the allowed decimal precision."}]}},"/v3/sales-orders/code/{code}/tags":{"patch":{"tags":["Sales Orders"],"summary":"Updates sales order tags by code.","description":"- Supplying an empty array clears all tags.","operationId":"UpdateSalesOrderTags","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The sales order code.","required":true,"type":"string"},{"name":"request","in":"body","description":"The sales order tags.","required":true,"schema":{"$ref":"#/definitions/SalesOrderTagsUpdateRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated sales order.","schema":{"$ref":"#/definitions/SalesOrderResponse"}},"404":{"description":"Sales order not found.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-orders/code/{code}/tags"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/code/{code}/tags","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/code/{code}/tags"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/code/{code}/tags"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-orders/code/{code}/tags","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/code/{code}/tags"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/code/{code}/tags","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:sales-order","position":"before"}],"x-business-errors":[{"code":"PhantomRead","description":"The sales order was modified by another user; reload and retry."}]}},"/v3/sales-orders/code/{code}/unissue":{"patch":{"tags":["Sales Orders"],"summary":"Unissues a sales order by code.","operationId":"UnIssueSalesOrderByCode","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The sales order code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The unissued sales order.","schema":{"$ref":"#/definitions/SalesOrderActionResponse"}},"404":{"description":"Sales order not found.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-orders/code/{code}/unissue"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/code/{code}/unissue","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/code/{code}/unissue"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/code/{code}/unissue"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-orders/code/{code}/unissue","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/code/{code}/unissue"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/code/{code}/unissue","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:sales-order","position":"before"}],"x-business-errors":[{"code":"PhantomRead","description":"The sales order was modified by another user; reload and retry."}]}},"/v3/sales-orders/header":{"put":{"tags":["Sales Orders"],"summary":"Updates a sales order header.","operationId":"UpdateSalesOrderHeader","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The updated sales order header values.","required":true,"schema":{"$ref":"#/definitions/SalesOrderRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated sales order.","schema":{"$ref":"#/definitions/SalesOrderResponse"}},"404":{"description":"Sales order not found.","schema":{"$ref":"#/definitions/ProblemDetails"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/header","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/header"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/header"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-orders/header","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/header"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/header","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:sales-order","position":"before"}],"x-business-errors":[{"code":"EdaraBusinessError","description":"A legacy business-rule violation occurred (see message for details)."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate exceeds the allowed decimal precision."},{"code":"NoSystemCurrency","description":"A system currency must be configured before saving the document."},{"code":"PhantomRead","description":"The sales order was modified by another user; reload and retry."},{"code":"PreventSaveDocumentsInFutureDate","description":"The document date cannot be in the future."}]}},"/v3/sales-orders/issued":{"post":{"tags":["Sales Orders"],"summary":"Creates an issued sales order.","description":"- Preserves the legacy issued-create flow; the order is marked issued immediately on insert.\r\n- The request validation matches the standard create endpoint, except that detail quantities are not required to be positive.","operationId":"CreateIssuedSalesOrder","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The sales order to create.","required":true,"schema":{"$ref":"#/definitions/SalesOrderRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/issued"}}},"201":{"description":"Sales order created.","schema":{"$ref":"#/definitions/SalesOrderResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/issued","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/issued"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/issued"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-orders/issued","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/issued","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:sales-order","position":"before"}],"x-business-errors":[{"code":"BundleNotFound","description":"A referenced bundle was not found."},{"code":"CannotAssignInactiveTax","description":"An inactive tax cannot be assigned."},{"code":"CannotSetCreditPaymentForCustomersOfTypeCashPayment","description":"Credit installments cannot be used for cash-payment customers."},{"code":"CostCenterNotFound","description":"The specified cost center was not found."},{"code":"CostCenterNotPermitted","description":"The user is not permitted to use the specified cost center."},{"code":"CostCenterRequiredOnSalesDocument","description":"A cost center is required on the document."},{"code":"CustomerNotFound","description":"The referenced customer was not found."},{"code":"DuplicatedRefenceDocuments","description":"Another document already references the same source document."},{"code":"DupplicatedCode","description":"Another sales order already uses the same document code."},{"code":"DupplicatedDate","description":"Another sales order already exists with the same document date."},{"code":"EdaraBusinessError","description":"A legacy business-rule violation occurred (see message for details)."},{"code":"EInvoice_Egypt_MissingCustomersAddress","description":"Egypt e-invoicing requires the customer address."},{"code":"EInvoice_Egypt_MissingCustomersTaxRegistrationID","description":"Egypt e-invoicing requires the customer tax registration id."},{"code":"EInvoice_KSA_AllDetailsMustBeTaxable","description":"KSA e-invoicing requires every detail line to be taxable."},{"code":"EInvoice_KSA_BundleDetailsMustHaveSameTaxRate","description":"KSA e-invoicing requires all bundle items to share the same tax rate."},{"code":"EInvoice_KSA_MissingShippingDate","description":"KSA e-invoicing requires a shipping date."},{"code":"EInvoice_KSA_SalesOrderMustBeTaxable","description":"KSA e-invoicing requires the order to be taxable."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate exceeds the allowed decimal precision."},{"code":"InvalidTaxScopeForItem","description":"The tax scope is not valid for this item."},{"code":"InvalidTaxTypeForItem","description":"The tax type is not valid for this item."},{"code":"MustSelectValidTaxType","description":"A valid tax type must be selected."},{"code":"MustSelectValidWHTaxType","description":"A valid withholding-tax type must be selected."},{"code":"NoSystemCurrency","description":"A system currency must be configured before saving the document."},{"code":"PreventSaveDocumentsInFutureDate","description":"The document date cannot be in the future."},{"code":"PrventStockItemsExceedStoreQuotaLimit","description":"One or more items exceed the sales-store quota limit."},{"code":"SerialAlreadyReserved","description":"One or more serials are already reserved on another document."},{"code":"SO_PO_TaxHasBeenDeleted","description":"A tax referenced by the order has been deleted."},{"code":"TaxNotFound","description":"The specified tax was not found."}]}},"/v3/sales-orders/print-templates":{"get":{"tags":["Sales Orders"],"summary":"Lists print templates.","operationId":"GetSalesOrderPrintTemplates","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"updateDate","in":"query","description":"Inclusive lower bound of the print-template update date.","required":false,"type":"string","format":"date-time"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of print templates.","schema":{"$ref":"#/definitions/PagedResult[SalesOrderPrintTemplateResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/print-templates","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/print-templates"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/print-templates"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/print-templates"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/print-templates","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: print:sales-order","position":"before"}]}},"/v3/sales-orders/print-templates/{templateId}":{"get":{"tags":["Sales Orders"],"summary":"Gets a print template by id.","operationId":"GetSalesOrderPrintTemplateById","consumes":[],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","description":"The print template id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The print template.","schema":{"$ref":"#/definitions/SalesOrderPrintTemplateResponse"}},"404":{"description":"Print template not found.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-orders/print-templates/{templateId}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/print-templates/{templateId}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/print-templates/{templateId}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/print-templates/{templateId}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/print-templates/{templateId}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/print-templates/{templateId}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: print:sales-order","position":"before"}]}},"/v3/sales-orders/{id}":{"get":{"tags":["Sales Orders"],"summary":"Gets a sales order by id.","operationId":"GetSalesOrderById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The sales order id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The sales order.","schema":{"$ref":"#/definitions/SalesOrderResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-orders/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:sales-order","position":"before"}]},"delete":{"tags":["Sales Orders"],"summary":"Deletes a sales order by id.","operationId":"DeleteSalesOrder","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The sales order id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-orders/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-orders/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:sales-order","position":"before"}],"x-business-errors":[{"code":"CannotDeleteOrderAsItHasRelatedManualDocuments","description":"The order has related manual accounting documents (CI/NR/SI/JE) that prevent deletion."}]}},"/v3/sales-orders/{id}/cancel":{"patch":{"tags":["Sales Orders"],"summary":"Cancels a sales order by id.","operationId":"CancelSalesOrderById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The sales order id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The cancelled sales order.","schema":{"$ref":"#/definitions/SalesOrderActionResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-orders/{id}/cancel","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-orders/{id}/cancel"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-orders/{id}/cancel"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-orders/{id}/cancel"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-orders/{id}/cancel","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-orders/{id}/cancel"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-orders/{id}/cancel","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:sales-order","position":"before"}],"x-business-errors":[{"code":"CannotDeleteOrderAsItHasRelatedManualDocuments","description":"The order has related manual accounting documents that prevent cancellation."}]}},"/v3/sales-persons":{"get":{"tags":["Sales Persons"],"summary":"Lists sales persons.","operationId":"GetSalesPersons","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"code","in":"query","description":"CONTAINS filter on code.","required":false,"type":"string"},{"name":"externalId","in":"query","description":"External id equality filter.","required":false,"type":"string"},{"name":"name","in":"query","description":"CONTAINS filter on name.","required":false,"type":"string"},{"name":"updateDate","in":"query","description":"Returns sales persons created or updated after this date.","required":false,"type":"string","format":"date-time"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of sales persons.","schema":{"$ref":"#/definitions/PagedResult[SalesPersonResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-persons","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-persons"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-persons"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-persons"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-persons","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:sales-person","position":"before"}]},"post":{"tags":["Sales Persons"],"summary":"Creates a sales person.","operationId":"CreateSalesPerson","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The sales person to create.","required":true,"schema":{"$ref":"#/definitions/SalesPersonUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-persons"}}},"201":{"description":"Sales person created.","schema":{"$ref":"#/definitions/SalesPersonResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-persons","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-persons"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-persons"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-persons","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-persons","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:sales-person","position":"before"}],"x-business-errors":[{"code":"DupplicatedCode","description":"Another sales person already uses the same code."},{"code":"DupplicatedName","description":"Another sales person already uses the same name."}]}},"/v3/sales-persons/code/{code}":{"put":{"tags":["Sales Persons"],"summary":"Updates a sales person by code.","operationId":"UpdateSalesPersonByCode","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The sales person code.","required":true,"type":"string"},{"name":"request","in":"body","description":"The updated sales person values.","required":true,"schema":{"$ref":"#/definitions/SalesPersonUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated sales person.","schema":{"$ref":"#/definitions/SalesPersonResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-persons/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-persons/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-persons/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-persons/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-persons/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-persons/code/{code}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-persons/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:sales-person","position":"before"}],"x-business-errors":[{"code":"DupplicatedCode","description":"Another sales person already uses the same code."},{"code":"DupplicatedName","description":"Another sales person already uses the same name."}]},"delete":{"tags":["Sales Persons"],"summary":"Deletes a sales person by code.","operationId":"DeleteSalesPersonByCode","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The sales person code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-persons/code/{code}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-persons/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-persons/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-persons/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-persons/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-persons/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-persons/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:sales-person","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The sales person is referenced by existing documents or related records."}]}},"/v3/sales-persons/{id}":{"get":{"tags":["Sales Persons"],"summary":"Gets a sales person by id.","operationId":"GetSalesPersonById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The sales person id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The sales person.","schema":{"$ref":"#/definitions/SalesPersonResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-persons/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-persons/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:sales-person","position":"before"}]},"put":{"tags":["Sales Persons"],"summary":"Updates a sales person by id.","operationId":"UpdateSalesPersonById","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The sales person id.","required":true,"type":"integer","format":"int32"},{"name":"request","in":"body","description":"The updated sales person values.","required":true,"schema":{"$ref":"#/definitions/SalesPersonUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated sales person.","schema":{"$ref":"#/definitions/SalesPersonResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-persons/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-persons/{id}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-persons/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:sales-person","position":"before"}],"x-business-errors":[{"code":"DupplicatedCode","description":"Another sales person already uses the same code."},{"code":"DupplicatedName","description":"Another sales person already uses the same name."}]},"delete":{"tags":["Sales Persons"],"summary":"Deletes a sales person by id.","operationId":"DeleteSalesPersonById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The sales person id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-persons/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/sales-persons/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-persons/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-persons/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:sales-person","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The sales person is referenced by existing documents or related records."}]}},"/v3/sales-returns":{"get":{"tags":["Sales Returns"],"summary":"Gets a sales return by code.","description":"- `code` is required.","operationId":"GetSalesReturnByCode","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"query","description":"The sales return code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The sales return.","schema":{"$ref":"#/definitions/SalesReturnResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-returns","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-returns"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-returns"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-returns"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-returns","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:sales-return","position":"before"}]},"post":{"tags":["Sales Returns"],"summary":"Creates a sales return by referencing an existing sales order or issue offering, with\r\nline details resolved from that document.","operationId":"CreateSalesReturn","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The sales return to create.","required":true,"schema":{"$ref":"#/definitions/CreateSalesReturnRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-returns"}}},"201":{"description":"Sales return created.","schema":{"$ref":"#/definitions/SalesReturnResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-returns","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-returns"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-returns"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-returns","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-returns","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:sales-return","position":"before"}],"x-business-errors":[{"code":"SourceLineNotFound","description":"A sourceSalesOrderDetailId/sourceWorkOrderDetailId in sourceDocumentDetails doesn't match any returnable line on the referenced document, or a sourceSalesOrderDetailId was given alone while sourceDocumentCode is an issue offering (SalesReturnUnifiedLogic.FindUnmatchedSelectors/RowMatchesSelector)."},{"code":"DuplicateSourceLineId","description":"The same source line was referenced more than once in sourceDocumentDetails (SalesReturnUnifiedLogic.FindDuplicateSelectors)."},{"code":"SourceDetailTypeMismatch","description":"sourceSalesOrderDetailId was given alone but resolves to a stock item, not a service item; supply sourceWorkOrderDetailId instead (SalesReturnUnifiedLogic.ValidateSelectorAgainstRow)."},{"code":"SourceDetailLinkageMismatch","description":"Both sourceSalesOrderDetailId and sourceWorkOrderDetailId were given but don't refer to the same line (SalesReturnUnifiedLogic.ValidateSelectorAgainstRow)."},{"code":"ReturnDiscountMismatch","description":"The provided returnDiscount doesn't match the computed sum of the resolved lines' own discounts (SalesReturnUnifiedLogic.CreateSalesReturnFromSource)."},{"code":"OverLimitReturnedQuantity","description":"The requested quantity for a line exceeds that line's remaining returnable balance (SalesReturnUnifiedLogic.ValidateReturnableQuantities)."},{"code":"NoSelectedTreasury","description":"cashAmount is greater than zero and the calling user's permissions require an automatic cash-out, but cashAccountId wasn't supplied (SalesReturnUnifiedLogic.ValidateTreasuryForAutoCash)."},{"code":"TreasuryAccountTypeInvalid","description":"The account referenced by cashAccountId is not of type Cash or Bank (SalesReturnUnifiedLogic.ValidateTreasuryForAutoCash)."},{"code":"TreasuryNotPermitted","description":"The calling user has no Cash Account / Bank Account permission on the account referenced by cashAccountId (SalesReturnUnifiedLogic.ValidateTreasuryForAutoCash)."},{"code":"CustomerHaveNoRelatedAccount","description":"The selected customer has no related GL account; raised when the journal entry for the return is created (AccDocumentLogic)."},{"code":"RelatedSalesOrderCancelled","description":"The source sales order is already cancelled, raised when the journal entry for an automatic cash-out or credit note is created for the return (AccDocumentLogic.InsertAccDocument)."},{"code":"SalesReturnAlreadyReceived","description":"The receiving work order linked to this sales return has already been issued, so it cannot be processed again (WorkOrder)."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate exceeds the allowed decimal precision."},{"code":"EdaraBusinessError","description":"A legacy validation rule inside the shared sales-document insert pipeline rejected the request, e.g. zero/duplicated items, price below cost, or a discount exceeding the total (SalesDocumentLogic.InsertSalesDocument)."}]}},"/v3/sales-returns/returnable":{"get":{"tags":["Sales Returns"],"summary":"Gets the return proposal for an order.","operationId":"GetReturnableSalesReturn","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"query","description":"Required. Sales-order code, issue-offering code, or a reference\r\n            number that resolves to one.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The return proposal.","schema":{"$ref":"#/definitions/ReturnableSalesReturnResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-returns/returnable","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-returns/returnable"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-returns/returnable"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-returns/returnable","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-returns/returnable"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-returns/returnable","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:sales-return","position":"before"}],"x-business-errors":[{"code":"OrderHasNoIssuedItems","description":"The order has no issued items to return (SalesReturnEligibilityLogic.FindReturnSource/ListReturnableLines)."},{"code":"OrderCompletelyReturned","description":"Every issued line on the order has already been returned in full (SalesReturnEligibilityLogic.ClassifyEmptyResult)."},{"code":"SalesPersonNotPermitted","description":"The order's salesperson is not one the current user may see (SalesReturnEligibilityLogic.IsSalesPersonPermitted)."}]}},"/v3/sales-stores":{"get":{"tags":["Sales Stores"],"summary":"Lists sales stores.","operationId":"GetSalesStores","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"updateDate","in":"query","description":"Returns records created or updated after the specified date.","required":false,"type":"string","format":"date-time"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of sales stores.","schema":{"$ref":"#/definitions/PagedResult[SalesStoreResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-stores","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-stores"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-stores"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-stores"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-stores","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:sales-store","position":"before"}]},"post":{"tags":["Sales Stores"],"summary":"Creates a sales store.","operationId":"CreateSalesStore","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The sales store to create.","required":true,"schema":{"$ref":"#/definitions/SalesStoreUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/sales-stores"}}},"201":{"description":"Sales store created.","schema":{"$ref":"#/definitions/SalesStoreResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/sales-stores","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/sales-stores"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/sales-stores"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/sales-stores","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/sales-stores","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:sales-store","position":"before"}],"x-business-errors":[{"code":"DupplicatedCode","description":"Another sales store already uses the same code."},{"code":"DupplicatedName","description":"Another sales store already uses the same description."}]}},"/v3/service-items":{"get":{"tags":["Service Items"],"summary":"Lists service items.","operationId":"GetServiceItems","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"code","in":"query","description":"CONTAINS filter on code.","required":false,"type":"string"},{"name":"name","in":"query","description":"CONTAINS filter on description.","required":false,"type":"string"},{"name":"externalId","in":"query","description":"External id equality filter.","required":false,"type":"string"},{"name":"search","in":"query","description":"CONTAINS filter across code or description.","required":false,"type":"string"},{"name":"updateDate","in":"query","description":"Returns service items inserted or updated strictly after this value.","required":false,"type":"string","format":"date-time"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of service items.","schema":{"$ref":"#/definitions/PagedResult[ServiceItemResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/service-items","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/service-items"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/service-items"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/service-items"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/service-items","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:service-item","position":"before"}]},"post":{"tags":["Service Items"],"summary":"Creates a service item.","operationId":"CreateServiceItem","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The service item to create.","required":true,"schema":{"$ref":"#/definitions/ServiceItemUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/service-items"}}},"201":{"description":"Service item created.","schema":{"$ref":"#/definitions/ServiceItemResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/service-items","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/service-items"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/service-items"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/service-items","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/service-items","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:service-item","position":"before"}],"x-business-errors":[{"code":"CannotAssignInactiveTax","description":"The referenced tax is inactive."},{"code":"DupplicatedCode","description":"Another service item already uses the same code."},{"code":"DupplicatedName","description":"Another service item already uses the same description."},{"code":"InvalidSpecialCharacters","description":"The description contains characters blocked by the system."},{"code":"InvalidTaxScopeForItem","description":"The referenced tax is scoped to stock items."},{"code":"InvalidTaxTypeForItem","description":"The referenced tax has no sales/purchase (or withholding) account configured."},{"code":"MustSelectValidTaxType","description":"Egypt e-invoicing/e-receipt is connected and a tax must be supplied."},{"code":"TaxNotFound","description":"The referenced tax does not exist."}]}},"/v3/service-items/code/{code}":{"put":{"tags":["Service Items"],"summary":"Updates a service item by code.","operationId":"UpdateServiceItemByCode","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The service item code.","required":true,"type":"string"},{"name":"request","in":"body","description":"The updated service item values.","required":true,"schema":{"$ref":"#/definitions/ServiceItemUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated service item.","schema":{"$ref":"#/definitions/ServiceItemResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/service-items/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/service-items/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/service-items/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/service-items/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/service-items/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/service-items/code/{code}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/service-items/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:service-item","position":"before"}],"x-business-errors":[{"code":"CannotAssignInactiveTax","description":"The referenced tax is inactive."},{"code":"DescriptionContainsInvalidSpecialCharacters","description":"The description contains characters blocked by the system."},{"code":"DupplicatedCode","description":"Another service item already uses the same code."},{"code":"DupplicatedName","description":"Another service item already uses the same description."},{"code":"InvalidTaxScopeForItem","description":"The referenced tax is scoped to stock items."},{"code":"InvalidTaxTypeForItem","description":"The referenced tax has no sales/purchase (or withholding) account configured."},{"code":"MustSelectValidTaxType","description":"Egypt e-invoicing/e-receipt is connected and a tax must be supplied."},{"code":"TaxNotFound","description":"The referenced tax does not exist."}]},"delete":{"tags":["Service Items"],"summary":"Deletes a service item by code.","operationId":"DeleteServiceItemByCode","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The service item code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/service-items/code/{code}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/service-items/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/service-items/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/service-items/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/service-items/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/service-items/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/service-items/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:service-item","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The service item is referenced by existing documents or related records."}]}},"/v3/service-items/{id}":{"get":{"tags":["Service Items"],"summary":"Gets a service item by id.","operationId":"GetServiceItemById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The service item id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The service item.","schema":{"$ref":"#/definitions/ServiceItemResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/service-items/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/service-items/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/service-items/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/service-items/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/service-items/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/service-items/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:service-item","position":"before"}]},"put":{"tags":["Service Items"],"summary":"Updates a service item by id.","operationId":"UpdateServiceItemById","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The service item id.","required":true,"type":"integer","format":"int32"},{"name":"request","in":"body","description":"The updated service item values.","required":true,"schema":{"$ref":"#/definitions/ServiceItemUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated service item.","schema":{"$ref":"#/definitions/ServiceItemResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/service-items/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/service-items/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/service-items/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/service-items/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/service-items/{id}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/service-items/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/service-items/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:service-item","position":"before"}],"x-business-errors":[{"code":"CannotAssignInactiveTax","description":"The referenced tax is inactive."},{"code":"DescriptionContainsInvalidSpecialCharacters","description":"The description contains characters blocked by the system."},{"code":"DupplicatedCode","description":"Another service item already uses the same code."},{"code":"DupplicatedName","description":"Another service item already uses the same description."},{"code":"InvalidTaxScopeForItem","description":"The referenced tax is scoped to stock items."},{"code":"InvalidTaxTypeForItem","description":"The referenced tax has no sales/purchase (or withholding) account configured."},{"code":"MustSelectValidTaxType","description":"Egypt e-invoicing/e-receipt is connected and a tax must be supplied."},{"code":"TaxNotFound","description":"The referenced tax does not exist."}]},"delete":{"tags":["Service Items"],"summary":"Deletes a service item by id.","operationId":"DeleteServiceItemById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The service item id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/service-items/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/service-items/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/service-items/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/service-items/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/service-items/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/service-items/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/service-items/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:service-item","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The service item is referenced by existing documents or related records."}]}},"/v3/settings":{"get":{"tags":["Settings"],"summary":"Lists settings.","operationId":"GetSettings","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"module","in":"query","description":"Optional module filter.","required":false,"type":"string"},{"name":"key","in":"query","description":"Optional key filter.","required":false,"type":"string"},{"name":"updateDate","in":"query","description":"Optional updated-after filter.","required":false,"type":"string","format":"date-time"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of settings.","schema":{"$ref":"#/definitions/PagedResult[SettingResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/settings","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/settings"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/settings"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/settings"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/settings","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:system-setting","position":"before"}]}},"/v3/stock-items":{"get":{"tags":["Stock Items"],"summary":"Lists stock items.","operationId":"GetStockItems","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"ids","in":"query","description":"Optional stock-item identifier filter.","required":false,"type":"array","items":{"type":"integer","format":"int32"},"collectionFormat":"multi","default":[],"minimum":0,"exclusiveMinimum":true},{"name":"codes","in":"query","description":"Optional codes filter.","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi","default":[]},{"name":"partNumbers","in":"query","description":"Optional part-numbers filter.","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi","default":[]},{"name":"externalIds","in":"query","description":"Optional external-ids filter.","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi","default":[]},{"name":"description","in":"query","description":"Optional description contains filter.","required":false,"type":"string"},{"name":"code","in":"query","description":"Optional exact-code filter.","required":false,"type":"string"},{"name":"sku","in":"query","description":"Optional SKU filter.","required":false,"type":"string"},{"name":"partNumber","in":"query","description":"Optional part-number filter.","required":false,"type":"string"},{"name":"externalId","in":"query","description":"Optional exact external-id filter.","required":false,"type":"string"},{"name":"classificationId","in":"query","description":"Optional classification identifier filter.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"updateDate","in":"query","description":"Updated-after filter.","required":false,"type":"string","format":"date-time"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of stock items.","schema":{"$ref":"#/definitions/PagedResult[StockItemResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item","position":"before"}]},"post":{"tags":["Stock Items"],"summary":"Creates a stock item.","description":"- **IsCurrent** on each `ChildItems` entry is **ignored on create** — it only applies to Update calls that transform a simple item into a grouping item.","operationId":"CreateStockItem","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The stock item to create.","required":true,"schema":{"$ref":"#/definitions/CreateStockItemRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items"}}},"201":{"description":"Stock item created.","schema":{"$ref":"#/definitions/StockItemResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/stock-items","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:stock-item","position":"before"}],"x-business-errors":[{"code":"CannotAssignInactiveTax","description":"An inactive tax cannot be assigned."},{"code":"CodeContainsInvalidSpecialCharacters","description":"The stock-item code contains invalid special characters."},{"code":"DescriptionContainsInvalidSpecialCharacters","description":"The stock-item description contains invalid special characters."},{"code":"DupplicatedSKU","description":"Another stock item already uses the same SKU."},{"code":"InvalidTaxScopeForItem","description":"The tax scope is not valid for this stock item."},{"code":"InvalidTaxTypeForItem","description":"The tax type is not valid for this stock item."},{"code":"MustSelectValidTaxType","description":"A valid tax type must be selected."},{"code":"OtherLangDescriptionContainsInvalidSpecialCharacters","description":"The other-language description contains invalid special characters."},{"code":"StockItemBrandRequired","description":"A brand must be assigned to the stock item."},{"code":"StockItemCodeExists","description":"Another stock item already uses the same code."},{"code":"StockItemCodeRequired","description":"The stock-item code is required."},{"code":"StockItemDescriptionExists","description":"Another stock item already uses the same description."},{"code":"StockItemPartNumberExists","description":"Another stock item already uses the same part number."},{"code":"StockItemPartNumberRequired","description":"The stock-item part number is required."},{"code":"StockItemSalesPriceMustBeGreaterThanZero","description":"The sales price must be greater than zero."},{"code":"StockItemSKURequired","description":"The stock-item SKU is required."},{"code":"StockitemsClassificationCannotBeNull","description":"A classification must be assigned to the stock item."},{"code":"TaxNotFound","description":"The specified tax was not found."}]}},"/v3/stock-items/balances":{"get":{"tags":["Stock Items"],"summary":"Lists stock item balances.","operationId":"GetStockItemBalances","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"stockItemId","in":"query","description":"Optional stock-item identifier filter.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"warehouseId","in":"query","description":"Optional warehouse identifier filter.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of stock item balances.","schema":{"$ref":"#/definitions/PagedResult[StockItemBalanceResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/balances","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/balances"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/balances"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/balances"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/balances","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item:balance","position":"before"}]}},"/v3/stock-items/batch":{"post":{"tags":["Stock Items"],"summary":"Creates stock items in batch.","operationId":"BatchInsertStockItems","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"requests","in":"body","description":"The stock items to create.","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/CreateStockItemRequest"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Batch insert result.","schema":{"$ref":"#/definitions/StockItemBatchResult"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/batch","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/batch"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/batch"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/stock-items/batch","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/batch"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/batch","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:stock-item","position":"before"}],"x-business-errors":[{"code":"CannotAssignInactiveTax","description":"An inactive tax cannot be assigned."},{"code":"CodeContainsInvalidSpecialCharacters","description":"The stock-item code contains invalid special characters."},{"code":"DescriptionContainsInvalidSpecialCharacters","description":"The stock-item description contains invalid special characters."},{"code":"DupplicatedSKU","description":"Another stock item already uses the same SKU."},{"code":"InvalidTaxScopeForItem","description":"The tax scope is not valid for this stock item."},{"code":"InvalidTaxTypeForItem","description":"The tax type is not valid for this stock item."},{"code":"MustSelectValidTaxType","description":"A valid tax type must be selected."},{"code":"OtherLangDescriptionContainsInvalidSpecialCharacters","description":"The other-language description contains invalid special characters."},{"code":"StockItemBrandRequired","description":"A brand must be assigned to the stock item."},{"code":"StockItemCodeExists","description":"Another stock item already uses the same code."},{"code":"StockItemCodeRequired","description":"The stock-item code is required."},{"code":"StockItemDescriptionExists","description":"Another stock item already uses the same description."},{"code":"StockItemPartNumberExists","description":"Another stock item already uses the same part number."},{"code":"StockItemPartNumberRequired","description":"The stock-item part number is required."},{"code":"StockItemSalesPriceMustBeGreaterThanZero","description":"The sales price must be greater than zero."},{"code":"StockItemSKURequired","description":"The stock-item SKU is required."},{"code":"StockitemsClassificationCannotBeNull","description":"A classification must be assigned to the stock item."},{"code":"TaxNotFound","description":"The specified tax was not found."}]}},"/v3/stock-items/batch/by-code":{"put":{"tags":["Stock Items"],"summary":"Batch updates stock items by code.","operationId":"BatchUpdateStockItemsByCode","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"requests","in":"body","description":"The stock items to update.","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/UpdateStockItemRequest"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Batch update result.","schema":{"$ref":"#/definitions/StockItemBatchResult"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/batch/by-code","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/batch/by-code"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/batch/by-code"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/stock-items/batch/by-code","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/batch/by-code"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/batch/by-code","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:stock-item","position":"before"}],"x-business-errors":[{"code":"BatchNumberCannotChangeInUse","description":"The batch-number setting cannot be changed because the item is already used in transactions."},{"code":"CannotAssignInactiveTax","description":"An inactive tax cannot be assigned."},{"code":"ChangingStockItemUOMnotAllowedAlreadyIntransactions","description":"The unit of measure cannot change because the item is already used in transactions."},{"code":"CodeContainsInvalidSpecialCharacters","description":"The stock-item code contains invalid special characters."},{"code":"DescriptionContainsInvalidSpecialCharacters","description":"The stock-item description contains invalid special characters."},{"code":"DupplicatedSKU","description":"Another stock item already uses the same SKU."},{"code":"EnforceExpirationDateEntryCannotChangeInUse","description":"The expiration-date-entry flag cannot be changed because the item is already used in transactions."},{"code":"InvalidTaxScopeForItem","description":"The tax scope is not valid for this stock item."},{"code":"InvalidTaxTypeForItem","description":"The tax type is not valid for this stock item."},{"code":"MustSelectValidTaxType","description":"A valid tax type must be selected."},{"code":"OtherLangDescriptionContainsInvalidSpecialCharacters","description":"The other-language description contains invalid special characters."},{"code":"PhantomRead","description":"The stock item was modified by another user; reload and retry."},{"code":"StockItemBrandRequired","description":"A brand must be assigned to the stock item."},{"code":"StockItemCodeExists","description":"Another stock item already uses the same code."},{"code":"StockItemCodeRequired","description":"The stock-item code is required."},{"code":"StockItemDescriptionExists","description":"Another stock item already uses the same description."},{"code":"StockItemPartNumberExists","description":"Another stock item already uses the same part number."},{"code":"StockItemPartNumberRequired","description":"The stock-item part number is required."},{"code":"StockItemSalesPriceMustBeGreaterThanZero","description":"The sales price must be greater than zero."},{"code":"StockItemSKURequired","description":"The stock-item SKU is required."},{"code":"TaxNotFound","description":"The specified tax was not found."}]}},"/v3/stock-items/batch/by-id":{"put":{"tags":["Stock Items"],"summary":"Batch updates stock items by id.","operationId":"BatchUpdateStockItemsById","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"requests","in":"body","description":"The stock items to update.","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/UpdateStockItemRequest"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Batch update result.","schema":{"$ref":"#/definitions/StockItemBatchResult"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/batch/by-id","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/batch/by-id"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/batch/by-id"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/stock-items/batch/by-id","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/batch/by-id"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/batch/by-id","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:stock-item","position":"before"}],"x-business-errors":[{"code":"BatchNumberCannotChangeInUse","description":"The batch-number setting cannot be changed because the item is already used in transactions."},{"code":"CannotAssignInactiveTax","description":"An inactive tax cannot be assigned."},{"code":"ChangingStockItemUOMnotAllowedAlreadyIntransactions","description":"The unit of measure cannot change because the item is already used in transactions."},{"code":"CodeContainsInvalidSpecialCharacters","description":"The stock-item code contains invalid special characters."},{"code":"DescriptionContainsInvalidSpecialCharacters","description":"The stock-item description contains invalid special characters."},{"code":"DupplicatedSKU","description":"Another stock item already uses the same SKU."},{"code":"EnforceExpirationDateEntryCannotChangeInUse","description":"The expiration-date-entry flag cannot be changed because the item is already used in transactions."},{"code":"InvalidTaxScopeForItem","description":"The tax scope is not valid for this stock item."},{"code":"InvalidTaxTypeForItem","description":"The tax type is not valid for this stock item."},{"code":"MustSelectValidTaxType","description":"A valid tax type must be selected."},{"code":"OtherLangDescriptionContainsInvalidSpecialCharacters","description":"The other-language description contains invalid special characters."},{"code":"PhantomRead","description":"The stock item was modified by another user; reload and retry."},{"code":"StockItemBrandRequired","description":"A brand must be assigned to the stock item."},{"code":"StockItemCodeExists","description":"Another stock item already uses the same code."},{"code":"StockItemCodeRequired","description":"The stock-item code is required."},{"code":"StockItemDescriptionExists","description":"Another stock item already uses the same description."},{"code":"StockItemPartNumberExists","description":"Another stock item already uses the same part number."},{"code":"StockItemPartNumberRequired","description":"The stock-item part number is required."},{"code":"StockItemSalesPriceMustBeGreaterThanZero","description":"The sales price must be greater than zero."},{"code":"StockItemSKURequired","description":"The stock-item SKU is required."},{"code":"TaxNotFound","description":"The specified tax was not found."}]}},"/v3/stock-items/batch/by-sku":{"put":{"tags":["Stock Items"],"summary":"Batch updates stock items by SKU.","operationId":"BatchUpdateStockItemsBySKU","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"requests","in":"body","description":"The stock items to update.","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/UpdateStockItemRequest"}}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Batch update result.","schema":{"$ref":"#/definitions/StockItemBatchResult"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/batch/by-sku","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/batch/by-sku"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/batch/by-sku"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/stock-items/batch/by-sku","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/batch/by-sku"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/batch/by-sku","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:stock-item","position":"before"}],"x-business-errors":[{"code":"BatchNumberCannotChangeInUse","description":"The batch-number setting cannot be changed because the item is already used in transactions."},{"code":"CannotAssignInactiveTax","description":"An inactive tax cannot be assigned."},{"code":"ChangingStockItemUOMnotAllowedAlreadyIntransactions","description":"The unit of measure cannot change because the item is already used in transactions."},{"code":"CodeContainsInvalidSpecialCharacters","description":"The stock-item code contains invalid special characters."},{"code":"DescriptionContainsInvalidSpecialCharacters","description":"The stock-item description contains invalid special characters."},{"code":"DupplicatedSKU","description":"Another stock item already uses the same SKU."},{"code":"EnforceExpirationDateEntryCannotChangeInUse","description":"The expiration-date-entry flag cannot be changed because the item is already used in transactions."},{"code":"InvalidTaxScopeForItem","description":"The tax scope is not valid for this stock item."},{"code":"InvalidTaxTypeForItem","description":"The tax type is not valid for this stock item."},{"code":"MustSelectValidTaxType","description":"A valid tax type must be selected."},{"code":"OtherLangDescriptionContainsInvalidSpecialCharacters","description":"The other-language description contains invalid special characters."},{"code":"PhantomRead","description":"The stock item was modified by another user; reload and retry."},{"code":"StockItemBrandRequired","description":"A brand must be assigned to the stock item."},{"code":"StockItemCodeExists","description":"Another stock item already uses the same code."},{"code":"StockItemCodeRequired","description":"The stock-item code is required."},{"code":"StockItemDescriptionExists","description":"Another stock item already uses the same description."},{"code":"StockItemPartNumberExists","description":"Another stock item already uses the same part number."},{"code":"StockItemPartNumberRequired","description":"The stock-item part number is required."},{"code":"StockItemSalesPriceMustBeGreaterThanZero","description":"The sales price must be greater than zero."},{"code":"StockItemSKURequired","description":"The stock-item SKU is required."},{"code":"TaxNotFound","description":"The specified tax was not found."}]}},"/v3/stock-items/code/{code}":{"put":{"tags":["Stock Items"],"summary":"Updates a stock item by code.","description":"- When transforming a simple item into a grouping item (`existing.IsGroupingItem = false`, `request.IsGroupingItem = true`), exactly one entry in `ChildItems` must set **IsCurrent = true** to mark the carry-over of the original simple item. On Updates of already-grouping items, `IsCurrent` is ignored.","operationId":"UpdateStockItemByCode","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The stock item code.","required":true,"type":"string"},{"name":"request","in":"body","description":"The updated stock item values.","required":true,"schema":{"$ref":"#/definitions/UpdateStockItemRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated stock item.","schema":{"$ref":"#/definitions/StockItemResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/stock-items/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/code/{code}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:stock-item","position":"before"}],"x-business-errors":[{"code":"BatchNumberCannotChangeInUse","description":"The batch-number setting cannot be changed because the item is already used in transactions."},{"code":"CannotAssignInactiveTax","description":"An inactive tax cannot be assigned."},{"code":"ChangingStockItemUOMnotAllowedAlreadyIntransactions","description":"The unit of measure cannot change because the item is already used in transactions."},{"code":"CodeContainsInvalidSpecialCharacters","description":"The stock-item code contains invalid special characters."},{"code":"DescriptionContainsInvalidSpecialCharacters","description":"The stock-item description contains invalid special characters."},{"code":"DupplicatedSKU","description":"Another stock item already uses the same SKU."},{"code":"EnforceExpirationDateEntryCannotChangeInUse","description":"The expiration-date-entry flag cannot be changed because the item is already used in transactions."},{"code":"InvalidTaxScopeForItem","description":"The tax scope is not valid for this stock item."},{"code":"InvalidTaxTypeForItem","description":"The tax type is not valid for this stock item."},{"code":"MustSelectValidTaxType","description":"A valid tax type must be selected."},{"code":"OtherLangDescriptionContainsInvalidSpecialCharacters","description":"The other-language description contains invalid special characters."},{"code":"PhantomRead","description":"The stock item was modified by another user; reload and retry."},{"code":"StockItemBrandRequired","description":"A brand must be assigned to the stock item."},{"code":"StockItemCodeExists","description":"Another stock item already uses the same code."},{"code":"StockItemCodeRequired","description":"The stock-item code is required."},{"code":"StockItemDescriptionExists","description":"Another stock item already uses the same description."},{"code":"StockItemPartNumberExists","description":"Another stock item already uses the same part number."},{"code":"StockItemPartNumberRequired","description":"The stock-item part number is required."},{"code":"StockItemSalesPriceMustBeGreaterThanZero","description":"The sales price must be greater than zero."},{"code":"StockItemSKURequired","description":"The stock-item SKU is required."},{"code":"TaxNotFound","description":"The specified tax was not found."}]}},"/v3/stock-items/code/{code}/deactivate":{"put":{"tags":["Stock Items"],"summary":"Deactivates a stock item by code.","operationId":"DeactivateStockItemByCode","consumes":[],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The stock item code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/code/{code}/deactivate"}}},"204":{"description":"Stock item deactivated."},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/code/{code}/deactivate","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/code/{code}/deactivate"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/code/{code}/deactivate"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/code/{code}/deactivate"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/code/{code}/deactivate","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:stock-item","position":"before"}]}},"/v3/stock-items/cost/by-ids":{"get":{"tags":["Stock Items"],"summary":"Gets stock item costs by ids.","description":"- The identifier list cannot exceed 100 entries.","operationId":"GetStockItemCostsByIds","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"ids","in":"query","description":"Comma-separated stock-item identifiers (max 100).","required":false,"type":"string"},{"name":"date","in":"query","description":"Cost evaluation date (on or before).","required":true,"type":"string","format":"date-time"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Stock item costs.","schema":{"type":"array","items":{"$ref":"#/definitions/StockItemCostResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/cost/by-ids","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/cost/by-ids"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/cost/by-ids"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/cost/by-ids"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/cost/by-ids","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item:balance","position":"before"}]}},"/v3/stock-items/cost/by-part-numbers":{"get":{"tags":["Stock Items"],"summary":"Gets stock item costs by part numbers.","description":"- The part-number list cannot exceed 200 entries.","operationId":"GetStockItemCostsByPartNumbers","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"partNumbers","in":"query","description":"Comma-separated stock-item part numbers (max 200).","required":false,"type":"string"},{"name":"date","in":"query","description":"Cost evaluation date (on or before).","required":true,"type":"string","format":"date-time"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Stock item costs.","schema":{"type":"array","items":{"$ref":"#/definitions/StockItemCostResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/cost/by-part-numbers","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/cost/by-part-numbers"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/cost/by-part-numbers"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/cost/by-part-numbers"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/cost/by-part-numbers","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item:balance","position":"before"}]}},"/v3/stock-items/cost/by-skus":{"get":{"tags":["Stock Items"],"summary":"Gets stock item costs by SKUs.","description":"- The SKU list cannot exceed 200 entries.","operationId":"GetStockItemCostsBySkus","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"skus","in":"query","description":"Comma-separated stock-item SKUs (max 200).","required":false,"type":"string"},{"name":"date","in":"query","description":"Cost evaluation date (on or before).","required":true,"type":"string","format":"date-time"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Stock item costs.","schema":{"type":"array","items":{"$ref":"#/definitions/StockItemCostResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/cost/by-skus","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/cost/by-skus"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/cost/by-skus"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/cost/by-skus"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/cost/by-skus","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item:balance","position":"before"}]}},"/v3/stock-items/external-id":{"put":{"tags":["Stock Items"],"summary":"Updates a stock item external id.","operationId":"UpdateStockItemExternalId","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The stock item external id to update.","required":true,"schema":{"$ref":"#/definitions/UpdateStockItemExternalIdRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated stock item.","schema":{"$ref":"#/definitions/StockItemResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/external-id","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/external-id"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/external-id"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/stock-items/external-id","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/external-id"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/external-id","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:stock-item","position":"before"}],"x-business-errors":[{"code":"PhantomRead","description":"The stock item was modified by another user; reload and retry."}]}},"/v3/stock-items/global-balances":{"get":{"tags":["Stock Items"],"summary":"Gets a stock item global balance.","description":"- Supply either code or sku, but not both.","operationId":"GetStockItemGlobalBalance","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"code","in":"query","description":"Stock-item code. Mutually exclusive with {Edara.API.DTOs.Warehouse.StockItems.Requests.GetStockItemGlobalBalanceQuery.Sku}.","required":false,"type":"string"},{"name":"sku","in":"query","description":"Stock-item SKU. Mutually exclusive with {Edara.API.DTOs.Warehouse.StockItems.Requests.GetStockItemGlobalBalanceQuery.Code}.","required":false,"type":"string"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Stock item global balance.","schema":{"format":"double","type":"number"}},"404":{"description":"No stock item was found for the supplied code or SKU.","schema":{"$ref":"#/definitions/ProblemDetails"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/global-balances","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/global-balances"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/global-balances"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/global-balances"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/global-balances","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item:balance","position":"before"}]}},"/v3/stock-items/link-to-parent":{"post":{"tags":["Stock Items"],"summary":"Links a stock item to a parent.","operationId":"LinkStockItemToParent","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The link payload.","required":true,"schema":{"$ref":"#/definitions/LinkStockItemToParentRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/link-to-parent"}}},"204":{"description":"Stock item linked."},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/link-to-parent","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/link-to-parent"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/link-to-parent"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/stock-items/link-to-parent","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/link-to-parent","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:stock-item","position":"before"}],"x-business-errors":[{"code":"ChildItemEqualsParentItem","description":"A stock item cannot be linked to itself."},{"code":"ChildItemNotEligibleForLink","description":"The child stock item is not eligible to be linked (missing, inactive, already a grouping item, already linked to a parent, or already has dynamic-property values)."},{"code":"ParentItemMustBeGroupingItem","description":"The parent stock item must exist and be marked as a grouping item."},{"code":"ParentDynamicPropertiesInconsistent","description":"The parent item has dynamic-property definitions but no existing children; this state is inconsistent."},{"code":"DynamicPropertyValuesInvalid","description":"One or more dynamic-property value identifiers are invalid or do not belong to a property group."},{"code":"MultipleValuesForSameDynamicPropertyGroup","description":"More than one value was supplied for the same dynamic-property group."},{"code":"DuplicateDynamicPropertyCombination","description":"Another child of the same parent already uses this exact dynamic-property value combination."},{"code":"DynamicPropertyGroupsDoNotMatchExistingChildren","description":"The dynamic-property groups supplied do not match the groups used by existing children of this parent."}]}},"/v3/stock-items/list":{"post":{"tags":["Stock Items"],"summary":"Lists stock items by filters.","operationId":"GetStockItemsByFilters","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"filters","in":"body","description":"Stock item filters.","required":true,"schema":{"$ref":"#/definitions/StockItemFiltersRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of stock items.","schema":{"$ref":"#/definitions/PagedResult[StockItemResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/list","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/list"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/list"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/list"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/list","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item","position":"before"}]}},"/v3/stock-items/search":{"get":{"tags":["Stock Items"],"summary":"Searches stock items.","description":"- Separator selects the match mode: comma (`a,b,c`) is OR (default), plus (`a+b`) is AND (every token must match), `*` is wildcard (returns the full active list).\r\n- Tokens are matched against the search fields enabled by tenant settings: `AllowSearchStockItemsByPartNumber`, `AllowSearchStockItemsByItemCode`, `AllowSearchStockItemsByClassificationCode`, `AllowSearchStockItemsByDescription`, `AllowSearchStockItemsBySKU`, `AllowSearchStockItemsByOENumber`.\r\n- Returns the full matched set (no paging). Inactive items are excluded.\r\n- Example: `keywords=screwdriver,hammer` returns items matching either token.","operationId":"SearchStockItems","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"keywords","in":"query","description":"Tokenized expression: `,` = OR, `+` = AND, `*` = all. Example: `screwdriver,hammer`.","required":true,"type":"string"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Matched stock items.","schema":{"type":"array","items":{"$ref":"#/definitions/StockItemResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/search","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/search"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/search"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/search"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/search","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item","position":"before"}]}},"/v3/stock-items/warehouse-summary":{"get":{"tags":["Stock Items"],"summary":"Gets stock item sales and stock position by warehouse.","operationId":"GetStockItemWarehouseSummary","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"dateFrom","in":"query","description":"Start of the sales/sales-return summary period.","required":true,"type":"string","format":"date-time"},{"name":"dateTo","in":"query","description":"End of the sales/sales-return summary period.","required":true,"type":"string","format":"date-time"},{"name":"warehouseId","in":"query","description":"Optional warehouse identifiers filter.","required":false,"type":"array","items":{"type":"integer","format":"int32"},"collectionFormat":"multi","default":[],"minimum":0,"exclusiveMinimum":true},{"name":"stockitemId","in":"query","description":"Optional stock-item identifier filter.","required":false,"type":"integer","format":"int32","minimum":0,"exclusiveMinimum":true},{"name":"excludeOtherParty","in":"query","description":"When true, excludes Issue/Receive Other Party transactions from the sales summary.","required":false,"type":"boolean"},{"name":"offset","in":"query","description":"Number of stock items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of stock items to return. Defaults to 1000, maximum 1000.","required":false,"type":"integer","format":"int32","default":1000,"maximum":5000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of stock item warehouse summaries.","schema":{"$ref":"#/definitions/PagedResult[StockItemWarehouseSummaryResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/warehouse-summary","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/warehouse-summary"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/warehouse-summary"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/warehouse-summary"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/warehouse-summary","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item:balance","position":"before"}]}},"/v3/stock-items/{id}":{"get":{"tags":["Stock Items"],"summary":"Gets a stock item by id.","operationId":"GetStockItemById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The stock item id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The stock item.","schema":{"$ref":"#/definitions/StockItemResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item","position":"before"}]},"put":{"tags":["Stock Items"],"summary":"Updates a stock item by id.","description":"- When transforming a simple item into a grouping item (`existing.IsGroupingItem = false`, `request.IsGroupingItem = true`), exactly one entry in `ChildItems` must set **IsCurrent = true** to mark the carry-over of the original simple item. On Updates of already-grouping items, `IsCurrent` is ignored.","operationId":"UpdateStockItem","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The stock item id.","required":true,"type":"integer","format":"int32"},{"name":"request","in":"body","description":"The updated stock item values.","required":true,"schema":{"$ref":"#/definitions/UpdateStockItemRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated stock item.","schema":{"$ref":"#/definitions/StockItemResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/stock-items/{id}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:stock-item","position":"before"}],"x-business-errors":[{"code":"BatchNumberCannotChangeInUse","description":"The batch-number setting cannot be changed because the item is already used in transactions."},{"code":"CannotAssignInactiveTax","description":"An inactive tax cannot be assigned."},{"code":"ChangingStockItemUOMnotAllowedAlreadyIntransactions","description":"The unit of measure cannot change because the item is already used in transactions."},{"code":"CodeContainsInvalidSpecialCharacters","description":"The stock-item code contains invalid special characters."},{"code":"DescriptionContainsInvalidSpecialCharacters","description":"The stock-item description contains invalid special characters."},{"code":"DupplicatedSKU","description":"Another stock item already uses the same SKU."},{"code":"EnforceExpirationDateEntryCannotChangeInUse","description":"The expiration-date-entry flag cannot be changed because the item is already used in transactions."},{"code":"InvalidTaxScopeForItem","description":"The tax scope is not valid for this stock item."},{"code":"InvalidTaxTypeForItem","description":"The tax type is not valid for this stock item."},{"code":"MustSelectValidTaxType","description":"A valid tax type must be selected."},{"code":"OtherLangDescriptionContainsInvalidSpecialCharacters","description":"The other-language description contains invalid special characters."},{"code":"PhantomRead","description":"The stock item was modified by another user; reload and retry."},{"code":"StockItemBrandRequired","description":"A brand must be assigned to the stock item."},{"code":"StockItemCodeExists","description":"Another stock item already uses the same code."},{"code":"StockItemCodeRequired","description":"The stock-item code is required."},{"code":"StockItemDescriptionExists","description":"Another stock item already uses the same description."},{"code":"StockItemPartNumberExists","description":"Another stock item already uses the same part number."},{"code":"StockItemPartNumberRequired","description":"The stock-item part number is required."},{"code":"StockItemSalesPriceMustBeGreaterThanZero","description":"The sales price must be greater than zero."},{"code":"StockItemSKURequired","description":"The stock-item SKU is required."},{"code":"TaxNotFound","description":"The specified tax was not found."}]},"delete":{"tags":["Stock Items"],"summary":"Deletes a stock item by id.","operationId":"DeleteStockItemById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The stock item id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/stock-items/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:stock-item","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The stock item cannot be deleted because it is in use."},{"code":"ItemCannotDeleteItInUseInPhysicalCount","description":"The stock item cannot be deleted because it is used in a physical count."},{"code":"ItemCannotDeleterelatedToSupplier","description":"The stock item cannot be deleted because it is referenced by a supplier."},{"code":"PhantomRead","description":"The stock item was modified by another user; reload and retry."}]}},"/v3/stock-items/{id}/deactivate":{"put":{"tags":["Stock Items"],"summary":"Deactivates a stock item by id.","operationId":"DeactivateStockItemById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The stock item id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/{id}/deactivate"}}},"204":{"description":"Stock item deactivated."},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/{id}/deactivate","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/{id}/deactivate"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/{id}/deactivate"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/{id}/deactivate"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/{id}/deactivate","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:stock-item","position":"before"}]}},"/v3/stock-items/{stockItemId}/balance":{"get":{"tags":["Stock Items"],"summary":"Gets a stock item balance.","operationId":"GetStockItemBalanceByStockItemId","consumes":[],"produces":["application/json"],"parameters":[{"name":"stockItemId","in":"path","description":"The stock item id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Stock item balance.","schema":{"type":"array","items":{"$ref":"#/definitions/StockItemBalanceResponse"}}},"404":{"description":"No balance found for the specified stock item.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item:balance","position":"before"}]}},"/v3/stock-items/{stockItemId}/balance/warehouses/{warehouseId}":{"get":{"tags":["Stock Items"],"summary":"Gets a stock item balance by warehouse.","operationId":"GetStockItemBalanceByWarehouse","consumes":[],"produces":["application/json"],"parameters":[{"name":"stockItemId","in":"path","description":"The stock item id.","required":true,"type":"integer","format":"int32"},{"name":"warehouseId","in":"path","description":"The warehouse id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Stock item balance for the warehouse.","schema":{"type":"array","items":{"$ref":"#/definitions/StockItemBalanceResponse"}}},"404":{"description":"No balance found for the specified stock item and warehouse.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance/warehouses/{warehouseId}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance/warehouses/{warehouseId}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance/warehouses/{warehouseId}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance/warehouses/{warehouseId}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance/warehouses/{warehouseId}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/balance/warehouses/{warehouseId}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item:balance","position":"before"}]}},"/v3/stock-items/{stockItemId}/cost":{"get":{"tags":["Stock Items"],"summary":"Gets a stock item cost.","operationId":"GetStockItemCost","consumes":[],"produces":["application/json"],"parameters":[{"name":"stockItemId","in":"path","description":"The stock item id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"date","in":"query","description":"Cost date.","required":true,"type":"string","format":"date-time"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Stock item cost.","schema":{"format":"double","type":"number"}},"404":{"description":"No stock item with the specified identifier was found.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/cost"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/cost","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/cost"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/cost"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/cost"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/cost","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item:balance","position":"before"}]}},"/v3/stock-items/{stockItemId}/global-balance":{"get":{"tags":["Stock Items"],"summary":"Gets a stock item global balance by id.","operationId":"GetStockItemGlobalBalanceById","consumes":[],"produces":["application/json"],"parameters":[{"name":"stockItemId","in":"path","description":"The stock item id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Stock item global balance.","schema":{"$ref":"#/definitions/StockItemGlobalBalanceResponse"}},"404":{"description":"No stock item with the specified identifier was found.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/global-balance"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/global-balance","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/global-balance"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/global-balance"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/global-balance"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/global-balance","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item:balance","position":"before"}]}},"/v3/stock-items/{stockItemId}/validate/serial/{serialNo}/returned/{rrCode}":{"get":{"tags":["Stock Items"],"summary":"Validates an item serial returned.","operationId":"ValidateItemSerialReturned","consumes":[],"produces":["application/json"],"parameters":[{"name":"stockItemId","in":"path","description":"The stock item id.","required":true,"type":"integer","format":"int32"},{"name":"serialNo","in":"path","description":"The serial number to validate.","required":true,"type":"string"},{"name":"rrCode","in":"path","description":"The return-receipt code.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"True when the serial has been returned.","schema":{"type":"boolean"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returned/{rrCode}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returned/{rrCode}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returned/{rrCode}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returned/{rrCode}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returned/{rrCode}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returned/{rrCode}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item","position":"before"}]}},"/v3/stock-items/{stockItemId}/validate/serial/{serialNo}/returns/{customerId}":{"get":{"tags":["Stock Items"],"summary":"Validates an item serial for return.","operationId":"ValidateItemSerialForReturn","consumes":[],"produces":["application/json"],"parameters":[{"name":"stockItemId","in":"path","description":"The stock item id.","required":true,"type":"integer","format":"int32"},{"name":"serialNo","in":"path","description":"The serial number to validate.","required":true,"type":"string"},{"name":"customerId","in":"path","description":"The customer id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"True when the serial is valid for return.","schema":{"type":"boolean"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returns/{customerId}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returns/{customerId}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returns/{customerId}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returns/{customerId}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returns/{customerId}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/stock-items/{stockItemId}/validate/serial/{serialNo}/returns/{customerId}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:stock-item","position":"before"}]}},"/v3/suppliers":{"get":{"tags":["Suppliers"],"summary":"Lists suppliers.","operationId":"GetSuppliers","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"name","in":"query","description":"Supplier name filter.","required":false,"type":"string"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of suppliers.","schema":{"$ref":"#/definitions/PagedResult[SupplierResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/suppliers","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/suppliers"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/suppliers"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/suppliers"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/suppliers","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:supplier","position":"before"}]},"post":{"tags":["Suppliers"],"summary":"Creates a supplier.","operationId":"CreateSupplier","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The supplier to create.","required":true,"schema":{"$ref":"#/definitions/SupplierCreateRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/suppliers"}}},"201":{"description":"Supplier created.","schema":{"$ref":"#/definitions/SupplierResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/suppliers","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/suppliers"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/suppliers"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/suppliers","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/suppliers","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:supplier","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another supplier or related account already uses this name."}]}},"/v3/suppliers/{id}":{"get":{"tags":["Suppliers"],"summary":"Gets a supplier by id.","operationId":"GetSupplierById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The supplier id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The supplier.","schema":{"$ref":"#/definitions/SupplierResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/suppliers/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/suppliers/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:supplier","position":"before"}]},"put":{"tags":["Suppliers"],"summary":"Updates a supplier.","operationId":"UpdateSupplier","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The supplier id.","required":true,"type":"integer","format":"int32"},{"name":"request","in":"body","description":"The updated supplier values.","required":true,"schema":{"$ref":"#/definitions/SupplierUpdateRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated supplier.","schema":{"$ref":"#/definitions/SupplierResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/suppliers/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/suppliers/{id}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/suppliers/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:supplier","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another supplier already uses this name."}]},"delete":{"tags":["Suppliers"],"summary":"Deletes a supplier.","operationId":"DeleteSupplier","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The supplier id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/suppliers/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/suppliers/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/suppliers/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/suppliers/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:supplier","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The supplier is still referenced by related records."}]}},"/v3/tags":{"get":{"tags":["Tags"],"summary":"Lists tags.","description":"- `updateDate` filters the result set to rows inserted or updated after the supplied timestamp.","operationId":"GetTags","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"updateDate","in":"query","description":"Optional updated-after filter.","required":false,"type":"string","format":"date-time"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of tags.","schema":{"$ref":"#/definitions/PagedResult[TagResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/tags","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/tags"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/tags"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/tags"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/tags","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:tag","position":"before"}]}},"/v3/tax-invoices/np-report":{"get":{"tags":["Tax Invoices"],"summary":"Gets the notes payable report.","operationId":"GetNpReport","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Notes payable report.","schema":{"$ref":"#/definitions/TaxInvoiceReportResponse"}},"404":{"description":"No report rows were found.","schema":{"$ref":"#/definitions/ProblemDetails"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/tax-invoices/np-report","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/tax-invoices/np-report"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/tax-invoices/np-report"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/tax-invoices/np-report"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/tax-invoices/np-report","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:tax-invoice-report","position":"before"}]}},"/v3/tax-invoices/nr-report":{"get":{"tags":["Tax Invoices"],"summary":"Gets the notes receivable report.","operationId":"GetNrReport","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Notes receivable report.","schema":{"$ref":"#/definitions/TaxInvoiceReportResponse"}},"404":{"description":"No report rows were found.","schema":{"$ref":"#/definitions/ProblemDetails"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/tax-invoices/nr-report","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/tax-invoices/nr-report"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/tax-invoices/nr-report"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/tax-invoices/nr-report"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/tax-invoices/nr-report","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:tax-invoice-report","position":"before"}]}},"/v3/tax-invoices/taxable-sales-invoices":{"post":{"tags":["Tax Invoices"],"summary":"Creates a taxable sales invoice.","operationId":"CreateTaxableSalesInvoice","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The taxable sales invoice to create.","required":true,"schema":{"$ref":"#/definitions/CreateTaxableSalesInvoiceRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/tax-invoices/taxable-sales-invoices"}}},"201":{"description":"Taxable sales invoice created.","schema":{"$ref":"#/definitions/TaxableSalesInvoiceResponse"}},"404":{"description":"The related SI/IO/SO chain could not be resolved.","schema":{"$ref":"#/definitions/ProblemDetails"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/tax-invoices/taxable-sales-invoices","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/tax-invoices/taxable-sales-invoices"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/tax-invoices/taxable-sales-invoices"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/tax-invoices/taxable-sales-invoices","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/tax-invoices/taxable-sales-invoices","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:taxable-sales-invoice","position":"before"}],"x-business-errors":[{"code":"CannotSaveWithZeroQuantityOrPrice","description":"At least one invoice line has zero quantity or zero price."},{"code":"DupplicatedDate","description":"Another invoice already uses the same date or numbering combination."},{"code":"DupplicatedInvoiceNumber","description":"Another invoice already uses the same invoice number."},{"code":"IO_SO_AlreadyHasRelatedInvoice","description":"The source IO or SO already has a taxable invoice, so it cannot be created again."},{"code":"RelatedSalesOrderDeleted","description":"The linked sales order record was deleted, so the taxable sales invoice cannot reference it."},{"code":"RelatedWorkorderDeleted","description":"The linked work order record was deleted, so the taxable sales invoice cannot be built from it."}]}},"/v3/taxes":{"get":{"tags":["Taxes"],"summary":"Lists taxes.","operationId":"GetTaxes","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"name","in":"query","description":"The tax name filter.","required":false,"type":"string"},{"name":"rate","in":"query","description":"The tax rate filter.","required":false,"type":"number","format":"double","minimum":0,"exclusiveMinimum":false},{"name":"scope","in":"query","description":"The scope filter.","required":false,"type":"string","enum":["Any","StockItem","ServiceItem"]},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of taxes.","schema":{"$ref":"#/definitions/PagedResult[TaxResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/taxes","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/taxes"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/taxes"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/taxes"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/taxes","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:tax","position":"before"}]},"post":{"tags":["Taxes"],"summary":"Creates a tax.","operationId":"CreateTax","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The tax to create.","required":true,"schema":{"$ref":"#/definitions/TaxUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/taxes"}}},"201":{"description":"Tax created.","schema":{"$ref":"#/definitions/TaxResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/taxes","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/taxes"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/taxes"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/taxes","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/taxes","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:tax","position":"before"}],"x-business-errors":[{"code":"EInvoice_KSA_TaxRateCantBeGreaterThanZeroWithCategoryType","description":"The KSA e-invoice category requires a zero tax rate."},{"code":"EInvoice_KSA_TaxRateCantBeZeroWithCategoryType","description":"The KSA e-invoice category requires a non-zero tax rate."},{"code":"NameAlreadyExists","description":"Another tax already uses the same name."},{"code":"NameContainsInvalidSpecialCharacters","description":"The tax name contains unsupported special characters."},{"code":"TaxCannotSetBothTaxAndWithholdingTaxAccounts","description":"The tax cannot use both tax and withholding accounts."},{"code":"TaxCannotUseDifferentPurchaseTaxAccount","description":"PurchaseAccountId is already set for this tax setup. Repro: save the same tax with a different PurchaseAccountId."},{"code":"TaxCannotUseDifferentSalesTaxAccount","description":"SalesAccountId is already set for this tax setup. Repro: save the same tax with a different SalesAccountId."},{"code":"TaxCannotUseDifferentSalesWithholdingAccount","description":"SalesWithholdingAccountId is already set for this tax setup. Repro: save the same tax with a different SalesWithholdingAccountId."},{"code":"TaxInvalidEInvoiceType","description":"The tax does not have an e-invoice tax type that matches the active country configuration."},{"code":"TaxPurchaseAndSalesAccountMustMatch","description":"When both SalesAccountId and PurchaseAccountId are provided, they must point to the same account."}]}},"/v3/taxes/einvoice-tax-types":{"get":{"tags":["Taxes"],"summary":"Lists e-invoice tax types.","operationId":"GetEInvoiceTaxTypes","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"country","in":"query","description":"The country filter.","required":true,"type":"string"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"List of e-invoice tax types.","schema":{"type":"array","items":{"$ref":"#/definitions/EInvoiceTaxTypeResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/taxes/einvoice-tax-types","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/taxes/einvoice-tax-types"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/taxes/einvoice-tax-types"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/taxes/einvoice-tax-types"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/taxes/einvoice-tax-types","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:tax","position":"before"}]}},"/v3/taxes/{id}":{"get":{"tags":["Taxes"],"summary":"Gets a tax by id.","operationId":"GetTaxById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The tax id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The tax.","schema":{"$ref":"#/definitions/TaxResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/taxes/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/taxes/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/taxes/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/taxes/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/taxes/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/taxes/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:tax","position":"before"}]},"put":{"tags":["Taxes"],"summary":"Updates a tax.","operationId":"UpdateTax","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The tax id.","required":true,"type":"integer","format":"int32"},{"name":"request","in":"body","description":"The updated tax values.","required":true,"schema":{"$ref":"#/definitions/TaxUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The updated tax.","schema":{"$ref":"#/definitions/TaxResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/taxes/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/taxes/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/taxes/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/taxes/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/taxes/{id}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/taxes/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/taxes/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:tax","position":"before"}],"x-business-errors":[{"code":"EInvoice_KSA_TaxRateCantBeGreaterThanZeroWithCategoryType","description":"The KSA e-invoice category requires a zero tax rate."},{"code":"EInvoice_KSA_TaxRateCantBeZeroWithCategoryType","description":"The KSA e-invoice category requires a non-zero tax rate."},{"code":"NameAlreadyExists","description":"Another tax already uses the same name."},{"code":"NameContainsInvalidSpecialCharacters","description":"The tax name contains unsupported special characters."},{"code":"TaxCannotDeactivateRelatedToMasterData","description":"The tax is attached to master data and cannot be deactivated."},{"code":"TaxCannotDeleteOrUpdateRelatedToTransactions","description":"The tax is referenced by posted transactions or documents."},{"code":"TaxCannotSetBothTaxAndWithholdingTaxAccounts","description":"The tax cannot use both tax and withholding accounts."},{"code":"TaxCannotUseDifferentPurchaseTaxAccount","description":"PurchaseAccountId is already set for this tax setup. Repro: save the same tax with a different PurchaseAccountId."},{"code":"TaxCannotUseDifferentSalesTaxAccount","description":"SalesAccountId is already set for this tax setup. Repro: save the same tax with a different SalesAccountId."},{"code":"TaxCannotUseDifferentSalesWithholdingAccount","description":"SalesWithholdingAccountId is already set for this tax setup. Repro: save the same tax with a different SalesWithholdingAccountId."},{"code":"TaxInUseCannotDeactivateOrUpdate","description":"The tax is already used and cannot be deactivated or changed."},{"code":"TaxInvalidEInvoiceType","description":"The tax does not have an e-invoice tax type that matches the active country configuration."},{"code":"TaxPurchaseAndSalesAccountMustMatch","description":"When both SalesAccountId and PurchaseAccountId are provided, they must point to the same account."}]},"delete":{"tags":["Taxes"],"summary":"Deletes a tax.","operationId":"DeleteTax","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The tax id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/taxes/{id}"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/taxes/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/taxes/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/taxes/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/taxes/{id}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/taxes/{id}","ErrorCode":"BusinessRuleViolation"}}},"204":{"description":"No Content."},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/taxes/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: delete:tax","position":"before"}],"x-business-errors":[{"code":"ItemCannotDeleteItInUse","description":"The tax is referenced by other records."},{"code":"TaxCannotDeleteOrUpdateRelatedToTransactions","description":"The tax is referenced by posted transactions or documents."}]}},"/v3/units-of-measure":{"get":{"tags":["Units of Measure"],"summary":"Lists unit-of-measure chains.","operationId":"GetUnitsOfMeasures","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of unit-of-measure chains.","schema":{"$ref":"#/definitions/PagedResult[UnitOfMeasureResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/units-of-measure","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/units-of-measure"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/units-of-measure"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/units-of-measure"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/units-of-measure","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:unit-of-measure","position":"before"}]},"post":{"tags":["Units of Measure"],"summary":"Creates a unit of measure.","operationId":"CreateUnitOfMeasure","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The unit of measure to create.","required":true,"schema":{"$ref":"#/definitions/CreateUnitOfMeasureRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/units-of-measure"}}},"201":{"description":"Unit of measure created.","schema":{"$ref":"#/definitions/UnitOfMeasureResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/units-of-measure","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/units-of-measure"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/units-of-measure"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/units-of-measure","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/units-of-measure","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:unit-of-measure","position":"before"}],"x-business-errors":[{"code":"DupplicatedCode","description":"The chain name or a detail code is already in use."}]}},"/v3/units-of-measure/standard":{"get":{"tags":["Units of Measure"],"summary":"Lists standard units of measure.","operationId":"GetStandardUnitOfMeasures","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Standard units of measure.","schema":{"type":"array","items":{"$ref":"#/definitions/StandardUnitOfMeasureResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/units-of-measure/standard","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/units-of-measure/standard"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/units-of-measure/standard"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/units-of-measure/standard"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/units-of-measure/standard","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:unit-of-measure","position":"before"}]}},"/v3/units-of-measure/{id}":{"get":{"tags":["Units of Measure"],"summary":"Gets a unit-of-measure chain by id.","operationId":"GetUnitOfMeasureById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The chain id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The unit-of-measure chain.","schema":{"$ref":"#/definitions/UnitOfMeasureResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/units-of-measure/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/units-of-measure/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/units-of-measure/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/units-of-measure/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/units-of-measure/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/units-of-measure/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:unit-of-measure","position":"before"}]}},"/v3/warehouses":{"get":{"tags":["Warehouses"],"summary":"Lists warehouses.","operationId":"GetWarehouses","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"code","in":"query","description":"Exact code filter.","required":false,"type":"string"},{"name":"name","in":"query","description":"Description contains filter.","required":false,"type":"string"},{"name":"updateDate","in":"query","description":"Returns warehouses created or updated on or after this date.","required":false,"type":"string","format":"date-time"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0,"minimum":0,"exclusiveMinimum":false},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100,"maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged list of warehouses.","schema":{"$ref":"#/definitions/PagedResult[WarehouseResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/warehouses","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/warehouses"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/warehouses"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/warehouses"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/warehouses","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:warehouse","position":"before"}]},"post":{"tags":["Warehouses"],"summary":"Creates a warehouse.","operationId":"CreateWarehouse","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The warehouse to create.","required":true,"schema":{"$ref":"#/definitions/WarehouseUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/warehouses"}}},"201":{"description":"Warehouse created.","schema":{"$ref":"#/definitions/WarehouseResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/warehouses","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/warehouses"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/warehouses"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/warehouses","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/warehouses","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:warehouse","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another warehouse already uses the same description."}]}},"/v3/warehouses/code/{code}":{"put":{"tags":["Warehouses"],"summary":"Updates a warehouse by code.","operationId":"UpdateWarehouseByCode","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"code","in":"path","description":"The warehouse code.","required":true,"type":"string"},{"name":"request","in":"body","description":"The updated warehouse values.","required":true,"schema":{"$ref":"#/definitions/WarehouseUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Warehouse updated.","schema":{"$ref":"#/definitions/WarehouseResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/warehouses/code/{code}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/warehouses/code/{code}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/warehouses/code/{code}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/warehouses/code/{code}"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/warehouses/code/{code}","ErrorCode":"BusinessRuleViolation"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/warehouses/code/{code}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/warehouses/code/{code}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: update:warehouse","position":"before"}],"x-business-errors":[{"code":"DupplicatedName","description":"Another warehouse already uses the same description."}]}},"/v3/warehouses/rma":{"get":{"tags":["Warehouses"],"summary":"Lists RMA warehouses.","operationId":"GetRmaWarehouses","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"List of RMA warehouses.","schema":{"type":"array","items":{"$ref":"#/definitions/WarehouseResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/warehouses/rma","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/warehouses/rma"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/warehouses/rma"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/warehouses/rma"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/warehouses/rma","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:warehouse","position":"before"}]}},"/v3/warehouses/stock-items-balances":{"get":{"tags":["Warehouses"],"summary":"Gets stock-item warehouse balances.","operationId":"GetStockItemsWarehousesBalances","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"stockItemsIds","in":"query","description":"Comma-separated stock-item identifiers. Required.","required":false,"type":"string"},{"name":"nonZeroBalanceOnly","in":"query","description":"When true, excludes zero-balance items.","required":false,"type":"boolean"},{"name":"warehousesIds","in":"query","description":"Optional comma-separated warehouse identifiers.","required":false,"type":"string"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Stock-item warehouse balances.","schema":{"type":"array","items":{"$ref":"#/definitions/WarehouseStockItemBalanceResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/warehouses/stock-items-balances","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/warehouses/stock-items-balances"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/warehouses/stock-items-balances"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/warehouses/stock-items-balances"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/warehouses/stock-items-balances","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:warehouse","position":"before"}]}},"/v3/warehouses/tree/{userId}":{"get":{"tags":["Warehouses"],"summary":"Gets the warehouse tree for a user.","operationId":"GetWarehousesTree","consumes":[],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"The user id.","required":true,"type":"string"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Warehouse tree.","schema":{"type":"array","items":{"$ref":"#/definitions/WarehouseTreeResponse"}}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/warehouses/tree/{userId}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/warehouses/tree/{userId}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/warehouses/tree/{userId}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/warehouses/tree/{userId}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/warehouses/tree/{userId}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/warehouses/tree/{userId}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:warehouse","position":"before"}]}},"/v3/warehouses/{id}":{"get":{"tags":["Warehouses"],"summary":"Gets a warehouse by id.","operationId":"GetWarehouseById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The warehouse id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The warehouse.","schema":{"$ref":"#/definitions/WarehouseResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/warehouses/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/warehouses/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/warehouses/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/warehouses/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/warehouses/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/warehouses/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:warehouse","position":"before"}]}},"/v3/warehouses/{id}/balance":{"get":{"tags":["Warehouses"],"summary":"Gets warehouse balance.","operationId":"GetWarehouseBalance","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The warehouse id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"Paged warehouse balance.","schema":{"$ref":"#/definitions/PagedResult[WarehouseBalanceResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/warehouses/{id}/balance","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/warehouses/{id}/balance"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/warehouses/{id}/balance"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/warehouses/{id}/balance"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/warehouses/{id}/balance"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/warehouses/{id}/balance","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:warehouse","position":"before"}]}},"/v3/work-orders":{"get":{"tags":["Work Orders"],"summary":"Lists work orders.","operationId":"GetWorkOrder","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"code","in":"query","description":"Work-order document code.","required":false,"type":"string"},{"name":"paperNumber","in":"query","description":"Work-order paper number.","required":false,"type":"string"},{"name":"orderDateFrom","in":"query","description":"Inclusive lower bound of the document date range. Only used when listing.","required":false,"type":"string","format":"date-time"},{"name":"orderDateTo","in":"query","description":"Inclusive upper bound of the document date range. Only used when listing.","required":false,"type":"string","format":"date-time"},{"name":"onlyMyOrders","in":"query","description":"Whether to limit results to work orders created by the current user. Only used when\r\nlisting. Defaults to true.","required":false,"type":"boolean","default":true},{"name":"supplierId","in":"query","description":"Filters to work orders for this supplier. Mutually exclusive with customerId/workOrderOtherPartyId.","required":false,"type":"integer","format":"int32"},{"name":"customerId","in":"query","description":"Filters to work orders for this customer. Mutually exclusive with supplierId/workOrderOtherPartyId.","required":false,"type":"integer","format":"int32"},{"name":"workOrderOtherPartyId","in":"query","description":"Filters to work orders for this other party. Mutually exclusive with supplierId/customerId.","required":false,"type":"integer","format":"int32"},{"name":"offset","in":"query","description":"Number of items to skip before returning results. Defaults to 0.","required":false,"type":"integer","format":"int32","default":0},{"name":"limit","in":"query","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","required":false,"type":"integer","format":"int32","default":100},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The paged list of matching work orders.","schema":{"$ref":"#/definitions/PagedResult[WorkOrderResponse]"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/work-orders","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/work-orders"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/work-orders"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/work-orders"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/work-orders","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:work-order","position":"before"}]}},"/v3/work-orders/issue-offering":{"post":{"tags":["Work Orders"],"summary":"Creates an issue offering.","operationId":"CreateIssueOffering","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The issue offering to create.","required":true,"schema":{"$ref":"#/definitions/CreateIssueOfferingRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/work-orders/issue-offering"}}},"201":{"description":"Work order created.","schema":{"$ref":"#/definitions/WorkOrderResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/work-orders/issue-offering","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/work-orders/issue-offering"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/work-orders/issue-offering"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/work-orders/issue-offering","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/work-orders/issue-offering","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:work-order","position":"before"}],"x-business-errors":[{"code":"DateMustBeLessThanSystemDate","description":"Date must be less than system date."},{"code":"ErrorOrderPaperNoIsMandatory","description":"Order paper number is mandatory."},{"code":"ErrorOrderResponsibleIsMandatory","description":"Responsible is mandatory."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate decimals exceed the limit."},{"code":"NoDefaultEvaluationCostMethod","description":"No default evaluation cost method is configured."},{"code":"RelatedSODidNotPassPaymentApproval","description":"The related sales order did not pass payment approval."},{"code":"SerialsCountExceedQuntity","description":"Entered serials exceed the line quantity."},{"code":"msg_DocumentDateCannotbeBeforeRelatedSalesOrderDate","description":"Document date cannot be before the related sales order date."}]}},"/v3/work-orders/opening-balance":{"post":{"tags":["Work Orders"],"summary":"Creates an opening balance.","operationId":"CreateOpeningBalance","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The opening balance to create.","required":true,"schema":{"$ref":"#/definitions/WorkOrderUpsertRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/work-orders/opening-balance"}}},"201":{"description":"Opening balance created.","schema":{"$ref":"#/definitions/WorkOrderResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/work-orders/opening-balance","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/work-orders/opening-balance"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/work-orders/opening-balance"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/work-orders/opening-balance","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/work-orders/opening-balance","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:work-order","position":"before"}],"x-business-errors":[{"code":"AllDetailsAreDeleted","description":"All opening balance details have been marked as deleted."},{"code":"Error_OB_StockItemDuplication","description":"An opening balance cannot contain duplicate stock items."},{"code":"OB_GroupingItemsNotAllowed","description":"Grouping items are not allowed in an opening balance."},{"code":"OnlyOneOpeningBalanceAllowedPerWarehouse","description":"Only one opening balance is allowed per warehouse."},{"code":"PreventModifyOpeningCostAfterClosingJE","description":"The opening cost cannot be modified after the closing journal entry."},{"code":"QuantityMustHaveValue","description":"Quantity must have a value."}]}},"/v3/work-orders/receive-supplies":{"post":{"tags":["Work Orders"],"summary":"Receives work order supplies.","operationId":"CreateReceiveSupplies","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","description":"The receive supplies to create.","required":true,"schema":{"$ref":"#/definitions/CreateReceiveSuppliesRequest"}},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/work-orders/receive-supplies"}}},"201":{"description":"Work order created.","schema":{"$ref":"#/definitions/WorkOrderResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/work-orders/receive-supplies","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/work-orders/receive-supplies"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/work-orders/receive-supplies"}}},"409":{"description":"Conflict - A business rule prevented the operation.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.8","Title":"Conflict","Status":409,"Detail":"A business rule prevented the operation from completing.","Instance":"/v{apiVersion}/work-orders/receive-supplies","ErrorCode":"BusinessRuleViolation"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/work-orders/receive-supplies","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: create:work-order","position":"before"}],"x-business-errors":[{"code":"DateMustBeLessThanSystemDate","description":"Date must be less than system date."},{"code":"ExchangeRateDecimalsExceedLimit","description":"The exchange rate decimals exceed the limit."},{"code":"NoDefaultEvaluationCostMethod","description":"No default evaluation cost method is configured."},{"code":"SerialsCountExceedQuntity","description":"Entered serials exceed the line quantity."}]}},"/v3/work-orders/{id}":{"get":{"tags":["Work Orders"],"summary":"Gets a work order by id.","operationId":"GetWorkOrderById","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The work order id.","required":true,"type":"integer","format":"int32"},{"name":"apiVersion","in":"path","description":"The requested API version","required":true,"type":"string","default":"3"},{"name":"TenantId","in":"header","description":"Tenant identifier used to resolve JWT-authenticated requests.","required":false,"type":"string"}],"responses":{"200":{"description":"The work order.","schema":{"$ref":"#/definitions/WorkOrderResponse"}},"400":{"description":"Bad Request - Invalid input or validation failure.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","Title":"Bad Request","Status":400,"Detail":"Invalid input or validation failure.","Instance":"/v{apiVersion}/work-orders/{id}","Errors":{"fieldName":["The provided value is invalid."]}}}},"401":{"description":"Unauthorized - Missing or invalid authentication.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7235#section-3.1","Title":"Unauthorized","Status":401,"Detail":"Missing or invalid authentication.","Instance":"/v{apiVersion}/work-orders/{id}"}}},"403":{"description":"Forbidden - The authenticated user is not allowed to perform this action.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.3","Title":"Forbidden","Status":403,"Detail":"The authenticated user is not allowed to perform this action.","Instance":"/v{apiVersion}/work-orders/{id}"}}},"404":{"description":"Not Found - The requested resource could not be located.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","Title":"Not Found","Status":404,"Detail":"The requested resource could not be located.","Instance":"/v{apiVersion}/work-orders/{id}"}}},"500":{"description":"Internal Server Error - An unexpected error occurred.","schema":{"$ref":"#/definitions/ProblemDetails"},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc7231#section-6.6.1","Title":"Internal Server Error","Status":500,"Detail":"An unexpected error occurred.","Instance":"/v{apiVersion}/work-orders/{id}"}}},"429":{"description":"Too Many Requests - the request rate limit has been exceeded.","schema":{"$ref":"#/definitions/ProblemDetails"},"headers":{"Retry-After":{"description":"Seconds until the tripped window resets.","type":"integer"},"X-RateLimit-Limit":{"description":"Limit for the window that tripped.","type":"integer"},"X-RateLimit-Remaining":{"description":"Always 0 on 429.","type":"integer"},"X-RateLimit-Reset":{"description":"Unix-seconds at which the window resets.","type":"integer"},"X-RateLimit-Scope":{"description":"Dimension that fired: Tenant | User | Ip | Endpoint.","type":"string"},"X-RateLimit-Rule":{"description":"RateLimitRules.Id that applied, or a negative number if a Web.config fallback rule applied instead of a database rule.","type":"integer"}},"examples":{"application/problem+json":{"Type":"https://tools.ietf.org/html/rfc6585#section-4","Title":"Too Many Requests","Status":429,"Detail":"Rate limit exceeded. Retry after the period indicated in the Retry-After header.","Instance":"/v{apiVersion}/work-orders/{id}","ErrorCode":"RateLimitExceeded"}}}},"security":[{"Bearer":[]}],"x-badges":[{"name":"Permission: read:work-order","position":"before"}]}}},"definitions":{"CancellationToken":{"type":"object","properties":{"isCancellationRequested":{"type":"boolean","readOnly":true},"canBeCanceled":{"type":"boolean","readOnly":true},"waitHandle":{"$ref":"#/definitions/WaitHandle","readOnly":true}}},"WaitHandle":{"type":"object","properties":{"handle":{"type":"object"},"safeWaitHandle":{"$ref":"#/definitions/SafeWaitHandle"}}},"SafeWaitHandle":{"type":"object","properties":{"isInvalid":{"type":"boolean","readOnly":true},"isClosed":{"type":"boolean","readOnly":true}}},"AccountResponse":{"description":"Response describing an account.","type":"object","properties":{"id":{"format":"int32","description":"The account identifier.","type":"integer"},"accountCode":{"description":"The account code.","type":"string"},"description":{"description":"The account description.","type":"string"},"classificationCode":{"description":"The classification code.","type":"string"},"accountType":{"description":"The account type.","enum":["RealizedGainExchange","RealizedLossExchange","UnrealizedGainExchange","UnrealizedLossExchange","Cash","AccountsReceivable","AccountsPayable","Sales","ServicesSales","SalesReturns","Purchase","PurchaseReturns","NotesReceivable","NotesPayable","Inventory","COGS","SalesDiscount","OtherRevenue","Waste","Bank","RetainedEarning","SalesTax","WithholdingTax","PurchaseDiscount","Adjustment","AddedTax","EndingInventory","PurchaseAddedTax"],"type":"string"},"acceptCostCenter":{"description":"Whether the account accepts cost centers.","type":"boolean"}}},"ProblemDetails":{"description":"RFC 7807-compliant problem details response.","type":"object","properties":{"type":{"description":"URI reference identifying the problem type. Defaults to \"about:blank\".","type":"string"},"title":{"description":"Short, human-readable summary of the problem type.","type":"string"},"status":{"format":"int32","description":"HTTP status code for this occurrence of the problem.","type":"integer"},"detail":{"description":"Human-readable explanation specific to this occurrence.","type":"string"},"instance":{"description":"URI reference identifying the specific occurrence of the problem.","type":"string"},"traceId":{"description":"Trace identifier associated with this request.","type":"string"},"errors":{"description":"Field-specific validation errors keyed by field name.","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"errorCode":{"description":"Machine-readable application or business error code.","type":"string"},"extensions":{"description":"RFC 7807 extension members specific to the current error payload.","type":"object","additionalProperties":{"type":"object"}}}},"GetAccountNodesQuery":{"description":"Query parameters for account node lookups.","required":["type"],"type":"object","properties":{"type":{"description":"The account node type.","enum":["RealizedGainExchange","RealizedLossExchange","UnrealizedGainExchange","UnrealizedLossExchange","Cash","AccountsReceivable","AccountsPayable","Sales","ServicesSales","SalesReturns","Purchase","PurchaseReturns","NotesReceivable","NotesPayable","Inventory","COGS","SalesDiscount","OtherRevenue","Waste","Bank","RetainedEarning","SalesTax","WithholdingTax","PurchaseDiscount","Adjustment","AddedTax","EndingInventory","PurchaseAddedTax"],"type":"string"}}},"AccountNodeResponse":{"description":"Response describing a chart-of-accounts node.","type":"object","properties":{"id":{"format":"int32","description":"The node id.","type":"integer"},"nodeCode":{"description":"The account code.","type":"string"},"nodeDescription":{"description":"The account description / name.","type":"string"},"alias":{"description":"The short alias used on documents and reports.","type":"string"},"nodeType":{"description":"The account type (Asset, Liability, Equity, Revenue, Expense).","enum":["RealizedGainExchange","RealizedLossExchange","UnrealizedGainExchange","UnrealizedLossExchange","Cash","AccountsReceivable","AccountsPayable","Sales","ServicesSales","SalesReturns","Purchase","PurchaseReturns","NotesReceivable","NotesPayable","Inventory","COGS","SalesDiscount","OtherRevenue","Waste","Bank","RetainedEarning","SalesTax","WithholdingTax","PurchaseDiscount","Adjustment","AddedTax","EndingInventory","PurchaseAddedTax"],"type":"string"},"typicalBalance":{"description":"The typical balance side of the account (Debit or Credit).","enum":["Debit","Credit"],"type":"string"},"parentNodeId":{"format":"int32","description":"The id of the parent node in the chart-of-accounts tree.","type":"integer"},"postingTypeId":{"format":"int32","description":"The id of the posting type (built-in system classification).","type":"integer"},"postingTypeUser":{"format":"int32","description":"The id of the user-defined posting type, when applicable.","type":"integer"},"acceptCostCenter":{"description":"Whether postings to this account must specify a cost center.","type":"boolean"},"incashFlow":{"description":"Whether this account is included in cash-flow reporting.","type":"boolean"},"cashFlowParentNodeId":{"format":"int32","description":"The id of the parent node in the cash-flow tree.","type":"integer"},"cashFlowTitle":{"description":"The cash-flow display title.","type":"string"},"cashFlowSectionId":{"format":"int32","description":"The id of the cash-flow section the account rolls up to.","type":"integer"},"budgetVariance":{"description":"The direction (favorable / unfavorable) of variance for budgeting.","enum":["Positive","Negative"],"type":"string"},"nodeClassification":{"description":"The custom classification label assigned to the node.","type":"string"}}},"GetAccountBalanceQuery":{"description":"Query parameters for account balance lookup.","required":[],"type":"object","properties":{"date":{"format":"date-time","description":"The balance date.","type":"string"},"costCenterId":{"format":"int32","description":"The cost-center filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"customerId":{"format":"int32","description":"The customer filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"supplierId":{"format":"int32","description":"The supplier filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"isPostedOnly":{"description":"Whether only posted transactions are included.","type":"boolean"}}},"AccountBalanceResponse":{"description":"Response describing an account balance.","type":"object","properties":{"account":{"$ref":"#/definitions/AccountReference","description":"The account reference."},"balance":{"format":"double","description":"The balance.","type":"number"},"date":{"format":"date-time","description":"The balance date filter.","type":"string"},"costCenter":{"$ref":"#/definitions/CostCenterReference","description":"The cost-center reference."},"customer":{"$ref":"#/definitions/CustomerReference","description":"The customer reference."},"supplier":{"$ref":"#/definitions/SupplierReference","description":"The supplier reference."},"isPostedOnly":{"description":"Whether only posted transactions were included.","type":"boolean"}}},"AccountReference":{"description":"Lightweight account reference (id + code + name).","type":"object","properties":{"id":{"format":"int32","description":"The account id.","type":"integer"},"code":{"description":"The account code.","type":"string"},"name":{"description":"The account name.","type":"string"}}},"CostCenterReference":{"description":"Lightweight cost-center reference (id + code + name).","type":"object","properties":{"id":{"format":"int32","description":"The cost-center id.","type":"integer"},"code":{"description":"The cost-center code.","type":"string"},"name":{"description":"The cost-center name.","type":"string"}}},"CustomerReference":{"description":"Lightweight customer reference (id + code + name).","type":"object","properties":{"id":{"format":"int32","description":"The customer id.","type":"integer"},"code":{"description":"The customer code.","type":"string"},"name":{"description":"The customer name.","type":"string"}}},"SupplierReference":{"description":"Lightweight supplier reference (id + code + name).","type":"object","properties":{"id":{"format":"int32","description":"The supplier id.","type":"integer"},"code":{"description":"The supplier code.","type":"string"},"name":{"description":"The supplier name.","type":"string"}}},"GetAccountsQuery":{"description":"Query parameters for the accounts collection endpoint.","required":[],"type":"object","properties":{"classificationCode":{"description":"The classification code filter.","type":"string"},"type":{"description":"The account type filter.","enum":["RealizedGainExchange","RealizedLossExchange","UnrealizedGainExchange","UnrealizedLossExchange","Cash","AccountsReceivable","AccountsPayable","Sales","ServicesSales","SalesReturns","Purchase","PurchaseReturns","NotesReceivable","NotesPayable","Inventory","COGS","SalesDiscount","OtherRevenue","Waste","Bank","RetainedEarning","SalesTax","WithholdingTax","PurchaseDiscount","Adjustment","AddedTax","EndingInventory","PurchaseAddedTax"],"type":"string"},"relatedCustomerCode":{"description":"The related customer code filter.","type":"string"},"customerExternalId":{"description":"The related customer external-id filter.","type":"string"},"relatedCustomerId":{"format":"int32","description":"The related customer identifier filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"description":{"description":"The account description filter.","type":"string"},"updateDate":{"format":"date-time","description":"The updated-after filter.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[AccountResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/AccountResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"BrandResponse":{"description":"Response describing a brand.","type":"object","properties":{"id":{"format":"int32","description":"Brand identifier.","type":"integer"},"name":{"description":"Brand name.","type":"string"},"brandManager":{"description":"Optional brand manager.","type":"string"}}},"GetBrandsQuery":{"description":"Query parameters for listing brands.","required":[],"type":"object","properties":{"name":{"description":"Brand name filter.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[BrandResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/BrandResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"BrandUpsertRequest":{"description":"Request to create or update a brand.","required":["name"],"type":"object","properties":{"name":{"description":"Brand name.","maxLength":50,"minLength":0,"type":"string"},"brandManager":{"description":"Optional brand manager.","maxLength":50,"minLength":0,"type":"string"}}},"BundleResponse":{"description":"Response describing a bundle.","type":"object","properties":{"id":{"format":"int32","description":"Bundle identifier.","type":"integer"},"description":{"description":"Bundle description.","type":"string"},"notes":{"description":"Free-form notes.","type":"string"},"isActive":{"description":"Whether the bundle is active.","type":"boolean"},"tags":{"description":"Tags assigned to the bundle.","type":"array","items":{"type":"string"}},"bundleDetails":{"description":"Bundle line items.","type":"array","items":{"$ref":"#/definitions/BundleItemResponse"}}}},"BundleItemResponse":{"description":"Response describing a bundle line item.","type":"object","properties":{"id":{"format":"int32","description":"Bundle detail line identifier.","type":"integer"},"bundleId":{"format":"int32","description":"Parent bundle identifier.","type":"integer"},"stockItem":{"$ref":"#/definitions/StockItemReference","description":"Stock-item reference."},"quantity":{"format":"double","description":"Quantity per bundle.","type":"number"},"unitOfMeasure":{"$ref":"#/definitions/UnitOfMeasureReference","description":"Unit-of-measure detail reference."},"unitPrice":{"format":"double","description":"Unit price.","type":"number"},"price":{"format":"double","description":"Line total price.","type":"number"},"taxRate":{"format":"double","description":"Tax rate inherited from the stock item.","type":"number"},"tax":{"$ref":"#/definitions/TaxReference","description":"Tax reference inherited from the stock item."},"dimensionsValue":{"format":"double","description":"Dimension multiplier for dimension-based lines.","type":"number"},"dimensions":{"description":"Dimension expression.","type":"string"},"comments":{"description":"Free-form line comment.","type":"string"}}},"StockItemReference":{"description":"Lightweight stock-item reference (id + code + description).","type":"object","properties":{"id":{"format":"int32","description":"The stock-item id.","type":"integer"},"code":{"description":"The stock-item code.","type":"string"},"description":{"description":"The stock-item description.","type":"string"}}},"UnitOfMeasureReference":{"description":"Lightweight unit-of-measure reference (id + name).","type":"object","properties":{"id":{"format":"int32","description":"The unit-of-measure id.","type":"integer"},"name":{"description":"The unit-of-measure name.","type":"string"}}},"TaxReference":{"description":"Lightweight tax reference (id + name + rate).","type":"object","properties":{"id":{"format":"int32","description":"The tax id.","type":"integer"},"name":{"description":"The tax name.","type":"string"},"rate":{"format":"double","description":"The tax rate as a percentage.","type":"number"}}},"GetBundlesQuery":{"description":"Query parameters for listing bundles.","required":[],"type":"object","properties":{"updateDate":{"format":"date-time","description":"Returns only bundles inserted or updated at or after this timestamp.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[BundleResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/BundleResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"CreateBundleRequest":{"description":"Request to create a bundle.","required":["description","bundleDetails"],"type":"object","properties":{"description":{"description":"Bundle description. Must be unique across active bundles.","maxLength":500,"minLength":0,"type":"string"},"notes":{"description":"Free-form notes.","maxLength":500,"minLength":0,"type":"string"},"tags":{"description":"Tags; persisted as a comma-separated value.","type":"array","items":{"type":"string"}},"bundleDetails":{"description":"Bundle line items. At least one required.","type":"array","items":{"$ref":"#/definitions/CreateBundleItemRequest"}}}},"CreateBundleItemRequest":{"description":"Request to create a bundle line item.","required":["stockItemId"],"type":"object","properties":{"stockItemId":{"format":"int32","description":"Stock item identifier. Required.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"quantity":{"format":"double","description":"Quantity per bundle.","minimum":0,"exclusiveMinimum":true,"type":"number"},"unitOfMeasureId":{"format":"int32","description":"Unit-of-measure detail identifier overriding the stock item default.","type":"integer"},"unitPrice":{"format":"double","description":"Unit price.","minimum":0,"exclusiveMinimum":false,"type":"number"},"price":{"format":"double","description":"Line total price.","minimum":0,"exclusiveMinimum":false,"type":"number"},"dimensionsValue":{"format":"double","description":"Dimension multiplier for dimension-based lines; defaults to zero.","type":"number"},"dimensions":{"description":"Dimension expression (e.g. \"L*W*H\").","maxLength":50,"minLength":0,"type":"string"},"comments":{"description":"Optional line comment.","maxLength":100,"minLength":0,"type":"string"}}},"CashTransactionRequest":{"description":"Request to create a cash-in or cash-out transaction.","required":["documentDate","accountingDocumentDetails","accountingDocumentDetails"],"type":"object","properties":{"mainAccountId":{"format":"int32","description":"The main cash account identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"documentDate":{"format":"date-time","description":"The accounting document date.","type":"string"},"paperNumber":{"description":"The external paper number.","type":"string"},"responsibleId":{"format":"int32","description":"The responsible user identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"notes":{"description":"Optional document notes.","type":"string"},"currencyId":{"format":"int32","description":"The optional document currency identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"exchangeRate":{"format":"double","description":"The exchange rate when a currency is supplied.","minimum":0,"exclusiveMinimum":true,"type":"number"},"accountingDocumentDetails":{"description":"The detail lines making up the transaction.","type":"array","items":{"$ref":"#/definitions/CashTransactionDetailRequest"}}}},"CashTransactionDetailRequest":{"description":"Request describing a cash transaction detail line.","required":[],"type":"object","properties":{"accountId":{"format":"int32","description":"The detail account identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"costCenterId":{"format":"int32","description":"The optional cost center identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"amount":{"format":"double","description":"The line amount.","minimum":0,"exclusiveMinimum":true,"type":"number"},"comments":{"description":"Optional line comments.","type":"string"},"customerId":{"format":"int32","description":"The optional customer identifier for receivable accounts.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"supplierId":{"format":"int32","description":"The optional supplier identifier for payable accounts.","minimum":0,"exclusiveMinimum":true,"type":"integer"}}},"CashTransactionResponse":{"description":"Response describing a created cash transaction.","type":"object","properties":{"documentCode":{"description":"The generated accounting document code.","type":"string"}}},"CityResponse":{"description":"Response describing a city.","type":"object","properties":{"id":{"format":"int32","description":"The city identifier.","type":"integer"},"name":{"description":"The city name.","type":"string"},"countryId":{"format":"int32","description":"The country identifier.","type":"integer"}}},"CityUpsertRequest":{"description":"Request to create or update a city.","required":["name","name"],"type":"object","properties":{"name":{"description":"The city name.","maxLength":100,"minLength":0,"type":"string"},"countryId":{"format":"int32","description":"The country identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"}}},"GetCitiesQuery":{"description":"Query parameters for listing cities.","required":[],"type":"object","properties":{"name":{"description":"Optional city name filter.","type":"string"},"countryId":{"format":"int32","description":"Optional country identifier filter.","type":"integer"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[CityResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/CityResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"CommonClassificationResponse":{"description":"Response describing a common classification.","type":"object","properties":{"id":{"format":"int32","description":"The classification identifier.","type":"integer"},"code":{"description":"The classification code.","type":"string"},"description":{"description":"The classification description.","type":"string"},"type":{"description":"The classification type.","type":"string"},"parentId":{"format":"int32","description":"The optional parent classification identifier.","type":"integer"}}},"StockItemClassificationTreeResponse":{"description":"Response describing a stock-item classification tree row.","type":"object","properties":{"id":{"format":"int32","description":"Tree row identifier.","type":"integer"},"stockItemId":{"format":"int32","description":"Stock-item identifier when this row is a leaf.","type":"integer"},"stockItem":{"description":"Stock-item description when this row is a leaf.","type":"string"},"nodeId":{"format":"int32","description":"Classification node identifier.","type":"integer"},"parentId":{"format":"int32","description":"Parent classification identifier.","type":"integer"},"treeLevel":{"format":"int32","description":"Depth within the tree.","type":"integer"}}},"GetStockItemClassificationsQuery":{"description":"Query parameters for listing stock-item classifications.","type":"object","properties":{"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[StockItemClassificationResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/StockItemClassificationResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"StockItemClassificationResponse":{"description":"Response describing a stock-item classification node.","type":"object","properties":{"id":{"format":"int32","description":"Classification identifier.","type":"integer"},"code":{"description":"Classification code.","type":"string"},"description":{"description":"Classification description.","type":"string"},"parentId":{"format":"int32","description":"Parent classification identifier; null for roots.","type":"integer"},"treeLevel":{"format":"int32","description":"Depth within the tree; roots are level 0.","type":"integer"}}},"StockItemClassificationUpsertRequest":{"description":"Request to create or update a stock-item classification.","required":["code","description","parentId"],"type":"object","properties":{"code":{"description":"Classification code. Required; must not contain dashes.","maxLength":50,"minLength":0,"type":"string"},"description":{"description":"Classification description. Required.","maxLength":70,"minLength":0,"type":"string"},"parentId":{"format":"int32","description":"Parent classification identifier. Required; must be a non-leaf node.","minimum":0,"exclusiveMinimum":true,"type":"integer"}}},"GetCommonClassificationsQuery":{"description":"Query parameters for listing common classifications.","required":[],"type":"object","properties":{"description":{"description":"Optional description filter; exact match when supplied.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[CommonClassificationResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/CommonClassificationResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"AdjustInvoicedQuantityRequest":{"type":"object","properties":{"sourceDocumentType":{"type":"string"},"sourceDocumentCode":{"type":"string"},"lines":{"type":"array","items":{"$ref":"#/definitions/AdjustInvoicedQuantityLineRequest"}}}},"AdjustInvoicedQuantityLineRequest":{"type":"object","properties":{"sourceLineId":{"format":"int32","type":"integer"},"quantityAdjustment":{"format":"double","type":"number"}}},"AdjustInvoicedQuantityResponse":{"type":"object","properties":{"success":{"type":"boolean"},"updatedLines":{"format":"int32","type":"integer"}}},"SendSimpleEmailRequest":{"description":"Request to send a direct SES email.","required":["toAddresses","subject"],"type":"object","properties":{"toAddresses":{"description":"Primary recipient email addresses.","type":"array","items":{"type":"string"}},"ccAddresses":{"description":"Carbon-copy recipient email addresses.","type":"array","items":{"type":"string"}},"bccAddresses":{"description":"Blind carbon-copy recipient email addresses.","type":"array","items":{"type":"string"}},"subject":{"description":"Email subject line.","type":"string"},"replyToAddresses":{"description":"Reply-to email addresses.","type":"array","items":{"type":"string"}},"configSet":{"description":"SES configuration set name.","type":"string"},"bodyHtml":{"description":"HTML body of the email.","type":"string"},"bodyText":{"description":"Plain-text body of the email.","type":"string"},"source":{"description":"Sender email address (From field).","type":"string"}}},"SendTemplatedEmailRequest":{"description":"Request to send an SES templated email.","required":["toAddresses","template","templateData"],"type":"object","properties":{"toAddresses":{"description":"Primary recipient email addresses.","type":"array","items":{"type":"string"}},"ccAddresses":{"description":"Carbon-copy recipient email addresses.","type":"array","items":{"type":"string"}},"bccAddresses":{"description":"Blind carbon-copy recipient email addresses.","type":"array","items":{"type":"string"}},"source":{"description":"Sender email address (From field).","type":"string"},"replyToAddresses":{"description":"Reply-to email addresses.","type":"array","items":{"type":"string"}},"configSet":{"description":"SES configuration set name.","type":"string"},"template":{"description":"SES template name.","type":"string"},"templateData":{"$ref":"#/definitions/SendTemplatedEmailTemplateData","description":"Data used to populate the template placeholders."}}},"SendTemplatedEmailTemplateData":{"description":"Template-substitution data for an SES templated email.","type":"object","properties":{"subject":{"description":"Email subject line.","type":"string"},"message":{"description":"Email body message.","type":"string"},"userName":{"description":"Recipient display name used in the template.","type":"string"}}},"CostCenterResponse":{"description":"Response describing a cost center.","type":"object","properties":{"id":{"format":"int32","description":"The cost center identifier.","type":"integer"},"code":{"description":"The cost center code.","type":"string"},"description":{"description":"The cost center description.","type":"string"},"classificationCode":{"description":"The classification code.","type":"string"}}},"GetCostCentersQuery":{"description":"Query parameters for the cost centers collection endpoint.","required":[],"type":"object","properties":{"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[CostCenterResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/CostCenterResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"CountryResponse":{"description":"Response describing a country.","type":"object","properties":{"id":{"format":"int32","description":"The country identifier.","type":"integer"},"name":{"description":"The country name.","type":"string"}}},"CountryUpsertRequest":{"description":"Request to create or update a country.","required":["name","name"],"type":"object","properties":{"name":{"description":"The country name.","maxLength":100,"minLength":0,"type":"string"}}},"GetCountriesQuery":{"description":"Query parameters for listing countries.","required":[],"type":"object","properties":{"name":{"description":"Optional exact country name filter.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[CountryResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/CountryResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"CurrencyResponse":{"description":"Response describing a currency.","type":"object","properties":{"id":{"format":"int32","description":"The currency identifier.","type":"integer"},"symbol":{"description":"The currency symbol.","type":"string"},"description":{"description":"The currency display name.","type":"string"},"internationalCode":{"description":"The ISO 4217 code.","type":"string"},"currencySubUnit":{"description":"The currency sub-unit label.","type":"string"},"isSystemCurrency":{"description":"Whether this is the system currency.","type":"boolean"},"isActive":{"description":"Whether the currency is active.","type":"boolean"}}},"CurrencyUpsertRequest":{"description":"Request to create or update a currency.","required":["symbol","description"],"type":"object","properties":{"symbol":{"description":"The currency symbol.","type":"string"},"description":{"description":"The currency display name.","type":"string"},"internationalCode":{"description":"The ISO 4217 code.","type":"string"},"currencySubUnit":{"description":"The currency sub-unit label.","type":"string"},"isSystemCurrency":{"description":"Whether this is the system currency.","type":"boolean"},"isActive":{"description":"Whether the currency is active.","type":"boolean"}}},"GetCurrenciesQuery":{"description":"Query parameters for the currencies collection endpoint.","required":[],"type":"object","properties":{"code":{"description":"The currency code filter.","type":"string"},"updateDate":{"format":"date-time","description":"The updated-after filter.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[CurrencyResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/CurrencyResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"CustomerResponse":{"description":"Response describing a customer.","type":"object","properties":{"id":{"format":"int32","description":"Customer identifier.","type":"integer"},"code":{"description":"Customer business code.","type":"string"},"name":{"description":"Customer display name.","type":"string"},"customerType":{"description":"Customer classification (Business / Consumer).","enum":["Consumer","Business"],"type":"string"},"pricingType":{"description":"Pricing strategy.","enum":["EndUser","Dealer","SuperDealer","Custom"],"type":"string"},"priceListId":{"format":"int32","description":"Identifier of the price list linked to this customer.","type":"integer"},"nationalId":{"description":"National identifier.","type":"string"},"taxRegistrationId":{"description":"Tax registration identifier.","type":"string"},"shippingTerm":{"description":"Shipping terms applicable to the customer.","type":"string"},"insurance":{"description":"Insurance terms or notes.","type":"string"},"guarantee":{"format":"double","description":"Guarantee amount.","type":"number"},"creditLimit":{"format":"double","description":"Credit limit value.","type":"number"},"hasDiscount":{"description":"Indicates whether discounts are allowed.","type":"boolean"},"discountMandatory":{"description":"Indicates whether a discount is mandatory.","type":"boolean"},"discountFrom":{"format":"double","description":"Minimum discount percentage.","type":"number"},"discountTo":{"format":"double","description":"Maximum discount percentage.","type":"number"},"paymentType":{"description":"Default payment type.","enum":["Cash","Credit"],"type":"string"},"paymentMaxDueDays":{"format":"int32","description":"Maximum number of credit days allowed.","type":"integer"},"relatedAccount":{"$ref":"#/definitions/AccountReference","description":"Reference to the linked receivable account."},"salesPerson":{"$ref":"#/definitions/SalesPersonReference","description":"Reference to the assigned sales person, if any."},"defaultForeignCurrency":{"$ref":"#/definitions/CurrencyReference","description":"Default foreign currency reference, if any."},"balance":{"format":"double","description":"Current customer balance (read-only).","type":"number"},"active":{"description":"Indicates whether the customer is active.","type":"boolean"},"externalId":{"description":"External identifier.","type":"string"},"contactPerson":{"description":"Name of the primary contact person at the customer.","type":"string"},"contactCountryId":{"format":"int32","description":"Country identifier of the primary contact address.","type":"integer"},"contactCityId":{"format":"int32","description":"City identifier of the primary contact address.","type":"integer"},"contactDistrictId":{"format":"int32","description":"District identifier of the primary contact address.","type":"integer"},"postalZipCode":{"description":"Postal / ZIP code for the primary contact address.","type":"string"},"phone":{"description":"Primary contact phone number.","type":"string"},"phone2":{"description":"Secondary contact phone number.","type":"string"},"fax":{"description":"Fax number.","type":"string"},"mobile":{"description":"Primary contact mobile number.","type":"string"},"email":{"description":"Primary contact email.","type":"string"},"tags":{"description":"Tags associated with the customer.","type":"array","items":{"type":"string"}},"addresses":{"description":"Customer addresses.","type":"array","items":{"$ref":"#/definitions/CustomerAddressResponse"}}}},"SalesPersonReference":{"description":"Lightweight sales-person reference (id + code + name).","type":"object","properties":{"id":{"format":"int32","description":"The sales-person id.","type":"integer"},"code":{"description":"The sales-person code.","type":"string"},"name":{"description":"The sales-person name.","type":"string"}}},"CurrencyReference":{"description":"Lightweight currency reference (id + ISO code + name).","type":"object","properties":{"id":{"format":"int32","description":"The currency id.","type":"integer"},"code":{"description":"The ISO 4217 currency code.","type":"string"},"name":{"description":"The currency name.","type":"string"}}},"CustomerAddressResponse":{"description":"Response describing a customer address.","type":"object","properties":{"id":{"format":"int32","description":"Address identifier.","type":"integer"},"customerId":{"format":"int32","description":"Owning customer identifier.","type":"integer"},"name":{"description":"Address label.","type":"string"},"countryId":{"format":"int32","description":"Country identifier.","type":"integer"},"cityId":{"format":"int32","description":"City identifier.","type":"integer"},"districtId":{"format":"int32","description":"District identifier, if any.","type":"integer"},"streetDescription":{"description":"Street description (building number, floor, etc.).","type":"string"},"description":{"description":"Full printable address description.","type":"string"},"isDefault":{"description":"Indicates whether this is the default address.","type":"boolean"},"addressPhone":{"description":"Address phone number.","type":"string"},"externalId":{"description":"External identifier for the address.","type":"string"}}},"CustomerUpsertRequest":{"description":"Request to create or update a customer. String properties are trimmed.","required":["name"],"type":"object","properties":{"id":{"format":"int32","description":"Customer id. Required for batch update; ignored on create.","type":"integer"},"code":{"description":"Business code (max 50). Required on create.","maxLength":50,"minLength":0,"type":"string"},"name":{"description":"Display name (max 250). Required on create.","maxLength":250,"minLength":0,"type":"string"},"customerType":{"description":"Customer classification. Defaults to Consumer on create.","enum":["Consumer","Business"],"type":"string"},"pricingType":{"description":"Pricing strategy.","enum":["EndUser","Dealer","SuperDealer","Custom"],"type":"string"},"priceListId":{"format":"int32","description":"Price list id, used when {Edara.API.DTOs.Sales.Customers.Requests.CustomerUpsertRequest.PricingType} is PriceList.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"taxRegistrationId":{"description":"Tax registration id (max 20). May be required for business customers.","maxLength":20,"minLength":0,"type":"string"},"nationalId":{"description":"National identifier (max 14). May be required for consumer customers.","maxLength":14,"minLength":0,"type":"string"},"shippingTerm":{"description":"Shipping terms (e.g. \"FOB\", \"CIF\").","type":"string"},"insurance":{"description":"Insurance terms or notes.","type":"string"},"guarantee":{"format":"double","description":"Optional guarantee amount.","minimum":0,"exclusiveMinimum":false,"type":"number"},"creditLimit":{"format":"double","description":"Optional credit limit.","minimum":0,"exclusiveMinimum":false,"type":"number"},"hasDiscount":{"description":"Whether line discounts are allowed.","type":"boolean"},"discountMandatory":{"description":"Whether discount is mandatory.","type":"boolean"},"discountFrom":{"format":"double","description":"Minimum allowed discount percentage.","minimum":0,"exclusiveMinimum":false,"type":"number"},"discountTo":{"format":"double","description":"Maximum allowed discount percentage.","minimum":0,"exclusiveMinimum":false,"type":"number"},"paymentType":{"description":"Default payment type.","enum":["Cash","Credit"],"type":"string"},"paymentMaxDueDays":{"format":"int32","description":"Maximum credit days allowed.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"relatedAccountId":{"format":"int32","description":"Existing receivable account id. Mutually exclusive with {Edara.API.DTOs.Sales.Customers.Requests.CustomerUpsertRequest.RelatedAccountParentId}.","type":"integer"},"relatedAccountParentId":{"format":"int32","description":"AR parent CoA node under which a new related account is created. Only used when \"create AR with new customer\" is on.","type":"integer"},"salesPersonId":{"format":"int32","description":"Optional sales person id assigned to the customer.","type":"integer"},"defaultForeignCurrencyId":{"format":"int32","description":"Default foreign-currency id.","type":"integer"},"externalId":{"description":"Optional external id (max 50). Must be unique across customers.","maxLength":50,"minLength":0,"type":"string"},"active":{"description":"Whether the customer is active. Defaults to true on create.","type":"boolean"},"contactPerson":{"description":"Primary contact person name.","maxLength":250,"minLength":0,"type":"string"},"contactCountryId":{"format":"int32","description":"Primary contact country id.","type":"integer"},"contactCityId":{"format":"int32","description":"Primary contact city id.","type":"integer"},"contactDistrictId":{"format":"int32","description":"Primary contact district id.","type":"integer"},"postalZipCode":{"description":"Primary contact postal / ZIP code.","maxLength":50,"minLength":0,"type":"string"},"phone":{"description":"Primary contact phone (max 50).","maxLength":50,"minLength":0,"type":"string"},"phone2":{"description":"Secondary contact phone (max 50).","maxLength":50,"minLength":0,"type":"string"},"fax":{"description":"Fax number (max 50).","maxLength":50,"minLength":0,"type":"string"},"mobile":{"description":"Primary contact mobile (max 50). May be required (CustomerMobileRequired).","maxLength":50,"minLength":0,"type":"string"},"email":{"description":"Primary contact email (max 250). May be required (CustomerEmailRequired).","maxLength":250,"minLength":0,"type":"string"},"tags":{"description":"Customer tags.","type":"array","items":{"type":"string"}},"addresses":{"description":"Customer addresses to create or update.","type":"array","items":{"$ref":"#/definitions/CustomerAddressUpsertRequest"}}}},"CustomerAddressUpsertRequest":{"description":"Request to create or update a customer address.","required":["countryId","cityId"],"type":"object","properties":{"id":{"format":"int32","description":"Existing address id. Null on create; required on update. Addresses absent from the request are deleted.","type":"integer"},"name":{"description":"Address label. Defaults to \"{Country}, {City}\" when empty.","maxLength":250,"minLength":0,"type":"string"},"countryId":{"format":"int32","description":"Country identifier. Required.","type":"integer"},"cityId":{"format":"int32","description":"City identifier. Required.","type":"integer"},"districtId":{"format":"int32","description":"Optional district identifier.","type":"integer"},"streetDescription":{"description":"Free-form street description.","maxLength":500,"minLength":0,"type":"string"},"isDefault":{"description":"Whether this is the customer's default address. Only one per customer; first is promoted if none set.","type":"boolean"},"addressPhone":{"description":"Optional address phone number.","maxLength":50,"minLength":0,"type":"string"},"externalId":{"description":"Optional external identifier.","maxLength":50,"minLength":0,"type":"string"}}},"CustomerAddressWithLocationResponse":{"description":"Response describing a customer address, including resolved location names.","type":"object","properties":{"id":{"format":"int32","description":"Address identifier.","type":"integer"},"customerId":{"format":"int32","description":"Owning customer identifier.","type":"integer"},"name":{"description":"Address label.","type":"string"},"country":{"$ref":"#/definitions/CountryReference","description":"Country reference."},"city":{"$ref":"#/definitions/CityReference","description":"City reference."},"district":{"$ref":"#/definitions/DistrictReference","description":"District reference, if any."},"streetDescription":{"description":"Street description (building number, floor, etc.).","type":"string"},"description":{"description":"Full printable address description.","type":"string"},"isDefault":{"description":"Indicates whether this is the default address.","type":"boolean"},"addressPhone":{"description":"Address phone number.","type":"string"},"externalId":{"description":"External identifier for the address.","type":"string"}}},"CountryReference":{"description":"Lightweight country reference (id + name).","type":"object","properties":{"id":{"format":"int32","description":"The country id.","type":"integer"},"name":{"description":"The country name.","type":"string"}}},"CityReference":{"description":"Lightweight city reference (id + name).","type":"object","properties":{"id":{"format":"int32","description":"The city id.","type":"integer"},"name":{"description":"The city name.","type":"string"}}},"DistrictReference":{"description":"Lightweight district reference (id + name).","type":"object","properties":{"id":{"format":"int32","description":"The district id.","type":"integer"},"name":{"description":"The district name.","type":"string"}}},"GetInvoiceableDocumentsQuery":{"description":"Query parameters for listing invoiceable source documents (SO/SR/IO/RR) for a customer.","required":["documentTypes","limit"],"type":"object","properties":{"documentTypes":{"description":"The source document types to include. Supported values: SO, SR, IO, RR.","type":"array","items":{"type":"string"}},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":20,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[InvoiceableDocumentResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/InvoiceableDocumentResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"InvoiceableDocumentResponse":{"description":"Response describing an invoiceable source document header (SO/SR/IO/RR).","type":"object","properties":{"code":{"description":"The source document code.","type":"string"},"type":{"description":"The source document type.","type":"string"},"date":{"format":"date-time","description":"The document date.","type":"string"},"customer":{"description":"The customer name.","type":"string"},"currency":{"description":"The document currency code.","type":"string"},"netTotal":{"format":"double","description":"The document net total. For IO/RR this is computed from\r\nWarehouse.WHWorkOrderDetails (SUM(Quantity * Value)).","type":"number"}}},"GetCustomersQuery":{"description":"Query parameters for listing customers. String filters are case-insensitive CONTAINS matches.","required":[],"type":"object","properties":{"code":{"description":"CONTAINS filter on code.","maxLength":50,"minLength":0,"type":"string"},"name":{"description":"CONTAINS filter on name.","maxLength":250,"minLength":0,"type":"string"},"phone":{"description":"CONTAINS filter on primary phone.","maxLength":50,"minLength":0,"type":"string"},"mobile":{"description":"CONTAINS filter on mobile.","maxLength":50,"minLength":0,"type":"string"},"email":{"description":"CONTAINS filter on email.","maxLength":250,"minLength":0,"type":"string"},"externalId":{"description":"CONTAINS filter on external id.","maxLength":50,"minLength":0,"type":"string"},"updateDate":{"format":"date-time","description":"Returns records modified on or after this date (UTC, inclusive).","type":"string"},"search":{"description":"Free-text search across name/code/phone/mobile/email. Takes precedence over individual filters.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[CustomerResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/CustomerResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"BatchResult[CustomerResponse]":{"description":"Response describing the outcome of a batch operation.","type":"object","properties":{"succeeded":{"description":"Items that were successfully processed.","type":"array","items":{"$ref":"#/definitions/CustomerResponse"}},"failed":{"description":"Per-item failures keyed by the failing request's identifier (typically Name or Code), with a human-readable error message as the value.","type":"object","additionalProperties":{"type":"string"}}}},"DistrictResponse":{"description":"Response describing a district.","type":"object","properties":{"id":{"format":"int32","description":"The district identifier.","type":"integer"},"name":{"description":"The district name.","type":"string"},"cityId":{"format":"int32","description":"The city identifier.","type":"integer"}}},"DistrictUpsertRequest":{"description":"Request to create or update a district.","required":["name","name"],"type":"object","properties":{"name":{"description":"The district name.","maxLength":100,"minLength":0,"type":"string"},"cityId":{"format":"int32","description":"The parent city identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"}}},"GetDistrictsQuery":{"description":"Query parameters for listing districts.","required":[],"type":"object","properties":{"name":{"description":"Optional district name filter.","type":"string"},"cityId":{"format":"int32","description":"Optional city identifier filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[DistrictResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/DistrictResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"GetDynamicPropertiesQuery":{"description":"Query parameters for listing dynamic properties.","required":[],"type":"object","properties":{"names":{"description":"Optional names to filter by.","type":"array","items":{"type":"string"}},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[DynamicPropertyResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/DynamicPropertyResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"DynamicPropertyResponse":{"description":"Response describing a dynamic property.","type":"object","properties":{"id":{"format":"int32","description":"Identifier.","type":"integer"},"name":{"description":"Property name.","type":"string"},"code":{"description":"Optional property code.","type":"string"},"values":{"description":"Property values.","type":"array","items":{"$ref":"#/definitions/DynamicPropertyValueResponse"}}}},"DynamicPropertyValueResponse":{"description":"Response describing a dynamic-property value.","type":"object","properties":{"id":{"format":"int32","description":"Identifier.","type":"integer"},"value":{"description":"Value text.","type":"string"},"code":{"description":"Optional code.","type":"string"}}},"DynamicPropertyTreeResponse":{"description":"Response describing a dynamic-property tree node.","type":"object","properties":{"dynamicPropertyId":{"format":"int32","description":"Dynamic property identifier.","type":"integer"},"parentId":{"format":"int32","description":"Parent identifier.","type":"integer"},"description":{"description":"Description.","type":"string"},"isVisible":{"description":"Whether the node is visible.","type":"boolean"},"treeLevel":{"format":"int32","description":"Tree level.","type":"integer"}}},"DynamicPropertyValuesUpdateRequest":{"description":"Request to replace the values of a dynamic property.","required":["values"],"type":"object","properties":{"values":{"description":"Full desired set of values; omitted values are deleted.","type":"array","items":{"$ref":"#/definitions/DynamicPropertyValueUpsertRequest"}}}},"DynamicPropertyValueUpsertRequest":{"description":"Request to create or update a dynamic-property value.","required":["value"],"type":"object","properties":{"value":{"description":"Display text (e.g. \"Red\", \"Large\").","maxLength":70,"minLength":0,"type":"string"},"code":{"description":"Optional code. Required when coding method is FreeCoding or NoCoding.","maxLength":50,"minLength":0,"type":"string"}}},"DynamicPropertyBatchInsertRequest":{"description":"Request to batch-create a dynamic property with its values.","required":["name","values"],"type":"object","properties":{"name":{"description":"Display name (e.g. \"Color\", \"Size\").","maxLength":70,"minLength":0,"type":"string"},"code":{"description":"Optional code. Required when coding method is FreeCoding or NoCoding.","maxLength":50,"minLength":0,"type":"string"},"values":{"description":"Values associated with the property. At least one required.","type":"array","items":{"$ref":"#/definitions/DynamicPropertyValueUpsertRequest"}}}},"DynamicPropertyBatchInsertResponse":{"description":"Response describing the result of a dynamic-property batch insert.","type":"object","properties":{"failed":{"description":"Failed items with their error messages.","type":"object","additionalProperties":{"type":"string"}},"succeeded":{"description":"Successfully inserted dynamic properties.","type":"array","items":{"$ref":"#/definitions/DynamicPropertyResponse"}}}},"IntegrationLookupQuery":{"description":"Query parameters for looking up an integration user by username.","required":[],"type":"object","properties":{"username":{"description":"The integration username.","type":"string"}}},"IntegrationResponse":{"description":"Response describing an integration account.","type":"object","properties":{"userId":{"format":"int32","description":"The internal Edara user identifier.","type":"integer"},"username":{"description":"The integration username.","type":"string"},"email":{"description":"The integration email address.","type":"string"},"accessToken":{"description":"The generated bearer token used by external connectors.","type":"string"}}},"IntegrationCreateRequest":{"description":"Request to create an integration user.","required":[],"type":"object","properties":{"userName":{"description":"The integration username.","type":"string"},"password":{"description":"Optional password; a random one is generated when omitted.","type":"string"},"email":{"description":"The integration email address.","type":"string"},"roles":{"description":"Optional roles to assign to the created identity user.","type":"array","items":{"type":"string"}}}},"DeleteIntegrationQuery":{"description":"Query parameters for deleting an integration by email.","required":[],"type":"object","properties":{"email":{"description":"The integration email address.","type":"string"}}},"GetJournalEntriesQuery":{"description":"Query parameters for listing journal entries.","required":[],"type":"object","properties":{"code":{"description":"The journal entry code.","type":"string"},"paperNumber":{"description":"The journal entry paper number.","type":"string"},"relatedIOCode":{"description":"The related issue-offering code.","type":"string"},"accountId":{"format":"int32","description":"Returns journal entries where any detail line hits this general-ledger account.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"customerId":{"format":"int32","description":"Narrows to journal entries whose matched account line carries this customer.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"supplierId":{"format":"int32","description":"Narrows to journal entries whose matched account line carries this supplier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"costCenterId":{"format":"int32","description":"Narrows to journal entries whose matched account line is tagged with this cost center.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"dateFrom":{"format":"date-time","description":"Only journal entries on or after this document date.","type":"string"},"dateTo":{"format":"date-time","description":"Only journal entries on or before this document date.","type":"string"},"isPostedOnly":{"description":"When false, unposted/draft journal entries are also included. Defaults to true.","type":"boolean"},"currencyId":{"format":"int32","description":"Only journal entries recorded in this currency.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"effectiveIsPostedOnly":{"description":"Effective posted-only flag, defaulting to true.","type":"boolean","readOnly":true},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[JournalEntryResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/JournalEntryResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"JournalEntryResponse":{"description":"Response describing a journal entry.","type":"object","properties":{"id":{"format":"int32","description":"The document identifier.","type":"integer"},"documentCode":{"description":"The document code.","type":"string"},"jeCode":{"description":"The journal entry's own general-ledger code.","type":"string"},"documentType":{"description":"The source document type code (for example SI, CI, or JE).","type":"string"},"isPosted":{"description":"Whether the journal entry is posted.","type":"boolean"},"documentDate":{"format":"date-time","description":"The accounting document date.","type":"string"},"paperNumber":{"description":"The external paper number.","type":"string"},"responsibleId":{"format":"int32","description":"The responsible user identifier.","type":"integer"},"notes":{"description":"Document notes.","type":"string"},"currency":{"$ref":"#/definitions/CurrencyReference","description":"The optional currency reference."},"exchangeRate":{"format":"double","description":"The exchange rate.","type":"number"},"isSystemDocument":{"description":"Whether the journal entry is system-generated.","type":"boolean"},"isInvoicingJE":{"description":"Whether this journal entry was generated by Invoicing 3.0.","type":"boolean"},"relatedOrder":{"description":"The related sales or purchase order code.","type":"string"},"relatedWarehouseDoc":{"description":"The related warehouse issue or receipt document code.","type":"string"},"accountingDocumentDetails":{"description":"The detail lines.","type":"array","items":{"$ref":"#/definitions/JournalEntryDetailResponse"}}}},"JournalEntryDetailResponse":{"description":"Response describing a journal entry detail line.","type":"object","properties":{"id":{"format":"int32","description":"The detail identifier.","type":"integer"},"account":{"$ref":"#/definitions/AccountReference","description":"The account reference."},"costCenter":{"$ref":"#/definitions/CostCenterReference","description":"The optional cost center reference."},"amount":{"format":"double","description":"The line amount.","type":"number"},"amountStatus":{"description":"The amount status.","enum":["Debit","Credit"],"type":"string"},"comments":{"description":"Optional line comments.","type":"string"},"customer":{"$ref":"#/definitions/CustomerReference","description":"The optional customer reference."},"supplier":{"$ref":"#/definitions/SupplierReference","description":"The optional supplier reference."}}},"CreateJournalEntryRequest":{"description":"Request to create a journal entry.","required":["documentDate","accountingDocumentDetails","accountingDocumentDetails"],"type":"object","properties":{"isInvoicingJE":{"description":"Whether this journal entry was generated by Invoicing 3.0. Optional; defaults to false.","type":"boolean"},"documentDate":{"format":"date-time","description":"The accounting document date.","type":"string"},"paperNumber":{"description":"The external paper number.","type":"string"},"responsibleId":{"format":"int32","description":"The responsible user identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"notes":{"description":"Document notes.","type":"string"},"currencyId":{"format":"int32","description":"The optional currency identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"exchangeRate":{"format":"double","description":"The exchange rate when a currency is supplied.","minimum":0,"exclusiveMinimum":true,"type":"number"},"relatedDocumentCode":{"description":"The code of a related document.","type":"string"},"linkedDocumentCode":{"description":"The code of an additional linked document.","type":"string"},"accountingDocumentDetails":{"description":"The detail lines.","type":"array","items":{"$ref":"#/definitions/CreateJournalEntryDetailRequest"}}}},"CreateJournalEntryDetailRequest":{"description":"Request describing a new journal entry detail line.","required":["amountStatus"],"type":"object","properties":{"accountId":{"format":"int32","description":"The account identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"costCenterId":{"format":"int32","description":"The optional cost center identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"amount":{"format":"double","description":"The line amount.","minimum":0,"exclusiveMinimum":true,"type":"number"},"amountStatus":{"description":"The amount status.","enum":["Debit","Credit"],"type":"string"},"comments":{"description":"Optional line comments.","type":"string"},"customerId":{"format":"int32","description":"The optional customer identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"supplierId":{"format":"int32","description":"The optional supplier identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"}}},"JournalEntryMutationResponse":{"description":"Response describing a created journal entry.","type":"object","properties":{"documentCode":{"description":"The generated document code.","type":"string"}}},"UpdateJournalEntryRequest":{"description":"Request to update a journal entry.","required":["documentDate","accountingDocumentDetails","accountingDocumentDetails"],"type":"object","properties":{"documentDate":{"format":"date-time","description":"The accounting document date.","type":"string"},"paperNumber":{"description":"The external paper number.","type":"string"},"responsibleId":{"format":"int32","description":"The responsible user identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"notes":{"description":"Document notes.","type":"string"},"currencyId":{"format":"int32","description":"The optional currency identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"exchangeRate":{"format":"double","description":"The exchange rate when a currency is supplied.","minimum":0,"exclusiveMinimum":true,"type":"number"},"accountingDocumentDetails":{"description":"The detail lines.","type":"array","items":{"$ref":"#/definitions/UpdateJournalEntryDetailRequest"}}}},"UpdateJournalEntryDetailRequest":{"description":"Request describing a journal entry detail line on update.","required":["amountStatus"],"type":"object","properties":{"id":{"format":"int32","description":"The detail identifier.","type":"integer"},"accountId":{"format":"int32","description":"The account identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"costCenterId":{"format":"int32","description":"The optional cost center identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"amount":{"format":"double","description":"The line amount.","minimum":0,"exclusiveMinimum":true,"type":"number"},"amountStatus":{"description":"The amount status.","enum":["Debit","Credit"],"type":"string"},"comments":{"description":"Optional line comments.","type":"string"},"customerId":{"format":"int32","description":"The optional customer identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"supplierId":{"format":"int32","description":"The optional supplier identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"rowState":{"description":"The row state for the update.","enum":["Added","Modified","Deleted"],"type":"string"}}},"CreatePaymentJournalEntryRequest":{"description":"Request to create a payment journal entry against a sales order.","required":["documentDate","salesOrderToPay","accountingDocumentDetails","accountingDocumentDetails"],"type":"object","properties":{"documentDate":{"format":"date-time","description":"The accounting document date.","type":"string"},"paperNumber":{"description":"The external paper number.","type":"string"},"responsibleId":{"format":"int32","description":"The responsible user identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"notes":{"description":"Document notes.","type":"string"},"currencyId":{"format":"int32","description":"The optional currency identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"exchangeRate":{"format":"double","description":"The exchange rate when a currency is supplied.","minimum":0,"exclusiveMinimum":true,"type":"number"},"salesOrderToPay":{"description":"The code of the sales order being paid. Required.","type":"string"},"linkedDocumentCode":{"description":"The code of an additional linked document.","type":"string"},"accountingDocumentDetails":{"description":"The detail lines.","type":"array","items":{"$ref":"#/definitions/PaymentJournalEntryDetailRequest"}}}},"PaymentJournalEntryDetailRequest":{"description":"Request describing a payment journal entry detail line.","required":["amountStatus"],"type":"object","properties":{"accountId":{"format":"int32","description":"The account identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"costCenterId":{"format":"int32","description":"The optional cost center identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"amount":{"format":"double","description":"The line amount.","minimum":0,"exclusiveMinimum":true,"type":"number"},"amountStatus":{"description":"The amount status.","enum":["Debit","Credit"],"type":"string"},"comments":{"description":"Optional line comments.","type":"string"}}},"PortalMenuResponse":{"description":"The signed-in user's left menu, already filtered by the user's page permissions.","type":"object","properties":{"modules":{"description":"Gets or sets the menu modules (real modules first, then \"Functions\" groups).","type":"array","items":{"$ref":"#/definitions/PortalMenuModuleResponse"}}}},"PortalMenuModuleResponse":{"description":"One sidebar module (or \"Functions\" group) with its flattened pages.","type":"object","properties":{"label":{"description":"Gets or sets the module display name, localized to the user's UI language.","type":"string"},"icon":{"description":"Gets or sets the module icon CSS class name.","type":"string"},"isFunction":{"description":"Gets or sets a value indicating whether this is a \"Functions\" group — the portal nests these under one node.","type":"boolean"},"pages":{"description":"Gets or sets the module's visible pages.","type":"array","items":{"$ref":"#/definitions/PortalMenuPageResponse"}}}},"PortalMenuPageResponse":{"description":"One menu page, carrying the position Edara 2's own mega-menu renders it at\r\nso the portal can redraw the menu column-for-column.","type":"object","properties":{"label":{"description":"Gets or sets the page display name, localized to the user's UI language.","type":"string"},"url":{"description":"Gets or sets the page URL relative to the Edara 2 application root.","type":"string"},"category":{"description":"Gets or sets the bold column header the page sits under (e.g. \"Master data\").","type":"string"},"subCategory":{"description":"Gets or sets the gray sub-header the page is nested under (e.g. \"Cash\"), or null for direct links.","type":"string"},"column":{"format":"int32","description":"Gets or sets the mega-menu column index (0-3) the page renders in.","type":"integer"},"favorite":{"description":"Gets or sets a value indicating whether the page is one of the user's favorites.","type":"boolean"}}},"PurchaseOrderResponse":{"description":"Response describing a purchase order.","type":"object","properties":{"id":{"format":"int32","description":"Unique identifier of the purchase order.","type":"integer"},"documentCode":{"description":"System-generated document code.","type":"string"},"documentType":{"description":"Type of the purchase document.","enum":["RS","RR","RT","IO","IR","IT","TR","CI","CO","JE","SI","PI","CN","DN","NR","NP","SO","SR","RecSO","PO","PR","OB","RMA"],"type":"string"},"orderStatus":{"description":"Current fulfilment status of the purchase order.","enum":["Cancelled","Confirmed","Pending","Processing","OutForDelivery","Shipped","Returned","Open"],"type":"string"},"paperNumber":{"description":"External paper/reference number from the supplier's document.","type":"string"},"supplier":{"$ref":"#/definitions/SupplierReference","description":"Supplier the goods are purchased from."},"purchasePersonId":{"format":"int32","description":"Identifier of the purchase person responsible for the order.","type":"integer"},"warehouse":{"$ref":"#/definitions/WarehouseReference","description":"Destination warehouse where goods are received."},"treasuryId":{"format":"int32","description":"Identifier of the treasury used for cash settlement.","type":"integer"},"npAccount":{"$ref":"#/definitions/AccountReference","description":"Notes-payable account associated with the order."},"costAllocationAccount":{"$ref":"#/definitions/AccountReference","description":"Account used to allocate landed/extra costs."},"currency":{"$ref":"#/definitions/CurrencyReference","description":"Currency of the order."},"exchangeRate":{"format":"double","description":"Exchange rate to the system currency.","type":"number"},"documentDate":{"format":"date-time","description":"Date of the purchase order document.","type":"string"},"shippingDate":{"format":"date-time","description":"Expected delivery/shipping date.","type":"string"},"grossTotal":{"format":"double","description":"Total before discounts and taxes.","type":"number"},"subTotal":{"format":"double","description":"Subtotal after line-item discounts but before order discount and taxes.","type":"number"},"netTotal":{"format":"double","description":"Final total after all discounts and taxes.","type":"number"},"totalItemsDiscounts":{"format":"double","description":"Sum of all line-item discounts.","type":"number"},"discount":{"format":"double","description":"Order-level discount amount.","type":"number"},"discountRate":{"format":"double","description":"Order-level discount percentage.","type":"number"},"taxable":{"description":"Indicates whether the order is subject to tax.","type":"boolean"},"needAddedTax":{"description":"Indicates whether added tax applies to the order.","type":"boolean"},"applyTaxAfterDiscount":{"description":"Indicates whether tax is applied after the order discount.","type":"boolean"},"tax":{"format":"double","description":"Total tax amount for the order.","type":"number"},"addedTax":{"format":"double","description":"Total added-tax amount for the order.","type":"number"},"cashAmount":{"format":"double","description":"Cash amount paid at the time of the order.","type":"number"},"npAmount":{"format":"double","description":"Amount recorded against the notes-payable account.","type":"number"},"onAccountAmount":{"format":"double","description":"Amount recorded on the supplier account (credit).","type":"number"},"allocatedCost":{"format":"double","description":"Cost allocated to the order.","type":"number"},"distributedCost":{"format":"double","description":"Cost distributed across the order line items.","type":"number"},"notes":{"description":"Free-text notes for the purchase order.","type":"string"},"printPrice":{"description":"Indicates whether prices are printed on the document.","type":"boolean"},"isIssued":{"description":"Indicates whether the order has been issued to the warehouse.","type":"boolean"},"issueDate":{"format":"date-time","description":"Date the order was issued.","type":"string"},"isCashed":{"description":"Indicates whether the order has been cashed.","type":"boolean"},"isNPDone":{"description":"Indicates whether the notes-payable processing is done.","type":"boolean"},"isReviewed":{"description":"Indicates whether the order has been reviewed.","type":"boolean"},"isByPassed":{"description":"Indicates whether the order bypassed standard processing.","type":"boolean"},"byPassingReason":{"description":"Reason the order bypassed standard processing.","type":"string"},"byPassUserId":{"format":"int32","description":"Identifier of the user who bypassed the order.","type":"integer"},"replicated":{"description":"Indicates whether the order was replicated.","type":"boolean"},"hasCostAllocation":{"description":"Indicates whether the order has cost allocation.","type":"boolean"},"salesStore":{"$ref":"#/definitions/SalesStoreReference","description":"Sales store associated with the order."},"requireAutoCash":{"description":"Indicates whether automatic cash settlement is required.","type":"boolean"},"requireAutoCredit":{"description":"Indicates whether automatic credit settlement is required.","type":"boolean"},"requireAutoWorkorder":{"description":"Indicates whether an automatic work order is required.","type":"boolean"},"channel":{"description":"Channel through which the order was placed.","type":"string"},"attachmentName":{"description":"Name of the attached file, if any.","type":"string"},"relatedWorkOrderCode":{"description":"Document code of the related work order, when the purchase is for a specific job.","type":"string"},"relatedWorkOrderValue":{"format":"double","description":"Value attributed to the related work order.","type":"number"},"purchaseOrderDetails":{"description":"Line items of the purchase order.","type":"array","items":{"$ref":"#/definitions/PurchaseOrderItemResponse"}},"purchaseOrderInstallments":{"description":"Payment installments of the purchase order.","type":"array","items":{"$ref":"#/definitions/PurchaseOrderInstallmentResponse"}}}},"WarehouseReference":{"description":"Lightweight warehouse reference (id + code + name).","type":"object","properties":{"id":{"format":"int32","description":"The warehouse id.","type":"integer"},"code":{"description":"The warehouse code.","type":"string"},"name":{"description":"The warehouse name.","type":"string"}}},"SalesStoreReference":{"description":"Lightweight sales-store reference (id + code + name).","type":"object","properties":{"id":{"format":"int32","description":"The sales-store id.","type":"integer"},"code":{"description":"The sales-store code.","type":"string"},"name":{"description":"The sales-store name.","type":"string"}}},"PurchaseOrderItemResponse":{"description":"Response describing a purchase-order line item.","type":"object","properties":{"id":{"format":"int32","description":"Unique identifier of the line item.","type":"integer"},"documentId":{"format":"int32","description":"Identifier of the parent purchase order.","type":"integer"},"quantity":{"format":"double","description":"Quantity ordered.","type":"number"},"issuedQuantity":{"format":"double","description":"Quantity already issued or received against this line.","type":"number"},"unitPrice":{"format":"double","description":"Price per unit before discounts.","type":"number"},"price":{"format":"double","description":"Total line price (quantity * unit price) before discount.","type":"number"},"tax":{"$ref":"#/definitions/TaxReference","description":"Tax applied to the line item."},"taxRate":{"format":"double","description":"Effective tax rate applied to the line item.","type":"number"},"itemDiscount":{"format":"double","description":"Discount applied to the line item, interpreted per {Edara.API.DTOs.Purchase.PurchaseOrders.Responses.PurchaseOrderItemResponse.ItemDiscountType}.","type":"number"},"itemDiscountType":{"description":"Type of the line-item discount (value or percentage).","enum":["Value","Percentage"],"type":"string"},"serviceItemId":{"format":"int32","description":"Identifier of the service item, when the line represents a service.","type":"integer"},"stockItem":{"$ref":"#/definitions/StockItemReference","description":"Stock item being purchased."},"unitOfMeasure":{"$ref":"#/definitions/UnitOfMeasureReference","description":"Unit of measure of the ordered quantity."},"umRatio":{"format":"double","description":"Conversion ratio of the selected unit of measure to the base unit.","type":"number"},"comments":{"description":"Free-text comments for the line item.","type":"string"},"returnedQuantity":{"format":"double","description":"Quantity that has been returned against this line.","type":"number"},"batchNumber":{"description":"Batch number of the received goods.","type":"string"},"productionDate":{"format":"date-time","description":"Production date of the batch.","type":"string"},"expiryDate":{"format":"date-time","description":"Expiry date of the batch.","type":"string"},"detailWarehouse":{"$ref":"#/definitions/WarehouseReference","description":"Warehouse the line is received into, when it differs from the document warehouse."},"packagesCount":{"format":"double","description":"Number of packages for the line.","type":"number"},"purchaseItemId":{"format":"int32","description":"Identifier of the linked purchase item.","type":"integer"},"stockItemClassificationCode":{"description":"Classification code of the stock item.","type":"string"},"unitFairValue":{"format":"double","description":"Unit fair value of the line item.","type":"number"},"updateWOdetailId":{"format":"int32","description":"Identifier of the work-order detail this line updates.","type":"integer"},"returnedFromWOdetailId":{"format":"int32","description":"Identifier of the work-order detail this line was returned from.","type":"integer"},"linkedPODetailId":{"format":"int32","description":"Identifier of the originating purchase-order detail this line is linked to.","type":"integer"}}},"PurchaseOrderInstallmentResponse":{"description":"Response describing a purchase-order payment installment.","type":"object","properties":{"id":{"format":"int32","description":"Unique identifier of the installment.","type":"integer"},"documentId":{"format":"int32","description":"Identifier of the parent purchase order.","type":"integer"},"daysLimit":{"format":"int32","description":"Number of days from the document date until the payment is due.","type":"integer"},"amount":{"format":"double","description":"Amount due for this installment.","type":"number"},"dueDate":{"format":"date-time","description":"Due date of the installment payment.","type":"string"},"bankId":{"format":"int32","description":"Identifier of the bank associated with the installment.","type":"integer"},"noteNo":{"description":"Promissory note number for the installment.","type":"string"},"comments":{"description":"Free-text comments for the installment.","type":"string"},"noteTypeId":{"format":"int32","description":"Identifier of the note type for the installment.","type":"integer"}}},"GetPurchaseOrdersQuery":{"description":"Query parameters for listing purchase orders.","type":"object","properties":{"code":{"description":"Optional exact document-code filter.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[PurchaseOrderResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/PurchaseOrderResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"FindPurchaseOrdersRequest":{"description":"Query parameters for searching purchase orders.","required":["dateFrom","dateTo"],"type":"object","properties":{"supplierId":{"format":"int32","description":"Supplier identifier filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"dateFrom":{"format":"date-time","description":"Inclusive lower bound of the document date range.","type":"string"},"dateTo":{"format":"date-time","description":"Inclusive upper bound of the document date range.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":100,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"FindPurchaseReturnsRequest":{"description":"Query parameters for searching purchase returns.","required":["dateFrom","dateTo"],"type":"object","properties":{"supplierId":{"format":"int32","description":"Supplier identifier filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"dateFrom":{"format":"date-time","description":"Inclusive lower bound of the document date range.","type":"string"},"dateTo":{"format":"date-time","description":"Inclusive upper bound of the document date range.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":100,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"GetSalesOrdersQuery":{"description":"Query parameters for listing sales orders.","required":[],"type":"object","properties":{"documentCode":{"description":"Document code filter.","type":"string"},"paperNumber":{"description":"Paper/reference number filter.","type":"string"},"warehouseId":{"format":"int32","description":"Warehouse id filter.","type":"integer"},"salesPersonId":{"format":"int32","description":"Sales person id filter.","type":"integer"},"tags":{"description":"Tags filter.","type":"array","items":{"type":"string"}},"orderDateFrom":{"format":"date-time","description":"Inclusive lower bound of the document date range.","type":"string"},"orderDateTo":{"format":"date-time","description":"Inclusive upper bound of the document date range.","type":"string"},"orderStatus":{"description":"Order status filter.","enum":["Cancelled","Confirmed","Pending","Processing","OutForDelivery","Shipped","Returned","Open"],"type":"string"},"createdBy":{"description":"Creator filter.","type":"string"},"warehouseOnly":{"description":"Whether to limit to warehouse orders only.","type":"boolean"},"onlyMyOrders":{"description":"Whether to limit results to orders created by the current user. Defaults to true.","type":"boolean"},"customerId":{"format":"int32","description":"Customer id filter.","type":"integer"},"paymentStatus":{"description":"Payment status filter.","enum":["Unpaid","Paid"],"type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[SalesOrderHeaderListResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/SalesOrderHeaderListResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"SalesOrderHeaderListResponse":{"description":"Response row for the sales-order header listing (one row per sales order).","type":"object","properties":{"id":{"format":"int32","description":"The sales-order document id.","type":"integer"},"documentCode":{"description":"The sales-order document code.","type":"string"},"customerId":{"format":"int32","description":"The customer id.","type":"integer"},"customerName":{"description":"The customer name.","type":"string"},"salesPersonId":{"format":"int32","description":"The sales-person id.","type":"integer"},"salesPersonName":{"description":"The sales-person name.","type":"string"},"documentDate":{"format":"date-time","description":"The sales-order document date.","type":"string"},"dueDate":{"format":"date-time","description":"The next installment due date, if any.","type":"string"},"orderStatus":{"description":"The sales-order status.","enum":["Cancelled","Confirmed","Pending","Processing","OutForDelivery","Shipped","Returned","Open"],"type":"string"},"salesOrderDetails":{"description":"The line items on the order.","type":"array","items":{"$ref":"#/definitions/SalesOrderDetailResponse"}},"salesOrderInstallments":{"description":"The payment installments scheduled against the order.","type":"array","items":{"$ref":"#/definitions/SalesOrderInstallmentResponse"}},"paymentStatus":{"description":"The order's payment status.","enum":["Unpaid","Paid"],"type":"string"},"paidAmount":{"format":"double","description":"The live, running paid amount — reflects actual collections, never the frozen down payment.","type":"number"},"remainingAmount":{"format":"double","description":"The outstanding balance (NetTotal - PaidAmount).","type":"number"},"netTotal":{"format":"double","description":"The order's net total.","type":"number"},"currency":{"$ref":"#/definitions/CurrencyReference","description":"The order's currency."},"salesStore":{"$ref":"#/definitions/SalesStoreReference","description":"The sales store originating the order."},"isIssued":{"description":"Whether the order has been issued.","type":"boolean"},"priceIncludeVat":{"description":"Whether item prices include VAT (tax-inclusive pricing).","type":"boolean"},"taxable":{"description":"Whether tax is applied to the order.","type":"boolean"},"channel":{"description":"The sales channel originating the order (e.g. web, POS).","type":"string"},"externalId":{"description":"An external identifier supplied by the caller for reconciliation.","type":"string"},"tags":{"description":"The tags assigned to the order.","type":"array","items":{"type":"string"}},"relatedWorkOrderCodes":{"description":"The codes of the work orders (issue offerings) related to this order.","type":"array","items":{"type":"string"}}}},"SalesOrderDetailResponse":{"description":"Response describing a sales-order line item.","type":"object","properties":{"id":{"format":"int32","description":"The line item id.","type":"integer"},"quantity":{"format":"double","description":"The quantity ordered, expressed in the line's unit of measure.","type":"number"},"issuedQuantity":{"format":"double","description":"The quantity that has been issued from the warehouse.","type":"number"},"invoicedQuantity":{"format":"double","description":"The quantity that has already been invoiced against this line.","type":"number"},"unitPrice":{"format":"double","description":"The unit price before discount and tax.","type":"number"},"price":{"format":"double","description":"The extended line price after item-level discount, before tax.","type":"number"},"taxRate":{"format":"double","description":"The tax rate applied to the line as a percentage.","type":"number"},"withholdingTaxRate":{"format":"double","description":"The withholding-tax rate applied to the line as a percentage.","type":"number"},"tax":{"$ref":"#/definitions/TaxReference","description":"The tax applied to the line."},"itemDiscount":{"format":"double","description":"The item-level discount value (interpreted per {Edara.API.DTOs.Sales.SalesOrders.Responses.SalesOrderDetailResponse.ItemDiscountType}).","type":"number"},"itemDiscountType":{"description":"Whether the item discount is a flat amount or a percentage.","enum":["Value","Percentage"],"type":"string"},"warehouse":{"$ref":"#/definitions/WarehouseReference","description":"The warehouse the line is issued from."},"bundleId":{"format":"int32","description":"The bundle id when the line is part of a bundle, otherwise null.","type":"integer"},"serviceItemId":{"format":"int32","description":"The service-item id when the line is a service, otherwise null.","type":"integer"},"stockItem":{"$ref":"#/definitions/StockItemReference","description":"The stock item ordered on the line."},"unitOfMeasure":{"$ref":"#/definitions/UnitOfMeasureReference","description":"The unit of measure the quantity is expressed in."},"batchNumber":{"description":"The batch number, when the stock item is batch-tracked.","type":"string"},"expiryDate":{"format":"date-time","description":"The batch expiry date, when applicable.","type":"string"},"comments":{"description":"Free-form notes captured on the line.","type":"string"},"returnedQuantity":{"format":"double","description":"The quantity returned against this line.","type":"number"},"bundleQuantity":{"format":"double","description":"The bundle quantity when the line is a bundle component.","type":"number"}}},"SalesOrderInstallmentResponse":{"description":"Response describing a sales-order payment installment.","type":"object","properties":{"id":{"format":"int32","description":"The installment id.","type":"integer"},"daysLimit":{"format":"int32","description":"The number of days from the document date until the installment is due.","type":"integer"},"amount":{"format":"double","description":"The installment amount in the document currency.","type":"number"},"dueDate":{"format":"date-time","description":"The installment due date.","type":"string"},"account":{"$ref":"#/definitions/AccountReference","description":"The accounting account the installment is posted against."},"paymentType":{"description":"The payment method for the installment (e.g. cash, on-account).","enum":["Cash","Installments"],"type":"string"}}},"SalesOrderRequest":{"description":"Request to create or update a sales order.","required":["salesOrderDetails","customerId","documentDate","salesOrderDetails","salesOrderDetails"],"type":"object","properties":{"id":{"format":"int32","description":"The sales order id (set on update only).","type":"integer"},"orderStatus":{"description":"The initial order status.","enum":["Cancelled","Confirmed","Pending","Processing","OutForDelivery","Shipped","Returned","Open"],"type":"string"},"paperNumber":{"description":"The paper number printed on the source document.","type":"string"},"runSheetId":{"description":"The run-sheet identifier when grouped for delivery.","type":"string"},"customerId":{"format":"int32","description":"The id of the customer the order is issued to. Required.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"salesPersonId":{"format":"int32","description":"The id of the sales person credited with the sale.","type":"integer"},"warehouseId":{"format":"int32","description":"The id of the warehouse the items are issued from.","type":"integer"},"salesStoreId":{"format":"int32","description":"The id of the sales store originating the order.","type":"integer"},"shippmentCost":{"format":"double","description":"The shipment cost charged on the order.","type":"number"},"documentDate":{"format":"date-time","description":"The document date. Required.","type":"string"},"shippingDate":{"format":"date-time","description":"The planned shipping date.","type":"string"},"grossTotal":{"format":"double","description":"The gross total before discounts and tax.","type":"number"},"subTotal":{"format":"double","description":"The subtotal after item-level discounts, before order-level discount and tax.","type":"number"},"netTotal":{"format":"double","description":"The final payable amount.","type":"number"},"totalItemsDiscounts":{"format":"double","description":"The sum of all item-level discounts.","type":"number"},"discount":{"format":"double","description":"The order-level discount amount.","type":"number"},"discountRate":{"format":"double","description":"The order-level discount rate as a percentage.","type":"number"},"taxable":{"description":"Whether tax should be applied to the order.","type":"boolean"},"applyTaxAfterDiscount":{"description":"Whether tax is computed after applying the order-level discount.","type":"boolean"},"tax":{"format":"double","description":"The total tax amount.","type":"number"},"cashAmount":{"format":"double","description":"The amount paid in cash at order creation.","type":"number"},"onAccountAmount":{"format":"double","description":"The amount placed on the customer account (credit).","type":"number"},"cashPaid":{"format":"double","description":"The cash already collected against the order.","type":"number"},"currencyId":{"format":"int32","description":"The id of the document currency.","type":"integer"},"exchangeRate":{"format":"double","description":"The exchange rate against the system currency at the document date.","type":"number"},"channel":{"description":"The sales channel originating the order (e.g. web, POS).","type":"string"},"notes":{"description":"Free-form notes captured on the order.","type":"string"},"externalId":{"description":"An external identifier supplied by the caller for reconciliation.","type":"string"},"relatedWorkOrderCode":{"description":"The related work-order code, when one was already generated.","type":"string"},"relatedWorkOrderValue":{"format":"double","description":"The value of the related work order.","type":"number"},"tags":{"description":"The tags to assign to the order.","type":"array","items":{"type":"string"}},"isApproved":{"description":"Whether the order is approved for fulfillment.","type":"boolean"},"costCenterId":{"format":"int32","description":"The id of the cost center to associate with the order.","type":"integer"},"requireAutoWorkorder":{"description":"Whether a work order should be auto-generated on issue.","type":"boolean"},"salesOrderDetails":{"description":"The line items on the order. Required, at least one.","type":"array","items":{"$ref":"#/definitions/SalesOrderDetailRequest"}},"salesOrderInstallments":{"description":"The payment installments scheduled against the order.","type":"array","items":{"$ref":"#/definitions/SalesOrderInstallmentRequest"}}}},"SalesOrderDetailRequest":{"description":"Request to create or update a sales-order line item.","required":[],"type":"object","properties":{"id":{"format":"int32","description":"The line id (set on update only).","type":"integer"},"quantity":{"format":"double","description":"The quantity ordered, expressed in the line's unit of measure. Required.","minimum":0,"exclusiveMinimum":true,"type":"number"},"price":{"format":"double","description":"The unit price for the line. Required.","minimum":0,"exclusiveMinimum":false,"type":"number"},"taxRate":{"format":"double","description":"The tax rate applied to the line as a percentage.","type":"number"},"taxId":{"format":"int32","description":"The id of the tax applied to the line.","type":"integer"},"withholdingTaxId":{"format":"int32","description":"The id of the withholding tax applied to the line.","type":"integer"},"itemDiscount":{"format":"double","description":"The item-level discount value (interpreted per {Edara.API.DTOs.Sales.SalesOrders.Requests.SalesOrderDetailRequest.ItemDiscountType}).","type":"number"},"itemDiscountType":{"description":"Whether the item discount is a flat amount or a percentage.","enum":["Value","Percentage"],"type":"string"},"warehouseId":{"format":"int32","description":"The id of the warehouse the line is issued from.","type":"integer"},"bundleId":{"format":"int32","description":"The bundle id when the line is part of a bundle.","type":"integer"},"serviceItemId":{"format":"int32","description":"The service-item id when the line is a service.","type":"integer"},"stockItemId":{"format":"int32","description":"The stock-item id when the line is a stock item.","type":"integer"},"stockItemCode":{"description":"The stock-item code (alternative key when {Edara.API.DTOs.Sales.SalesOrders.Requests.SalesOrderDetailRequest.StockItemId} is not supplied).","type":"string"},"stockItemDescription":{"description":"The stock-item description (echoed on the response; not a lookup key).","type":"string"},"unitOfMeasureId":{"format":"int32","description":"The id of the unit of measure the quantity is expressed in.","type":"integer"},"batchNumber":{"description":"The batch number, when the stock item is batch-tracked.","type":"string"},"expiryDate":{"format":"date-time","description":"The batch expiry date, when applicable.","type":"string"},"comments":{"description":"Free-form notes captured on the line.","type":"string"},"bundleQuantity":{"format":"double","description":"The bundle quantity when the line is a bundle component.","type":"number"},"relatedSerials":{"description":"The list of serial numbers when the stock item is serial-tracked.","type":"array","items":{"type":"string"}}}},"SalesOrderInstallmentRequest":{"description":"Request to create or update a sales-order payment installment.","required":[],"type":"object","properties":{"id":{"format":"int32","description":"The installment id (set on update only).","type":"integer"},"daysLimit":{"format":"int32","description":"The number of days from the document date until the installment is due.","type":"integer"},"amount":{"format":"double","description":"The installment amount in the document currency.","minimum":0,"exclusiveMinimum":true,"type":"number"},"dueDate":{"format":"date-time","description":"The installment due date.","type":"string"},"accountId":{"format":"int32","description":"The id of the accounting account the installment is posted against.","type":"integer"},"paymentType":{"description":"The payment method for the installment (e.g. cash, on-account).","enum":["Cash","Installments"],"type":"string"}}},"SalesOrderResponse":{"description":"Response describing a sales order.","type":"object","properties":{"id":{"format":"int32","description":"The sales order id.","type":"integer"},"documentCode":{"description":"The sales order document code (unique per tenant).","type":"string"},"documentType":{"description":"The document type.","enum":["RS","RR","RT","IO","IR","IT","TR","CI","CO","JE","SI","PI","CN","DN","NR","NP","SO","SR","RecSO","PO","PR","OB","RMA"],"type":"string"},"orderStatus":{"description":"The current order status.","enum":["Cancelled","Confirmed","Pending","Processing","OutForDelivery","Shipped","Returned","Open"],"type":"string"},"paperNumber":{"description":"The paper number printed on the source document.","type":"string"},"runSheetId":{"description":"The run-sheet identifier when grouped for delivery.","type":"string"},"customer":{"$ref":"#/definitions/CustomerReference","description":"The customer the order is issued to."},"salesPerson":{"$ref":"#/definitions/SalesPersonReference","description":"The sales person credited with the sale."},"warehouse":{"$ref":"#/definitions/WarehouseReference","description":"The warehouse the items are issued from."},"salesStore":{"$ref":"#/definitions/SalesStoreReference","description":"The sales store originating the order."},"shippmentCost":{"format":"double","description":"The shipment cost charged on the order.","type":"number"},"documentDate":{"format":"date-time","description":"The document date.","type":"string"},"shippingDate":{"format":"date-time","description":"The planned shipping date.","type":"string"},"grossTotal":{"format":"double","description":"The gross total before discounts and tax.","type":"number"},"subTotal":{"format":"double","description":"The subtotal after item-level discounts, before order-level discount and tax.","type":"number"},"netTotal":{"format":"double","description":"The final payable amount.","type":"number"},"totalItemsDiscounts":{"format":"double","description":"The sum of all item-level discounts.","type":"number"},"discount":{"format":"double","description":"The order-level discount amount.","type":"number"},"discountRate":{"format":"double","description":"The order-level discount rate as a percentage.","type":"number"},"taxable":{"description":"Whether tax is applied to the order.","type":"boolean"},"priceIncludeVat":{"description":"Whether item prices include VAT (tax-inclusive pricing).","type":"boolean"},"isWithholdingTax":{"description":"Whether the document is liable for withholding tax.","type":"boolean"},"applyTaxAfterDiscount":{"description":"Whether tax is computed after applying the order-level discount.","type":"boolean"},"tax":{"format":"double","description":"The total tax amount.","type":"number"},"cashAmount":{"format":"double","description":"The amount paid in cash at order creation.","type":"number"},"onAccountAmount":{"format":"double","description":"The amount placed on the customer account (credit).","type":"number"},"cashPaid":{"format":"double","description":"The cash already collected against the order.","type":"number"},"currency":{"$ref":"#/definitions/CurrencyReference","description":"The document currency."},"exchangeRate":{"format":"double","description":"The exchange rate against the system currency at the document date.","type":"number"},"channel":{"description":"The sales channel originating the order (e.g. web, POS).","type":"string"},"notes":{"description":"Free-form notes captured on the order.","type":"string"},"externalId":{"description":"An external identifier supplied by the caller for reconciliation.","type":"string"},"relatedWorkOrderCode":{"description":"The related work-order code, when one was generated.","type":"string"},"relatedWorkOrderValue":{"format":"double","description":"The value of the related work order.","type":"number"},"tags":{"description":"The tags assigned to the order.","type":"array","items":{"type":"string"}},"isApproved":{"description":"Whether the order has been approved for fulfillment.","type":"boolean"},"isIssued":{"description":"Whether the order has been issued (committed to inventory).","type":"boolean"},"requireAutoWorkorder":{"description":"Whether a work order should be auto-generated on issue.","type":"boolean"},"salesOrderDetails":{"description":"The line items on the order.","type":"array","items":{"$ref":"#/definitions/SalesOrderDetailResponse"}},"salesOrderInstallments":{"description":"The payment installments scheduled against the order.","type":"array","items":{"$ref":"#/definitions/SalesOrderInstallmentResponse"}}}},"SalesOrderPrintTemplateResponse":{"description":"Response describing a sales-order print template.","type":"object","properties":{"id":{"format":"int32","description":"The print-template id.","type":"integer"},"moduleName":{"description":"The module the template belongs to.","type":"string"},"pageName":{"description":"The logical page the template is rendered on.","type":"string"},"paperSize":{"description":"The paper size (e.g. A4, A5).","type":"string"},"templateName":{"description":"The display name of the template.","type":"string"},"direction":{"description":"The text direction (\"ltr\" or \"rtl\").","type":"string"},"printTemplateDetails":{"description":"The key/value pairs that make up the template body.","type":"array","items":{"$ref":"#/definitions/SalesOrderPrintTemplateDetailResponse"}},"htmlContent":{"description":"The saved Advanced HTML template body, or null for a Simple/system template.","type":"string"}}},"SalesOrderPrintTemplateDetailResponse":{"description":"A single key/value pair in a sales-order print template body.","type":"object","properties":{"id":{"format":"int32","description":"The detail row id.","type":"integer"},"salesOrderPrintTemplateId":{"format":"int32","description":"The id of the parent print template.","type":"integer"},"key":{"description":"The detail key.","type":"string"},"value":{"description":"The detail value.","type":"string"}}},"GetSalesOrderPrintTemplatesQuery":{"description":"Query parameters for listing sales-order print templates.","type":"object","properties":{"updateDate":{"format":"date-time","description":"Inclusive lower bound of the print-template update date.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[SalesOrderPrintTemplateResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/SalesOrderPrintTemplateResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"GetBrandSalesQuery":{"description":"Query parameters for the brand-sales report.","type":"object","properties":{"brandName":{"description":"Filter by brand name (exact match).","type":"string"},"brandManager":{"description":"Filter by brand manager (exact match).","type":"string"},"dateFrom":{"format":"date-time","description":"Inclusive lower bound on the document date.","type":"string"},"dateTo":{"format":"date-time","description":"Inclusive upper bound on the document date.","type":"string"}}},"BrandSalesResponse":{"description":"Response row for the brand-sales report (aggregates per stock item).","type":"object","properties":{"stockItemId":{"format":"int32","description":"The stock item identifier.","type":"integer"},"description":{"description":"The stock-item description.","type":"string"},"balance":{"format":"int32","description":"The on-hand balance at the time of the report.","type":"integer"},"unitPrice":{"format":"double","description":"The unit price.","type":"number"},"soldVolume":{"format":"double","description":"The sold quantity in the reporting window.","type":"number"},"grossSales":{"format":"double","description":"The gross sales value in the reporting window.","type":"number"},"discountValue":{"format":"double","description":"The total discount value applied to sales.","type":"number"},"returnedVolume":{"format":"double","description":"The returned quantity in the reporting window.","type":"number"},"returnedSales":{"format":"double","description":"The returned sales value.","type":"number"},"netVolume":{"format":"double","description":"The net sold quantity (sold minus returned).","type":"number"},"netSales":{"format":"double","description":"The net sales value (gross minus discounts minus returns).","type":"number"}}},"FindSalesOrdersRequest":{"description":"Query parameters for searching sales orders.","type":"object","properties":{"documentDateFrom":{"format":"date-time","description":"Inclusive lower bound on the document date.","type":"string"},"documentDateTo":{"format":"date-time","description":"Inclusive upper bound on the document date.","type":"string"},"documentCodes":{"description":"Filter by one or more document codes (exact match).","type":"array","items":{"type":"string"}},"documentStatuses":{"description":"Filter by one or more document statuses.","type":"array","items":{"enum":["Cancelled","Confirmed","Pending","Processing","OutForDelivery","Shipped","Returned","Open"],"type":"string"}},"stockItemIds":{"description":"Filter by one or more stock-item ids appearing on the order lines.","type":"array","items":{"format":"int32","type":"integer"}},"customerIds":{"description":"Filter by one or more customer ids.","type":"array","items":{"format":"int32","type":"integer"}},"salesPersonIds":{"description":"Filter by one or more sales-person ids.","type":"array","items":{"format":"int32","type":"integer"}},"dueDate":{"format":"date-time","description":"Filter by exact next-installment due date.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[SalesOrderFlatResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/SalesOrderFlatResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"SalesOrderFlatResponse":{"description":"Response row for the flattened sales-order list (one row per line item).","type":"object","properties":{"id":{"format":"int32","description":"The line item id.","type":"integer"},"documentId":{"format":"int32","description":"The parent sales-order document id.","type":"integer"},"documentCode":{"description":"The sales-order document code.","type":"string"},"customerId":{"format":"int32","description":"The customer id.","type":"integer"},"customerName":{"description":"The customer name.","type":"string"},"salesPersonId":{"format":"int32","description":"The sales-person id.","type":"integer"},"salesPersonName":{"description":"The sales-person name.","type":"string"},"documentDate":{"format":"date-time","description":"The sales-order document date.","type":"string"},"dueDate":{"format":"date-time","description":"The next installment due date, if any.","type":"string"},"orderStatus":{"description":"The sales-order status.","enum":["Cancelled","Confirmed","Pending","Processing","OutForDelivery","Shipped","Returned","Open"],"type":"string"},"stockItemId":{"format":"int32","description":"The stock-item id on the line.","type":"integer"},"stockItemCode":{"description":"The stock-item code on the line.","type":"string"},"stockItemDescription":{"description":"The stock-item description on the line.","type":"string"},"quantity":{"format":"double","description":"The quantity on the line.","type":"number"}}},"SyncSalesOrderResult":{"description":"Per-item result of a sales-order sync operation.","type":"object","properties":{"documentCode":{"description":"The document code of the synced sales order (when known).","type":"string"},"externalId":{"description":"The external id supplied by the caller for this entry.","type":"string"},"customerId":{"format":"int32","description":"The customer id this entry targets.","type":"integer"},"statusCode":{"description":"Whether this entry was processed successfully.","type":"boolean"},"statusMessage":{"description":"The status message; carries the error description when {Edara.API.DTOs.Sales.SalesOrders.Responses.SyncSalesOrderResult.StatusCode} is false.","type":"string"},"requireAutoWorkorder":{"description":"Indicates whether a work order should be automatically created for service items.","type":"boolean"}}},"IssueSalesOrderRequest":{"description":"Request to issue a sales order.","required":["salesOrderCode"],"type":"object","properties":{"salesOrderCode":{"description":"Sales-order code to issue.","type":"string"}}},"SalesOrderActionResponse":{"description":"Response describing a sales-order state transition (issue / cancel / un-issue).","type":"object","properties":{"salesOrderCode":{"description":"The sales-order code the action was performed on.","type":"string"},"status":{"description":"The new status after the action.","type":"string"},"changedAt":{"format":"date-time","description":"The timestamp at which the action was applied.","type":"string"}}},"ApproveSalesOrderRequest":{"description":"Request to approve a sales order.","required":["salesOrderCode"],"type":"object","properties":{"salesOrderCode":{"description":"Sales-order code to approve.","type":"string"}}},"ApproveSalesOrderResponse":{"description":"Response describing the outcome of a sales-order approval.","type":"object","properties":{"salesOrderCode":{"description":"The sales-order code that was approved.","type":"string"},"status":{"description":"The status of the order after approval.","type":"string"},"approvedDate":{"format":"date-time","description":"The timestamp at which the approval was applied.","type":"string"}}},"CashInForSalesOrderRequest":{"description":"Request to create a cash-in receipt against a sales order.","required":["paidAmount","relatedSalesOrderCode","cashAccountId","paidAmount","relatedSalesOrderCode","cashAccountId"],"type":"object","properties":{"documentCode":{"description":"Generated accounting document code.","type":"string"},"paperNumber":{"description":"Paper or external reference number.","type":"string"},"salesPersonId":{"format":"int32","description":"Sales person id.","type":"integer"},"documentDate":{"format":"date-time","description":"Accounting document date.","type":"string"},"paidAmount":{"format":"double","description":"Amount paid. Required.","minimum":0,"exclusiveMinimum":true,"type":"number"},"relatedSalesOrderCode":{"description":"Sales-order code the receipt is posted against. Required.","type":"string"},"cashAccountId":{"format":"int32","description":"Cash account id receiving the payment. Required.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"notes":{"description":"Additional notes.","type":"string"}}},"SalesOrderTagsUpdateRequest":{"description":"Request to replace the tags on a sales order. Send an empty list to clear all tags.","type":"object","properties":{"tags":{"description":"The full set of tags to assign to the order (replaces any existing tags).","type":"array","items":{"type":"string"}}}},"UpdateSalesOrderStatusRequest":{"description":"Request to update a sales-order status.","required":["status"],"type":"object","properties":{"status":{"description":"Target status.","enum":["Cancelled","Confirmed","OutForDelivery"],"type":"string"}}},"SalesPersonResponse":{"description":"Response describing a sales person.","type":"object","properties":{"id":{"format":"int32","description":"Identifier.","type":"integer"},"code":{"description":"Unique code.","type":"string"},"name":{"description":"Display name.","type":"string"},"classificationCode":{"format":"int32","description":"Classification/category code.","type":"integer"},"creditLimit":{"format":"double","description":"Maximum credit limit the sales person can authorize.","type":"number"},"externalId":{"description":"External system identifier.","type":"string"}}},"SalesPersonUpsertRequest":{"description":"Request to create or update a sales person.","required":["name"],"type":"object","properties":{"code":{"description":"Unique code.","type":"string"},"name":{"description":"Display name.","maxLength":100,"minLength":0,"type":"string"},"classificationCode":{"format":"int32","description":"Classification/category code.","type":"integer"},"creditLimit":{"format":"double","description":"Maximum credit limit the sales person can authorize.","type":"number"},"externalId":{"description":"External system identifier.","type":"string"}}},"GetSalesPersonsQuery":{"description":"Query parameters for listing sales persons.","required":[],"type":"object","properties":{"code":{"description":"CONTAINS filter on code.","type":"string"},"externalId":{"description":"External id equality filter.","type":"string"},"name":{"description":"CONTAINS filter on name.","type":"string"},"updateDate":{"format":"date-time","description":"Returns sales persons created or updated after this date.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[SalesPersonResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/SalesPersonResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"SalesReturnResponse":{"description":"Response describing a sales return.","type":"object","properties":{"id":{"format":"int32","description":"Sales-return identifier.","type":"integer"},"documentCode":{"description":"Document code (e.g. \"SR-2026-00001\").","type":"string"},"orderStatus":{"description":"Lifecycle status.","enum":["Cancelled","Confirmed","Pending","Processing","OutForDelivery","Shipped","Returned"],"type":"string"},"documentType":{"description":"Document type. Always {Edara.API.DTOs.Common.Enums.DocumentType.SR}.","enum":["RS","RR","RT","IO","IR","IT","TR","CI","CO","JE","SI","PI","CN","DN","NR","NP","SO","SR","RecSO","PO","PR","OB","RMA"],"type":"string"},"paperNumber":{"description":"Paper / reference number.","type":"string"},"runSheetId":{"description":"Run-sheet identifier.","type":"string"},"customer":{"$ref":"#/definitions/CustomerReference","description":"Customer reference."},"salesPerson":{"$ref":"#/definitions/SalesPersonReference","description":"Sales person reference."},"warehouse":{"$ref":"#/definitions/WarehouseReference","description":"Receiving warehouse."},"salesStore":{"$ref":"#/definitions/SalesStoreReference","description":"Sales store / POS location."},"shippmentCost":{"format":"double","description":"Shipping cost reimbursed.","type":"number"},"documentDate":{"format":"date-time","description":"Document date.","type":"string"},"shippingDate":{"format":"date-time","description":"Expected shipping date.","type":"string"},"grossTotal":{"format":"double","description":"Gross total, before discounts and taxes.","type":"number"},"subTotal":{"format":"double","description":"Sub-total after item discounts, before order discount and taxes.","type":"number"},"netTotal":{"format":"double","description":"Net total after discounts and taxes.","type":"number"},"totalItemsDiscounts":{"format":"double","description":"Sum of item-level discounts.","type":"number"},"discount":{"format":"double","description":"Order-level discount amount.","type":"number"},"discountRate":{"format":"double","description":"Order-level discount percentage.","type":"number"},"taxable":{"description":"Whether tax was applied.","type":"boolean"},"applyTaxAfterDiscount":{"description":"Whether tax was calculated on the discounted amount.","type":"boolean"},"tax":{"format":"double","description":"Total tax amount.","type":"number"},"cashAmount":{"format":"double","description":"Cash amount returned.","type":"number"},"onAccountAmount":{"format":"double","description":"Amount credited to the customer account.","type":"number"},"cashPaid":{"format":"double","description":"Actual cash paid back.","type":"number"},"currency":{"$ref":"#/definitions/CurrencyReference","description":"Settlement currency."},"exchangeRate":{"format":"double","description":"Exchange rate to system currency.","type":"number"},"channel":{"description":"Sales channel.","type":"string"},"notes":{"description":"Free-text notes.","type":"string"},"externalId":{"description":"External system identifier.","type":"string"},"relatedWorkOrderCode":{"description":"Related issue-offering work-order code.","type":"string"},"relatedWorkOrderValue":{"format":"double","description":"Value on the related issue-offering work order.","type":"number"},"tags":{"description":"Tags.","type":"array","items":{"type":"string"}},"relatedSalesReturnCodes":{"description":"Related sales-return codes.","type":"array","items":{"type":"string"}},"relatedSalesOrderCodes":{"description":"Related sales-order codes.","type":"array","items":{"type":"string"}},"paymentInformation":{"description":"Payment breakdown keyed by method.","type":"object","additionalProperties":{"format":"double","type":"number"}},"salesOrderDetails":{"description":"Return lines.","type":"array","items":{"$ref":"#/definitions/SalesReturnItemResponse"}},"salesOrderInstallments":{"description":"Installments.","type":"array","items":{"$ref":"#/definitions/SalesReturnInstallmentResponse"}},"documentNumber":{"description":"Sequential document number within the SR series.","type":"string"},"fulfillmentDate":{"format":"date-time","description":"Fulfillment date.","type":"string"},"deviceSerial":{"description":"POS device serial.","type":"string"},"addressId":{"format":"int32","description":"Customer address id.","type":"integer"},"addressDescription":{"description":"Free-text delivery address description.","type":"string"},"paymentStatus":{"description":"Payment status.","enum":["Unpaid","Partially Paid","Paid"],"type":"string"},"otherCreditAmount":{"format":"double","description":"Amount settled via other credit instruments.","type":"number"},"isApproved":{"description":"Whether the return has been approved.","type":"boolean"},"isIssued":{"description":"Whether the return has been issued (stock received).","type":"boolean"},"requireAutoWorkorder":{"description":"Whether an auto-generated receiving work order is required.","type":"boolean"}}},"SalesReturnItemResponse":{"description":"Response describing a sales-return line item.","type":"object","properties":{"id":{"format":"int32","description":"Line identifier.","type":"integer"},"quantity":{"format":"double","description":"Quantity returned.","type":"number"},"issuedQuantity":{"format":"double","description":"Quantity already received back.","type":"number"},"unitPrice":{"format":"double","description":"Unit price (pre-tax, pre-discount).","type":"number"},"price":{"format":"double","description":"Line price as charged on the original sale (post-discount, pre-tax).","type":"number"},"taxRate":{"format":"double","description":"Tax rate from the original sale.","type":"number"},"tax":{"$ref":"#/definitions/TaxReference","description":"Tax applied to the line."},"itemDiscount":{"format":"double","description":"Item discount value.","type":"number"},"itemDiscountType":{"description":"Item discount type (value or percentage).","enum":["Value","Percentage"],"type":"string"},"warehouse":{"$ref":"#/definitions/WarehouseReference","description":"Receiving warehouse."},"bundleId":{"format":"int32","description":"Bundle id, when applicable.","type":"integer"},"stockItem":{"$ref":"#/definitions/StockItemReference","description":"Returned stock item."},"unitOfMeasure":{"$ref":"#/definitions/UnitOfMeasureReference","description":"Unit of measure."},"batchNumber":{"description":"Batch number.","type":"string"},"expiryDate":{"format":"date-time","description":"Batch expiry date.","type":"string"},"comments":{"description":"Free-text line comments.","type":"string"},"returnedQuantity":{"format":"double","description":"Quantity previously returned against the original sale.","type":"number"},"bundleQuantity":{"format":"double","description":"Bundle component quantity, when applicable.","type":"number"},"relatedSerials":{"description":"Returned serial numbers, for serialized items.","type":"array","items":{"type":"string"}}}},"SalesReturnInstallmentResponse":{"description":"Response describing a sales-return installment.","type":"object","properties":{"amount":{"format":"double","description":"Installment amount.","type":"number"},"daysLimit":{"format":"int32","description":"Days from document date until due.","type":"integer"},"dueDate":{"format":"date-time","description":"Due date.","type":"string"},"account":{"$ref":"#/definitions/AccountReference","description":"Account collecting or paying the installment."},"paymentType":{"description":"Payment method.","enum":["Cash","CashOnDelivery","OnAccount"],"type":"string"}}},"CreateSalesReturnRequest":{"description":"Request to create a sales return by referencing an existing sales order or issue\r\noffering. Fields the referenced document already carries (customer, salesperson,\r\ntaxable, currency, line tax, unit of measure, batch number) are inherited, not\r\nsupplied here.","required":["warehouseId","sourceDocumentCode","documentDate"],"type":"object","properties":{"warehouseId":{"format":"int32","description":"Receiving warehouse id. Required.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"sourceDocumentCode":{"description":"A Sales Order code (\"SO-...\") or Issue Offering code (\"IO-...\"). Required.","type":"string"},"documentDate":{"format":"date-time","description":"Document date (ISO 8601). Required.","type":"string"},"notes":{"description":"Free-text notes.","type":"string"},"cashAmount":{"format":"double","description":"Cash amount returned to the customer.","type":"number"},"cashAccountId":{"format":"int32","description":"Cash/bank account id. Required only when the calling user's permissions require an\r\nautomatic cash-out and {Edara.API.DTOs.Sales.SalesReturns.Requests.CreateSalesReturnRequest.CashAmount} is greater than zero.","type":"integer"},"exchangeRate":{"format":"double","description":"Exchange rate to system currency. Omitted means the referenced document's own\r\nexchange rate.","minimum":0,"exclusiveMinimum":true,"type":"number"},"returnDiscount":{"format":"double","description":"Order-level discount amount.","minimum":0,"exclusiveMinimum":false,"type":"number"},"sourceDocumentDetails":{"description":"Lines to return. Omitted entirely means every returnable item on the referenced\r\ndocument.","type":"array","items":{"$ref":"#/definitions/CreateSalesReturnDetailRequest"}}}},"CreateSalesReturnDetailRequest":{"description":"One line of a sales return, identified by the exact line it returns against on the\r\nreferenced sales order or issue offering.","required":[],"type":"object","properties":{"sourceSalesOrderDetailId":{"format":"int32","description":"Detail id on the referenced sales order. At least one of this or\r\n{Edara.API.DTOs.Sales.SalesReturns.Requests.CreateSalesReturnDetailRequest.SourceWorkOrderDetailId} is required; supplying both is validated against\r\nthe resolved line. Alone, it must resolve to a service item.","type":"integer"},"sourceWorkOrderDetailId":{"format":"int32","description":"Detail id on the referenced issue offering. At least one of this or\r\n{Edara.API.DTOs.Sales.SalesReturns.Requests.CreateSalesReturnDetailRequest.SourceSalesOrderDetailId} is required; supplying both is validated against\r\nthe resolved line.","type":"integer"},"quantity":{"format":"double","description":"Quantity to return. Omitted means the line's full remaining returnable quantity.","minimum":0,"exclusiveMinimum":true,"type":"number"},"price":{"format":"double","description":"Line price. Omitted means the referenced document's own price for this line.","minimum":0,"exclusiveMinimum":false,"type":"number"}}},"ReturnableSalesReturnResponse":{"description":"The computed return proposal for an order: everything a caller needs to build a\r\nPOST /v3/sales-returns request for a full or partial return.","type":"object","properties":{"customer":{"$ref":"#/definitions/CustomerReference","description":"Customer on the original order, locked for the return."},"salesPerson":{"$ref":"#/definitions/SalesPersonReference","description":"Salesperson on the original order, when one is set."},"currency":{"$ref":"#/definitions/CurrencyReference","description":"Currency the original order was placed in. The system currency when the order didn't\r\nset one explicitly."},"exchangeRate":{"format":"double","description":"Exchange rate to system currency. Needed to submit POST /v3/sales-returns for a\r\nnon-system-currency order.","type":"number"},"grossTotal":{"format":"double","description":"Gross total, before discounts and taxes.","type":"number"},"subTotal":{"format":"double","description":"Sub-total after item discounts, before taxes.","type":"number"},"netTotal":{"format":"double","description":"Net total after discounts and taxes.","type":"number"},"salesReturnDiscounts":{"format":"double","description":"Sum of item-level discounts.","type":"number"},"taxable":{"description":"Whether tax applies to this return.","type":"boolean"},"applyTaxAfterDiscount":{"description":"Whether tax was calculated on the discounted amount.","type":"boolean"},"tax":{"format":"double","description":"Total tax amount.","type":"number"},"cashAmount":{"format":"double","description":"Cash amount the refund defaults to.","type":"number"},"onAccountAmount":{"format":"double","description":"Amount the refund defaults to crediting to the customer account.","type":"number"},"notesReceivableAmount":{"format":"double","description":"Amount the refund defaults to as a note receivable.","type":"number"},"lines":{"description":"Returnable lines.","type":"array","items":{"$ref":"#/definitions/ReturnableSalesReturnLineResponse"}}}},"ReturnableSalesReturnLineResponse":{"description":"A single returnable line within a {Edara.API.DTOs.Sales.SalesReturns.Responses.ReturnableSalesReturnResponse}.","type":"object","properties":{"sourceSalesOrderDetailId":{"format":"int32","description":"Detail id on the originating sales order, when one exists.","type":"integer"},"sourceWorkOrderDetailId":{"format":"int32","description":"Detail id on the originating work order (IO), when one exists.","type":"integer"},"relatedWorkOrderCode":{"description":"The IO this line was actually delivered on and must be submitted with this line when\r\ncreating a return. A single order can be fulfilled by more than one IO - null for pure\r\nservice lines, which have none.","type":"string"},"stockItem":{"$ref":"#/definitions/StockItemReference","description":"The returned stock item. Null for service lines."},"serviceItem":{"$ref":"#/definitions/ServiceItemReference","description":"The returned service item. Null for goods lines."},"quantity":{"format":"double","description":"Quantity still returnable (delivered minus already returned).","type":"number"},"unitOfMeasure":{"$ref":"#/definitions/UnitOfMeasureReference","description":"Unit of measure the returnable quantity is expressed in."},"unitPrice":{"format":"double","description":"Unit price before discount/tax, as originally sold.","type":"number"},"price":{"format":"double","description":"Unit price actually used for {Edara.API.DTOs.Sales.SalesReturns.Responses.ReturnableSalesReturnLineResponse.Total} - tax-exclusive, in settlement currency.","type":"number"},"taxRate":{"format":"double","description":"Tax rate from the original sale.","type":"number"},"unitDiscount":{"format":"double","description":"Discount per unit.","type":"number"},"total":{"format":"double","description":"Quantity × {Edara.API.DTOs.Sales.SalesReturns.Responses.ReturnableSalesReturnLineResponse.Price}.","type":"number"},"discount":{"format":"double","description":"Quantity × {Edara.API.DTOs.Sales.SalesReturns.Responses.ReturnableSalesReturnLineResponse.UnitDiscount}.","type":"number"},"lineTax":{"format":"double","description":"Tax amount for this line.","type":"number"},"batchNumber":{"description":"Batch number, when batch tracking is in use.","type":"string"},"expiryDate":{"format":"date-time","description":"Batch expiry date.","type":"string"}}},"ServiceItemReference":{"description":"Lightweight reference to a service item.","type":"object","properties":{"id":{"format":"int32","description":"Service-item identifier.","type":"integer"},"code":{"description":"Service-item code.","type":"string"},"description":{"description":"Service-item description.","type":"string"}}},"SalesStoreResponse":{"description":"Response describing a sales store.","type":"object","properties":{"id":{"format":"int32","description":"Sales-store identifier.","type":"integer"},"code":{"description":"Sales-store code.","type":"string"},"description":{"description":"Sales-store description.","type":"string"},"defaultCustomer":{"$ref":"#/definitions/CustomerReference","description":"Optional default customer reference."},"defaultCostCenter":{"$ref":"#/definitions/CostCenterReference","description":"Optional default cost-center reference."},"isActive":{"description":"Whether the sales store is active.","type":"boolean"},"tags":{"description":"Optional tags.","type":"array","items":{"type":"string"}}}},"GetSalesStoresQuery":{"description":"Query parameters for listing sales stores.","required":[],"type":"object","properties":{"updateDate":{"format":"date-time","description":"Returns records created or updated after the specified date.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[SalesStoreResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/SalesStoreResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"SalesStoreUpsertRequest":{"description":"Request to create or update a sales store.","required":["code","description","description"],"type":"object","properties":{"code":{"description":"Sales-store code.","maxLength":50,"minLength":0,"type":"string"},"description":{"description":"Sales-store description.","maxLength":50,"minLength":0,"type":"string"},"defaultCustomerId":{"format":"int32","description":"Optional default customer id.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"defaultCostCenterId":{"format":"int32","description":"Optional default cost-center id.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"tags":{"description":"Optional tags.","type":"array","items":{"type":"string"}}}},"ServiceItemResponse":{"description":"Response describing a service item.","type":"object","properties":{"id":{"format":"int32","description":"Service-item identifier.","type":"integer"},"code":{"description":"Unique business code.","type":"string"},"description":{"description":"Display description.","type":"string"},"price":{"format":"double","description":"Default selling price.","type":"number"},"tax":{"$ref":"#/definitions/TaxReference","description":"Sales/purchase tax reference."},"taxRate":{"format":"double","description":"Effective tax rate percentage.","type":"number"},"withholdingTax":{"$ref":"#/definitions/TaxReference","description":"Withholding tax reference."},"cost":{"format":"double","description":"Service cost, used in margin calculations.","type":"number"},"isShippingService":{"description":"Whether the service item is treated as a shipping/delivery line.","type":"boolean"},"externalId":{"description":"External system identifier.","type":"string"}}},"ServiceItemUpsertRequest":{"description":"Request to create or update a service item.","required":["description"],"type":"object","properties":{"code":{"description":"Unique business code.","maxLength":128,"minLength":0,"type":"string"},"description":{"description":"Display description.","maxLength":255,"minLength":0,"type":"string"},"price":{"format":"double","description":"Default selling price.","type":"number"},"taxId":{"format":"int32","description":"Sales/purchase tax id.","type":"integer"},"withholdingTaxId":{"format":"int32","description":"Withholding tax id.","type":"integer"},"cost":{"format":"double","description":"Service cost, used in margin calculations.","type":"number"},"isShippingService":{"description":"Whether the service item is treated as a shipping/delivery line.","type":"boolean"},"externalId":{"description":"External system identifier.","maxLength":128,"minLength":0,"type":"string"}}},"GetServiceItemsQuery":{"description":"Query parameters for listing service items.","required":[],"type":"object","properties":{"code":{"description":"CONTAINS filter on code.","type":"string"},"name":{"description":"CONTAINS filter on description.","type":"string"},"externalId":{"description":"External id equality filter.","type":"string"},"search":{"description":"CONTAINS filter across code or description.","type":"string"},"updateDate":{"format":"date-time","description":"Returns service items inserted or updated strictly after this value.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[ServiceItemResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/ServiceItemResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"GetSettingsQuery":{"description":"Query parameters for listing settings.","required":[],"type":"object","properties":{"module":{"description":"Optional module filter.","type":"string"},"key":{"description":"Optional key filter.","type":"string"},"updateDate":{"format":"date-time","description":"Optional updated-after filter.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[SettingResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/SettingResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"SettingResponse":{"description":"Response describing a system setting.","type":"object","properties":{"id":{"format":"int32","description":"The setting identifier.","type":"integer"},"module":{"description":"The module name.","type":"string"},"key":{"description":"The setting key.","type":"string"},"value":{"description":"The current setting value.","type":"string"},"exceptionUsers":{"description":"Exception user emails associated with this setting, when applicable.","type":"array","items":{"type":"string"}}}},"UpdateModuleActivationRequest":{"description":"Request to change a module activation state.","required":["moduleName"],"type":"object","properties":{"moduleName":{"description":"The target module name.","type":"string"},"status":{"description":"The desired activation status.","enum":["Inactive","Active","Inprogress"],"type":"string"},"reports":{"description":"Reports associated with the module when activated.","type":"array","items":{"$ref":"#/definitions/UpdateModuleActivationReportRequest"}}}},"UpdateModuleActivationReportRequest":{"description":"Request describing a report registered during module activation.","required":["name","url"],"type":"object","properties":{"name":{"description":"The report name.","type":"string"},"url":{"description":"The report URL.","type":"string"}}},"ModuleActivationResponse":{"description":"Response describing the outcome of a module activation.","type":"object","properties":{"moduleName":{"description":"The affected module name.","type":"string"},"status":{"description":"The resulting status.","enum":["Inactive","Active","Inprogress"],"type":"string"},"succeeded":{"description":"Whether the update completed successfully.","type":"boolean"}}},"GetStockItemsQuery":{"description":"Query parameters for listing stock items.","required":[],"type":"object","properties":{"ids":{"description":"Optional stock-item identifier filter.","minimum":0,"exclusiveMinimum":true,"type":"array","items":{"format":"int32","type":"integer"}},"codes":{"description":"Optional codes filter.","type":"array","items":{"type":"string"}},"partNumbers":{"description":"Optional part-numbers filter.","type":"array","items":{"type":"string"}},"externalIds":{"description":"Optional external-ids filter.","type":"array","items":{"type":"string"}},"description":{"description":"Optional description contains filter.","type":"string"},"code":{"description":"Optional exact-code filter.","type":"string"},"sku":{"description":"Optional SKU filter.","type":"string"},"partNumber":{"description":"Optional part-number filter.","type":"string"},"externalId":{"description":"Optional exact external-id filter.","type":"string"},"classificationId":{"format":"int32","description":"Optional classification identifier filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"updateDate":{"format":"date-time","description":"Updated-after filter.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[StockItemResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/StockItemResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"StockItemResponse":{"description":"Response describing a stock item.","type":"object","properties":{"id":{"format":"int32","description":"Identifier.","type":"integer"},"code":{"description":"Code.","type":"string"},"description":{"description":"Description.","type":"string"},"otherLanguageDescription":{"description":"Alternate-language description.","type":"string"},"sku":{"description":"SKU.","type":"string"},"partNumber":{"description":"Part number.","type":"string"},"externalId":{"description":"External identifier.","type":"string"},"classification":{"$ref":"#/definitions/ClassificationReference","description":"Classification."},"brand":{"$ref":"#/definitions/BrandReference","description":"Brand."},"unitOfMeasureChainId":{"format":"int32","description":"Unit-of-measure chain identifier.","type":"integer"},"unitOfMeasure":{"format":"int32","description":"Unit-of-measure identifier.","type":"integer"},"singleUomId":{"format":"int32","description":"Single UOM identifier.","type":"integer"},"primaryUomId":{"format":"int32","description":"Primary unit-of-measure identifier resolved from the chain.","type":"integer"},"isGroupingItem":{"description":"Whether the item is a grouping item.","type":"boolean"},"tags":{"description":"Item tags.","type":"array","items":{"type":"string"}},"dynamicPropertiesInfo":{"description":"Dynamic-property assignments.","type":"array","items":{"$ref":"#/definitions/DynamicPropertyInfo"}},"childItems":{"description":"Child items.","type":"array","items":{"$ref":"#/definitions/StockItemChildResponse"}},"stockItemUnitOfMeasures":{"description":"UOM chain.","type":"array","items":{"$ref":"#/definitions/StockItemUnitOfMeasureResponse"}},"salesPrice":{"format":"double","description":"Sales price.","type":"number"},"purchasePrice":{"format":"double","description":"Purchase price.","type":"number"},"dealerPrice":{"format":"double","description":"Dealer price.","type":"number"},"superDealerPrice":{"format":"double","description":"Super-dealer price.","type":"number"},"minimumPrice":{"format":"double","description":"Minimum price.","type":"number"},"referencePrice":{"format":"double","description":"Reference price.","type":"number"},"salesPriceDiscount":{"format":"double","description":"The discount value applied to the sales price (interpreted per {Edara.API.DTOs.Warehouse.StockItems.Responses.StockItemResponse.SalesPriceDiscountType}).","type":"number"},"salesPriceDiscountType":{"format":"int32","description":"The discount type for the sales price (0 = amount, 1 = percentage).","type":"integer"},"salesPriceDiscountIsLimited":{"description":"Whether the sales-price discount is bounded by the date range below.","type":"boolean"},"salesPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the sales-price discount window.","type":"string"},"salesPriceDiscountDateTo":{"format":"date-time","description":"The end date of the sales-price discount window.","type":"string"},"dealerPriceDiscount":{"format":"double","description":"The discount value applied to the dealer price.","type":"number"},"dealerPriceDiscountType":{"format":"int32","description":"The discount type for the dealer price (0 = amount, 1 = percentage).","type":"integer"},"dealerPriceDiscountIsLimited":{"description":"Whether the dealer-price discount is bounded by the date range below.","type":"boolean"},"dealerPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the dealer-price discount window.","type":"string"},"dealerPriceDiscountDateTo":{"format":"date-time","description":"The end date of the dealer-price discount window.","type":"string"},"superDealerPriceDiscount":{"format":"double","description":"The discount value applied to the super-dealer price.","type":"number"},"superDealerPriceDiscountType":{"format":"int32","description":"The discount type for the super-dealer price (0 = amount, 1 = percentage).","type":"integer"},"superDealerPriceDiscountIsLimited":{"description":"Whether the super-dealer-price discount is bounded by the date range below.","type":"boolean"},"superDealerPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the super-dealer-price discount window.","type":"string"},"superDealerPriceDiscountDateTo":{"format":"date-time","description":"The end date of the super-dealer-price discount window.","type":"string"},"averageCost":{"format":"double","description":"Average cost.","type":"number"},"lastCost":{"format":"double","description":"Last cost.","type":"number"},"fifo":{"format":"double","description":"FIFO value.","type":"number"},"lifo":{"format":"double","description":"LIFO value.","type":"number"},"openingAverageCost":{"format":"double","description":"Opening average cost.","type":"number"},"openingFifo":{"format":"double","description":"Opening FIFO valuation.","type":"number"},"openingLifo":{"format":"double","description":"Opening LIFO valuation.","type":"number"},"openingLastCost":{"format":"double","description":"Opening last cost.","type":"number"},"tax":{"$ref":"#/definitions/TaxReference","description":"Tax."},"taxRate":{"format":"double","description":"Tax rate.","type":"number"},"withholdingTax":{"$ref":"#/definitions/TaxReference","description":"Withholding tax."},"withholdingTaxRate":{"format":"double","description":"Withholding tax rate.","type":"number"},"globalOpeningBalance":{"format":"double","description":"Global opening balance.","type":"number"},"globalReorderingPoint":{"format":"double","description":"Global reordering point.","type":"number"},"globalMinimumPoint":{"format":"double","description":"Global minimum point.","type":"number"},"globalMaximumPoint":{"format":"double","description":"Global maximum point.","type":"number"},"unitPrice":{"format":"double","description":"Unit price.","type":"number"},"length":{"format":"double","description":"Length.","type":"number"},"width":{"format":"double","description":"Width.","type":"number"},"height":{"format":"double","description":"Height.","type":"number"},"weight":{"format":"double","description":"Weight.","type":"number"},"warranty":{"format":"double","description":"Warranty.","type":"number"},"note":{"description":"Note.","type":"string"},"itemLocation":{"description":"Item location.","type":"string"},"datasheet":{"description":"Datasheet.","type":"string"},"imageUrl":{"description":"Image URL.","type":"string"},"parentItemId":{"format":"int32","description":"Parent item identifier.","type":"integer"},"enforceSerialEntry":{"description":"Whether serial entry is enforced.","type":"boolean"},"enforceBatchNumberDateEntry":{"description":"Whether batch-number date entry is enforced.","type":"boolean"},"enforceExpirationDateEntry":{"description":"Whether expiry-date entry is enforced.","type":"boolean"},"allowSerialDuplication":{"description":"Whether serial duplication is allowed.","type":"boolean"},"autofillBatchNumber":{"description":"Whether batch numbers are autofilled.","type":"boolean"},"allowForSMS":{"description":"Whether SMS is allowed.","type":"boolean"}}},"ClassificationReference":{"description":"Lightweight stock-item classification reference (id + code + name).","type":"object","properties":{"id":{"format":"int32","description":"The classification id.","type":"integer"},"code":{"description":"The classification code.","type":"string"},"name":{"description":"The classification name.","type":"string"}}},"BrandReference":{"description":"Lightweight brand reference (id + name).","type":"object","properties":{"id":{"format":"int32","description":"The brand id.","type":"integer"},"name":{"description":"The brand name.","type":"string"}}},"DynamicPropertyInfo":{"description":"Dynamic-property value assignment for a grouping or child stock item.","type":"object","properties":{"dynamicPropertyId":{"format":"int32","description":"Dynamic-property identifier (e.g. \"Color\").","type":"integer"},"dynamicProperty":{"description":"Dynamic-property name; corrected from DB on write.","type":"string"},"dynamicValueId":{"format":"int32","description":"Dynamic-property value identifier (e.g. \"Red\").","type":"integer"},"dynamicValue":{"description":"Dynamic-property value text; corrected from DB on write.","type":"string"}}},"StockItemChildResponse":{"description":"Response describing a child stock item of a grouping item.","type":"object","properties":{"id":{"format":"int32","description":"Child identifier.","type":"integer"},"description":{"description":"Description.","type":"string"},"code":{"description":"Code.","type":"string"},"sku":{"description":"SKU.","type":"string"},"price":{"format":"double","description":"Displayed price.","type":"number"},"partNumber":{"description":"Part number.","type":"string"},"dynamicPropertiesInfo":{"description":"Dynamic-property assignments defining this variant.","type":"array","items":{"$ref":"#/definitions/DynamicPropertyInfo"}},"salesPriceDiscount":{"format":"double","description":"The discount value applied to the sales price (interpreted per {Edara.API.DTOs.Warehouse.StockItems.Responses.StockItemChildResponse.SalesPriceDiscountType}).","type":"number"},"salesPriceDiscountType":{"format":"int32","description":"The discount type for the sales price (0 = amount, 1 = percentage).","type":"integer"},"salesPriceDiscountIsLimited":{"description":"Whether the sales-price discount is bounded by the date range below.","type":"boolean"},"salesPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the sales-price discount window.","type":"string"},"salesPriceDiscountDateTo":{"format":"date-time","description":"The end date of the sales-price discount window.","type":"string"},"dealerPriceDiscount":{"format":"double","description":"The discount value applied to the dealer price.","type":"number"},"dealerPriceDiscountType":{"format":"int32","description":"The discount type for the dealer price (0 = amount, 1 = percentage).","type":"integer"},"dealerPriceDiscountIsLimited":{"description":"Whether the dealer-price discount is bounded by the date range below.","type":"boolean"},"dealerPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the dealer-price discount window.","type":"string"},"dealerPriceDiscountDateTo":{"format":"date-time","description":"The end date of the dealer-price discount window.","type":"string"},"superDealerPriceDiscount":{"format":"double","description":"The discount value applied to the super-dealer price.","type":"number"},"superDealerPriceDiscountType":{"format":"int32","description":"The discount type for the super-dealer price (0 = amount, 1 = percentage).","type":"integer"},"superDealerPriceDiscountIsLimited":{"description":"Whether the super-dealer-price discount is bounded by the date range below.","type":"boolean"},"superDealerPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the super-dealer-price discount window.","type":"string"},"superDealerPriceDiscountDateTo":{"format":"date-time","description":"The end date of the super-dealer-price discount window.","type":"string"}}},"StockItemUnitOfMeasureResponse":{"description":"Response describing a stock-item UOM entry.","type":"object","properties":{"id":{"format":"int32","description":"Identifier.","type":"integer"},"stockItemId":{"format":"int32","description":"Stock-item identifier.","type":"integer"},"unitOfMeasureId":{"format":"int32","description":"Unit-of-measure identifier.","type":"integer"},"uomName":{"description":"UOM name.","type":"string"},"code":{"description":"Code.","type":"string"},"uomPartNumber":{"description":"UOM part number.","type":"string"},"uomPrice":{"format":"double","description":"UOM price.","type":"number"},"uomDealerPrice":{"format":"double","description":"Dealer price.","type":"number"},"uomSuperDealerPrice":{"format":"double","description":"Super-dealer price.","type":"number"},"ratioToPrimary":{"format":"double","description":"Ratio to the primary UOM.","type":"number"},"isPrimary":{"description":"Whether this is the primary UOM.","type":"boolean"},"isDefault":{"description":"Whether this is the default UOM.","type":"boolean"},"isUsedInTransaction":{"description":"Whether the UOM is used in transactions.","type":"boolean"},"uomChainName":{"description":"Chain name.","type":"string"},"unitOfMeasureChainId":{"format":"int32","description":"Unit-of-measure chain identifier.","type":"integer"},"stockItemPartNumber":{"description":"Stock-item part number for this UOM.","type":"string"}}},"CreateStockItemRequest":{"description":"Request to create a stock item.","required":["description"],"type":"object","properties":{"code":{"description":"The stock-item code (unique per tenant).","type":"string"},"description":{"description":"The stock-item description. Required.","maxLength":500,"minLength":0,"type":"string"},"otherLanguageDescription":{"description":"The description in the secondary language (e.g. Arabic).","type":"string"},"sku":{"description":"The stock-keeping unit identifier (unique per tenant when supplied).","type":"string"},"partNumber":{"description":"The manufacturer or vendor part number.","type":"string"},"oeNumber":{"description":"The OEM (original equipment manufacturer) number.","type":"string"},"externalId":{"description":"An external identifier supplied by the caller for reconciliation.","type":"string"},"classificationId":{"format":"int32","description":"The id of the classification node this item belongs to.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"brandId":{"format":"int32","description":"The id of the brand.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"parentItemId":{"format":"int32","description":"The id of the parent item, when this item is a variant.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"isGroupingItem":{"description":"Whether this item is a grouping (parent) item with variants underneath.","type":"boolean"},"tags":{"description":"The tags to assign to the item.","type":"array","items":{"type":"string"}},"singleUomId":{"format":"int32","description":"The id of the single UOM when the item is not part of a UOM chain.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"unitOfMeasureChainId":{"format":"int32","description":"The id of the UOM chain the item uses.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"unitOfMeasure":{"format":"int32","description":"The id of the resolved unit of measure for this item.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"stockItemUnitOfMeasures":{"description":"Per-UOM pricing and identifiers when the item uses a UOM chain.","type":"array","items":{"$ref":"#/definitions/StockItemUnitOfMeasureRequest"}},"weight":{"format":"double","description":"The item weight.","type":"number"},"height":{"format":"double","description":"The item height.","type":"number"},"width":{"format":"double","description":"The item width.","type":"number"},"length":{"format":"double","description":"The item length.","type":"number"},"warranty":{"format":"double","description":"The warranty period (interpretation per tenant settings).","type":"number"},"validityPeriodInDays":{"format":"double","description":"The validity period in days after which the item is treated as expired.","type":"number"},"itemLocation":{"description":"The default storage location of the item within a warehouse.","maxLength":200,"minLength":0,"type":"string"},"imageUrl":{"description":"The URL to the item image.","maxLength":200,"minLength":0,"type":"string"},"note":{"description":"Free-form notes captured against the item.","maxLength":500,"minLength":0,"type":"string"},"datasheet":{"description":"The URL or text of the item datasheet.","type":"string"},"attachedDocument":{"description":"The URL of an attached document.","type":"string"},"salesPrice":{"format":"double","description":"The default sales price.","type":"number"},"purchasePrice":{"format":"double","description":"The default purchase price.","type":"number"},"dealerPrice":{"format":"double","description":"The dealer price.","type":"number"},"superDealerPrice":{"format":"double","description":"The super-dealer price.","type":"number"},"minimumPrice":{"format":"double","description":"The minimum allowed sales price.","type":"number"},"referencePrice":{"format":"double","description":"The reference price used in margin calculations.","type":"number"},"unitPrice":{"format":"double","description":"The unit price; used by some legacy callers.","type":"number"},"openingAverageCost":{"format":"double","description":"The opening average cost; the Insert SP copies this into the current average cost.","type":"number"},"openingFifo":{"format":"double","description":"The opening FIFO cost; the Insert SP copies this into the current FIFO valuation.","type":"number"},"openingLifo":{"format":"double","description":"The opening LIFO cost; the Insert SP copies this into the current LIFO valuation.","type":"number"},"openingLastCost":{"format":"double","description":"The opening last cost; the Insert SP copies this into the current last cost.","type":"number"},"averageCost":{"format":"double","description":"The current average cost.","type":"number"},"fifo":{"format":"double","description":"The current FIFO valuation.","type":"number"},"lifo":{"format":"double","description":"The current LIFO valuation.","type":"number"},"lastCost":{"format":"double","description":"The current last cost.","type":"number"},"globalReorderingPoint":{"format":"double","description":"The global reordering point across all warehouses.","type":"number"},"globalMinimumPoint":{"format":"double","description":"The global minimum stock point across all warehouses.","type":"number"},"globalMaximumPoint":{"format":"double","description":"The global maximum stock point across all warehouses.","type":"number"},"taxId":{"format":"int32","description":"The id of the default sales tax for this item.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"withholdingTaxId":{"format":"int32","description":"The id of the withholding tax for this item, when applicable.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"eInvoiceCode":{"description":"The e-invoice item code (used by Egypt/KSA e-invoicing).","maxLength":50,"minLength":0,"type":"string"},"eInvoiceCodeType":{"description":"The e-invoice code type (e.g. GS1, EGS).","maxLength":50,"minLength":0,"type":"string"},"enforceSerialEntry":{"description":"Whether issuing this item must capture serial numbers.","type":"boolean"},"enforceBatchNumberDateEntry":{"description":"Whether issuing this item must capture a batch number and production date.","type":"boolean"},"enforceExpirationDateEntry":{"description":"Whether issuing this item must capture an expiration date.","type":"boolean"},"autofillBatchNumber":{"description":"Whether batch numbers should be auto-generated when not supplied.","type":"boolean"},"allowSerialDuplication":{"description":"Whether the same serial number may appear on more than one document.","type":"boolean"},"salesPriceDiscount":{"format":"double","description":"The discount value applied to the sales price (interpreted per {Edara.API.DTOs.Warehouse.StockItems.Requests.CreateStockItemRequest.SalesPriceDiscountType}).","type":"number"},"salesPriceDiscountType":{"format":"int32","description":"The discount type for the sales price (0 = amount, 1 = percentage).","type":"integer"},"salesPriceDiscountIsLimited":{"description":"Whether the sales-price discount is bounded by the date range below.","type":"boolean"},"salesPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the sales-price discount window.","type":"string"},"salesPriceDiscountDateTo":{"format":"date-time","description":"The end date of the sales-price discount window.","type":"string"},"dealerPriceDiscount":{"format":"double","description":"The discount value applied to the dealer price.","type":"number"},"dealerPriceDiscountType":{"format":"int32","description":"The discount type for the dealer price (0 = amount, 1 = percentage).","type":"integer"},"dealerPriceDiscountIsLimited":{"description":"Whether the dealer-price discount is bounded by the date range below.","type":"boolean"},"dealerPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the dealer-price discount window.","type":"string"},"dealerPriceDiscountDateTo":{"format":"date-time","description":"The end date of the dealer-price discount window.","type":"string"},"superDealerPriceDiscount":{"format":"double","description":"The discount value applied to the super-dealer price.","type":"number"},"superDealerPriceDiscountType":{"format":"int32","description":"The discount type for the super-dealer price (0 = amount, 1 = percentage).","type":"integer"},"superDealerPriceDiscountIsLimited":{"description":"Whether the super-dealer-price discount is bounded by the date range below.","type":"boolean"},"superDealerPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the super-dealer-price discount window.","type":"string"},"superDealerPriceDiscountDateTo":{"format":"date-time","description":"The end date of the super-dealer-price discount window.","type":"string"},"dynamicPropertiesInfo":{"description":"The dynamic-property values to assign to the item.","type":"array","items":{"$ref":"#/definitions/DynamicPropertyInfo"}},"childItems":{"description":"The child variants of this item when it is a grouping item.","type":"array","items":{"$ref":"#/definitions/StockItemChildRequest"}}}},"StockItemUnitOfMeasureRequest":{"description":"Request to create or update an entry in the stock-item unit-of-measure chain.","required":[],"type":"object","properties":{"unitOfMeasureId":{"format":"int32","description":"The id of the unit of measure.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"uomName":{"description":"The display name of the unit of measure as it appears for this stock item.","maxLength":200,"minLength":0,"type":"string"},"uomPartNumber":{"description":"The part number captured at this UOM level.","maxLength":200,"minLength":0,"type":"string"},"uomPrice":{"format":"double","description":"The sales price at this UOM level.","type":"number"},"uomDealerPrice":{"format":"double","description":"The dealer price at this UOM level.","type":"number"},"uomSuperDealerPrice":{"format":"double","description":"The super-dealer price at this UOM level.","type":"number"},"isPrimary":{"description":"Whether this UOM is the primary (smallest) unit of the chain. Exactly one entry must be primary.","type":"boolean"},"ratioToPrimary":{"format":"double","description":"The conversion ratio to the primary UOM. 1 for the primary; larger for parent units.","minimum":0,"exclusiveMinimum":true,"type":"number"}}},"StockItemChildRequest":{"description":"Request to create a child (variant) of a grouping stock item.","type":"object","properties":{"code":{"description":"Child code.","type":"string"},"sku":{"description":"Child SKU.","type":"string"},"price":{"format":"double","description":"Child price.","type":"number"},"partNumber":{"description":"Child part number.","type":"string"},"dynamicPropertiesInfo":{"description":"Dynamic-property value combination defining this variant.","type":"array","items":{"$ref":"#/definitions/DynamicPropertyInfo"}},"isCurrent":{"description":"Marks this child as the carry-over of the existing item when an Update transforms a simple item into a grouping item. Exactly one child must set this in the transform case; ignored otherwise.","type":"boolean"}}},"UpdateStockItemRequest":{"description":"Request to update a stock item.","required":["description"],"type":"object","properties":{"id":{"format":"int32","description":"Stock-item identifier. Optional on single-update; required on batch by-id update.","type":"integer"},"code":{"description":"The stock-item code (unique per tenant).","type":"string"},"description":{"description":"The stock-item description.","maxLength":500,"minLength":0,"type":"string"},"otherLanguageDescription":{"description":"The description in the secondary language (e.g. Arabic).","type":"string"},"sku":{"description":"The stock-keeping unit identifier (unique per tenant when supplied).","type":"string"},"partNumber":{"description":"The manufacturer or vendor part number.","type":"string"},"oeNumber":{"description":"The OEM (original equipment manufacturer) number.","type":"string"},"externalId":{"description":"An external identifier supplied by the caller for reconciliation.","type":"string"},"classificationId":{"format":"int32","description":"The id of the classification node this item belongs to.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"brandId":{"format":"int32","description":"The id of the brand.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"parentItemId":{"format":"int32","description":"The id of the parent item, when this item is a variant.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"isGroupingItem":{"description":"Whether this item is a grouping (parent) item with variants underneath.","type":"boolean"},"tags":{"description":"The tags to assign to the item (replaces any existing tags).","type":"array","items":{"type":"string"}},"singleUomId":{"format":"int32","description":"The id of the single UOM when the item is not part of a UOM chain.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"unitOfMeasureChainId":{"format":"int32","description":"The id of the UOM chain the item uses.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"unitOfMeasure":{"format":"int32","description":"The id of the resolved unit of measure for this item.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"stockItemUnitOfMeasures":{"description":"Per-UOM pricing and identifiers when the item uses a UOM chain.","type":"array","items":{"$ref":"#/definitions/StockItemUnitOfMeasureRequest"}},"weight":{"format":"double","description":"The item weight.","type":"number"},"height":{"format":"double","description":"The item height.","type":"number"},"width":{"format":"double","description":"The item width.","type":"number"},"length":{"format":"double","description":"The item length.","type":"number"},"warranty":{"format":"double","description":"The warranty period (interpretation per tenant settings).","type":"number"},"validityPeriodInDays":{"format":"double","description":"The validity period in days after which the item is treated as expired.","type":"number"},"itemLocation":{"description":"The default storage location of the item within a warehouse.","maxLength":200,"minLength":0,"type":"string"},"imageUrl":{"description":"The URL to the item image.","maxLength":200,"minLength":0,"type":"string"},"note":{"description":"Free-form notes captured against the item.","maxLength":500,"minLength":0,"type":"string"},"datasheet":{"description":"The URL or text of the item datasheet.","type":"string"},"attachedDocument":{"description":"The URL of an attached document.","type":"string"},"salesPrice":{"format":"double","description":"The default sales price.","type":"number"},"purchasePrice":{"format":"double","description":"The default purchase price.","type":"number"},"dealerPrice":{"format":"double","description":"The dealer price.","type":"number"},"superDealerPrice":{"format":"double","description":"The super-dealer price.","type":"number"},"minimumPrice":{"format":"double","description":"The minimum allowed sales price.","type":"number"},"referencePrice":{"format":"double","description":"The reference price used in margin calculations.","type":"number"},"unitPrice":{"format":"double","description":"The unit price; used by some legacy callers.","type":"number"},"openingAverageCost":{"format":"double","description":"The opening average cost.","type":"number"},"openingFifo":{"format":"double","description":"The opening FIFO cost.","type":"number"},"openingLifo":{"format":"double","description":"The opening LIFO cost.","type":"number"},"openingLastCost":{"format":"double","description":"The opening last cost.","type":"number"},"averageCost":{"format":"double","description":"The current average cost.","type":"number"},"fifo":{"format":"double","description":"The current FIFO valuation.","type":"number"},"lifo":{"format":"double","description":"The current LIFO valuation.","type":"number"},"lastCost":{"format":"double","description":"The current last cost.","type":"number"},"globalReorderingPoint":{"format":"double","description":"The global reordering point across all warehouses.","type":"number"},"globalMinimumPoint":{"format":"double","description":"The global minimum stock point across all warehouses.","type":"number"},"globalMaximumPoint":{"format":"double","description":"The global maximum stock point across all warehouses.","type":"number"},"taxId":{"format":"int32","description":"The id of the default sales tax for this item.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"withholdingTaxId":{"format":"int32","description":"The id of the withholding tax for this item, when applicable.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"eInvoiceCode":{"description":"The e-invoice item code (used by Egypt/KSA e-invoicing).","maxLength":50,"minLength":0,"type":"string"},"eInvoiceCodeType":{"description":"The e-invoice code type (e.g. GS1, EGS).","maxLength":50,"minLength":0,"type":"string"},"enforceSerialEntry":{"description":"Whether issuing this item must capture serial numbers.","type":"boolean"},"enforceBatchNumberDateEntry":{"description":"Whether issuing this item must capture a batch number and production date.","type":"boolean"},"enforceExpirationDateEntry":{"description":"Whether issuing this item must capture an expiration date.","type":"boolean"},"autofillBatchNumber":{"description":"Whether batch numbers should be auto-generated when not supplied.","type":"boolean"},"allowSerialDuplication":{"description":"Whether the same serial number may appear on more than one document.","type":"boolean"},"allowForSMS":{"description":"Whether the item is permitted on outbound SMS notifications. Update-only.","type":"boolean"},"salesPriceDiscount":{"format":"double","description":"The discount value applied to the sales price (interpreted per {Edara.API.DTOs.Warehouse.StockItems.Requests.UpdateStockItemRequest.SalesPriceDiscountType}).","type":"number"},"salesPriceDiscountType":{"format":"int32","description":"The discount type for the sales price (0 = amount, 1 = percentage).","type":"integer"},"salesPriceDiscountIsLimited":{"description":"Whether the sales-price discount is bounded by the date range below.","type":"boolean"},"salesPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the sales-price discount window.","type":"string"},"salesPriceDiscountDateTo":{"format":"date-time","description":"The end date of the sales-price discount window.","type":"string"},"dealerPriceDiscount":{"format":"double","description":"The discount value applied to the dealer price.","type":"number"},"dealerPriceDiscountType":{"format":"int32","description":"The discount type for the dealer price (0 = amount, 1 = percentage).","type":"integer"},"dealerPriceDiscountIsLimited":{"description":"Whether the dealer-price discount is bounded by the date range below.","type":"boolean"},"dealerPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the dealer-price discount window.","type":"string"},"dealerPriceDiscountDateTo":{"format":"date-time","description":"The end date of the dealer-price discount window.","type":"string"},"superDealerPriceDiscount":{"format":"double","description":"The discount value applied to the super-dealer price.","type":"number"},"superDealerPriceDiscountType":{"format":"int32","description":"The discount type for the super-dealer price (0 = amount, 1 = percentage).","type":"integer"},"superDealerPriceDiscountIsLimited":{"description":"Whether the super-dealer-price discount is bounded by the date range below.","type":"boolean"},"superDealerPriceDiscountDateFrom":{"format":"date-time","description":"The start date of the super-dealer-price discount window.","type":"string"},"superDealerPriceDiscountDateTo":{"format":"date-time","description":"The end date of the super-dealer-price discount window.","type":"string"},"dynamicPropertiesInfo":{"description":"The dynamic-property values to assign to the item.","type":"array","items":{"$ref":"#/definitions/DynamicPropertyInfo"}},"childItems":{"description":"The child variants of this item when it is a grouping item.","type":"array","items":{"$ref":"#/definitions/StockItemChildRequest"}}}},"GetStockItemWarehouseSummaryQuery":{"description":"Query parameters for the stock-item warehouse summary.","required":["dateFrom","dateTo"],"type":"object","properties":{"dateFrom":{"format":"date-time","description":"Start of the sales/sales-return summary period.","type":"string"},"dateTo":{"format":"date-time","description":"End of the sales/sales-return summary period.","type":"string"},"warehouseId":{"description":"Optional warehouse identifiers filter.","minimum":0,"exclusiveMinimum":true,"type":"array","items":{"format":"int32","type":"integer"}},"stockitemId":{"format":"int32","description":"Optional stock-item identifier filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"excludeOtherParty":{"description":"When true, excludes Issue/Receive Other Party transactions from the sales summary.","type":"boolean"},"offset":{"format":"int32","description":"Number of stock items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of stock items to return. Defaults to 1000, maximum 1000.","maximum":5000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Warehouse.StockItems.Requests.GetStockItemWarehouseSummaryQuery.DefaultOffset} when {Edara.API.DTOs.Warehouse.StockItems.Requests.GetStockItemWarehouseSummaryQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Warehouse.StockItems.Requests.GetStockItemWarehouseSummaryQuery.DefaultLimit} when {Edara.API.DTOs.Warehouse.StockItems.Requests.GetStockItemWarehouseSummaryQuery.Limit} is null or out of range.","type":"integer","readOnly":true}}},"PagedResult[StockItemWarehouseSummaryResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/StockItemWarehouseSummaryResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"StockItemWarehouseSummaryResponse":{"description":"Response describing a stock item's sales and stock position, broken down by warehouse.","type":"object","properties":{"stockitemId":{"format":"int32","description":"Stock item identifier.","type":"integer"},"description":{"description":"Description.","type":"string"},"partNumber":{"description":"Part number.","type":"string"},"sku":{"description":"SKU.","type":"string"},"warehouses":{"description":"Per-warehouse sales and stock position.","type":"array","items":{"$ref":"#/definitions/StockItemWarehouseSummaryWarehouseResponse"}}}},"StockItemWarehouseSummaryWarehouseResponse":{"description":"A single warehouse's sales and stock position for a stock item.","type":"object","properties":{"warehouseId":{"format":"int32","description":"Warehouse identifier.","type":"integer"},"description":{"description":"Warehouse description.","type":"string"},"sales":{"format":"double","description":"Sales quantity in Primary UOM for the requested period.","type":"number"},"salesReturn":{"format":"double","description":"Sales-return quantity in Primary UOM for the requested period.","type":"number"},"balance":{"format":"double","description":"Current on-hand stock balance.","type":"number"},"reserved":{"format":"double","description":"Reserved stock quantity.","type":"number"},"expectedReceive":{"format":"double","description":"Expected receiving quantity from open purchase orders.","type":"number"},"expectedTransfer":{"format":"double","description":"Expected incoming transfer quantity.","type":"number"}}},"StockItemBalanceResponse":{"description":"Response describing a stock-item balance row in a specific warehouse and (optional) batch.","type":"object","properties":{"warehouse":{"$ref":"#/definitions/WarehouseReference","description":"The warehouse the balance applies to."},"stockItem":{"$ref":"#/definitions/StockItemReference","description":"The stock item the balance applies to."},"balance":{"format":"double","description":"The available on-hand quantity in the primary UOM.","type":"number"},"reservedBalance":{"format":"double","description":"The quantity reserved against pending issues.","type":"number"},"batchNumber":{"description":"The batch number, when the stock item is batch-tracked.","type":"string"},"productionDate":{"format":"date-time","description":"The batch production date, when applicable.","type":"string"},"expirationDate":{"format":"date-time","description":"The batch expiration date, when applicable.","type":"string"}}},"SearchStockItemsQuery":{"description":"Query parameters for tokenized stock-item search.","required":["keywords"],"type":"object","properties":{"keywords":{"description":"Tokenized expression: `,` = OR, `+` = AND, `*` = all. Example: `screwdriver,hammer`.","type":"string"}}},"StockItemGlobalBalanceResponse":{"description":"Response describing a stock item's global balance summary across all warehouses.","type":"object","properties":{"stockItem":{"$ref":"#/definitions/StockItemReference","description":"The stock item the balance applies to."},"globalBalance":{"format":"double","description":"The total on-hand quantity across all warehouses, in the primary UOM.","type":"number"},"globalReservedBalance":{"format":"double","description":"The total reserved quantity across all warehouses, in the primary UOM.","type":"number"}}},"GetStockItemCostQuery":{"description":"Query parameters for stock-item cost lookup on a specific date.","required":["date"],"type":"object","properties":{"date":{"format":"date-time","description":"Cost date.","type":"string"}}},"StockItemExpectedReceiveResponse":{"description":"Response describing the quantity expected to be received for a stock item (open purchase orders / supplies).","type":"object","properties":{"stockItemId":{"format":"int32","description":"The stock-item id.","type":"integer"},"quantity":{"format":"double","description":"The total quantity expected to be received in the primary UOM.","type":"number"}}},"GetStockItemCostsByIdsQuery":{"description":"Query parameters for stock-item cost lookup by identifiers.","required":["date"],"type":"object","properties":{"ids":{"description":"Comma-separated stock-item identifiers (max 100).","type":"string"},"date":{"format":"date-time","description":"Cost evaluation date (on or before).","type":"string"}}},"StockItemCostResponse":{"description":"Response describing the current cost of a stock item.","type":"object","properties":{"stockItemId":{"format":"int32","description":"The stock-item id.","type":"integer"},"stockItemCode":{"description":"The stock-item code.","type":"string"},"stockItemSku":{"description":"The stock-item SKU.","type":"string"},"stockItemPartNumber":{"description":"The stock-item part number.","type":"string"},"cost":{"format":"double","description":"The unit cost in the system currency.","type":"number"}}},"GetStockItemCostsBySkusQuery":{"description":"Query parameters for stock-item cost lookup by SKUs.","required":["date"],"type":"object","properties":{"skus":{"description":"Comma-separated stock-item SKUs (max 200).","type":"string"},"date":{"format":"date-time","description":"Cost evaluation date (on or before).","type":"string"}}},"GetStockItemGlobalBalanceQuery":{"description":"Query parameters for global stock-item balance lookup by code or SKU.","required":[],"type":"object","properties":{"code":{"description":"Stock-item code. Mutually exclusive with {Edara.API.DTOs.Warehouse.StockItems.Requests.GetStockItemGlobalBalanceQuery.Sku}.","type":"string"},"sku":{"description":"Stock-item SKU. Mutually exclusive with {Edara.API.DTOs.Warehouse.StockItems.Requests.GetStockItemGlobalBalanceQuery.Code}.","type":"string"}}},"GetStockItemCostsByPartNumbersQuery":{"description":"Query parameters for stock-item cost lookup by part numbers.","required":["date"],"type":"object","properties":{"partNumbers":{"description":"Comma-separated stock-item part numbers (max 200).","type":"string"},"date":{"format":"date-time","description":"Cost evaluation date (on or before).","type":"string"}}},"GetStockItemSerialsQuery":{"description":"Query parameters for listing stock-item serials.","required":[],"type":"object","properties":{"stockItemId":{"format":"int32","description":"Optional stock-item filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"warehouseId":{"format":"int32","description":"Optional warehouse filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"StockItemSerialResponse":{"description":"Response describing a stock-item serial.","type":"object","properties":{"stockItemId":{"format":"int32","description":"Stock-item identifier.","type":"integer"},"warehouse":{"$ref":"#/definitions/WarehouseReference","description":"Warehouse."},"serialNumber":{"description":"Serial number.","type":"string"},"serialCount":{"format":"int32","description":"Serial count.","type":"integer"},"productionDate":{"format":"date-time","description":"Production date.","type":"string"},"expiryDate":{"format":"date-time","description":"Expiry date.","type":"string"}}},"GetStockItemBalancesQuery":{"description":"Query parameters for listing stock-item balances.","required":[],"type":"object","properties":{"stockItemId":{"format":"int32","description":"Optional stock-item identifier filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"warehouseId":{"format":"int32","description":"Optional warehouse identifier filter.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[StockItemBalanceResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/StockItemBalanceResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"StockItemBatchResult":{"description":"Response describing the result of a stock-item batch operation.","type":"object","properties":{"succeeded":{"description":"Successfully processed stock items.","type":"array","items":{"$ref":"#/definitions/StockItemResponse"}},"failed":{"description":"Failed items keyed by description with the failure reason.","type":"object","additionalProperties":{"type":"string"}}}},"UpdateStockItemExternalIdRequest":{"description":"Request to update a stock item's external id.","required":["id"],"type":"object","properties":{"id":{"format":"int32","description":"Stock-item identifier. Required.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"externalId":{"description":"New external identifier; null/empty to clear.","maxLength":128,"minLength":0,"type":"string"}}},"StockItemFiltersRequest":{"description":"Request to search stock items by filters.","required":[],"type":"object","properties":{"description":{"description":"Description text to match.","type":"string"},"sku":{"description":"SKU to match.","type":"string"},"partNumber":{"description":"Part number to match.","type":"string"},"ids":{"description":"Stock-item identifiers to resolve.","minimum":0,"exclusiveMinimum":true,"type":"array","items":{"format":"int32","type":"integer"}},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"StockItemIdsRequest":{"description":"Request carrying a list of stock-item identifiers.","required":[],"type":"object","properties":{"stockItemIds":{"description":"Stock-item identifiers to operate on.","minimum":0,"exclusiveMinimum":true,"type":"array","items":{"format":"int32","type":"integer"}}}},"StockItemImageUrlResponse":{"description":"Response pairing a stock-item identifier with its pre-signed image URL.","type":"object","properties":{"stockItemId":{"format":"int32","description":"Stock-item identifier.","type":"integer"},"imageUrl":{"description":"Pre-signed image URL, or null when no image exists.","type":"string"}}},"LinkStockItemToParentRequest":{"description":"Request to link a child stock item to a parent grouping item.","required":["childItemId","parentItemId","dynamicPropertiesValuesIds"],"type":"object","properties":{"childItemId":{"format":"int32","description":"Child stock-item identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"parentItemId":{"format":"int32","description":"Parent (grouping) stock-item identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"dynamicPropertiesValuesIds":{"description":"Comma-separated dynamic-property value identifiers (1-3 distinct positive integers) identifying the variant.","type":"string"}}},"SupplierResponse":{"description":"Response describing a supplier.","type":"object","properties":{"id":{"format":"int32","description":"Supplier identifier.","type":"integer"},"name":{"description":"Supplier name.","type":"string"},"mobile":{"description":"Supplier mobile number.","type":"string"},"email":{"description":"Supplier email address.","type":"string"},"taxRegisterationId":{"description":"Supplier tax registration id.","type":"string"},"relatedAccount":{"$ref":"#/definitions/AccountReference","description":"Related general-ledger account."}}},"SupplierUpdateRequest":{"description":"Request to update a supplier.","required":["name"],"type":"object","properties":{"name":{"description":"Supplier display name.","maxLength":100,"minLength":0,"type":"string"},"mobile":{"description":"Supplier mobile number.","type":"string"},"email":{"description":"Supplier email address.","type":"string"},"taxRegisterationId":{"description":"Supplier tax registration id.","type":"string"}}},"GetSuppliersQuery":{"description":"Query parameters for listing suppliers.","required":[],"type":"object","properties":{"name":{"description":"Supplier name filter.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[SupplierResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/SupplierResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"SupplierCreateRequest":{"description":"Request to create a supplier.","required":["name"],"type":"object","properties":{"name":{"description":"Supplier display name.","maxLength":100,"minLength":0,"type":"string"},"mobile":{"description":"Supplier mobile number.","type":"string"},"email":{"description":"Supplier email address.","type":"string"},"taxRegisterationId":{"description":"Supplier tax registration id.","type":"string"},"relatedAccountId":{"format":"int32","description":"Existing GL account to link. Mutually exclusive with {Edara.API.DTOs.Purchase.Suppliers.Requests.SupplierCreateRequest.RelatedAccountParentNodeId}.","type":"integer"},"relatedAccountParentNodeId":{"format":"int32","description":"Parent chart-of-accounts node under which to create a new related account. Mutually exclusive with {Edara.API.DTOs.Purchase.Suppliers.Requests.SupplierCreateRequest.RelatedAccountId}.","type":"integer"}}},"FindSuppliersQuery":{"description":"Query parameters for searching suppliers.","required":[],"type":"object","properties":{"name":{"description":"Supplier name filter.","type":"string"},"ids":{"description":"Supplier identifiers to match.","minimum":0,"exclusiveMinimum":true,"type":"array","items":{"format":"int32","type":"integer"}},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"GetSuppliesRequestsQuery":{"description":"Query parameters for listing supplies requests.","required":[],"type":"object","properties":{"code":{"description":"Exact document-code filter (case-insensitive).","type":"string"},"paperNumber":{"description":"Exact paper-number filter (case-insensitive).","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[SuppliesRequestResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/SuppliesRequestResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"SuppliesRequestResponse":{"description":"Response describing a supplies request (purchase requisition).","type":"object","properties":{"id":{"format":"int32","description":"System identifier.","type":"integer"},"code":{"description":"System-generated document code.","type":"string"},"paperNumber":{"description":"External paper or reference number.","type":"string"},"supplier":{"$ref":"#/definitions/SupplierReference","description":"The supplier the request is addressed to."},"warehouse":{"$ref":"#/definitions/WarehouseReference","description":"The destination warehouse for the requested goods."},"date":{"format":"date-time","description":"Document date.","type":"string"},"grossTotal":{"format":"double","description":"Sum of all line totals.","type":"number"},"currency":{"$ref":"#/definitions/CurrencyReference","description":"Currency used on the document."},"exchangeRate":{"format":"double","description":"Exchange rate to system currency at the time the document was saved.","type":"number"},"notes":{"description":"Free-text notes attached to the document.","type":"string"},"suppliesRequestDetails":{"description":"Line items on the supplies request.","type":"array","items":{"$ref":"#/definitions/SuppliesRequestItemResponse"}}}},"SuppliesRequestItemResponse":{"description":"Response describing a supplies-request line item.","type":"object","properties":{"id":{"format":"int32","description":"System identifier.","type":"integer"},"suppliesRequestHeaderId":{"format":"int32","description":"Identifier of the parent supplies request header.","type":"integer"},"quantity":{"format":"double","description":"Requested quantity.","type":"number"},"receivedQuantity":{"format":"double","description":"Quantity that has already been received against this line.","type":"number"},"price":{"format":"double","description":"Total price for the line.","type":"number"},"stockItem":{"$ref":"#/definitions/StockItemReference","description":"Stock item requested."},"comments":{"description":"Optional notes for the line item.","type":"string"}}},"SuppliesRequestUpsertRequest":{"description":"Request to create or update a supplies request.","required":["supplierId","warehouseId","date","currencyId","suppliesRequestDetails","suppliesRequestDetails"],"type":"object","properties":{"paperNumber":{"description":"Optional external paper/reference number.","maxLength":50,"minLength":0,"type":"string"},"supplierId":{"format":"int32","description":"Supplier identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"warehouseId":{"format":"int32","description":"Destination warehouse identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"date":{"format":"date-time","description":"Document date.","type":"string"},"currencyId":{"format":"int32","description":"Currency identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"exchangeRate":{"format":"double","description":"Exchange rate to system currency; defaults to the currency's rate, or 1 for system currency.","type":"number"},"notes":{"description":"Free-text notes.","type":"string"},"suppliesRequestDetails":{"description":"Request line items.","type":"array","items":{"$ref":"#/definitions/SuppliesRequestItemUpsertRequest"}}}},"SuppliesRequestItemUpsertRequest":{"description":"Request to create or update a supplies-request line item.","required":[],"type":"object","properties":{"id":{"format":"int32","description":"Existing line identifier; null/0 to add a new line.","type":"integer"},"quantity":{"format":"double","description":"Requested quantity. Must be greater than zero.","minimum":0,"exclusiveMinimum":true,"type":"number"},"price":{"format":"double","description":"Total line price. Must be greater than zero.","minimum":0,"exclusiveMinimum":true,"type":"number"},"stockItemId":{"format":"int32","description":"Stock-item identifier.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"comments":{"description":"Optional notes.","maxLength":100,"minLength":0,"type":"string"},"rowState":{"description":"On update, set to deleted to remove the line; ignored on create.","type":"string"}}},"GetTagsQuery":{"description":"Query parameters for listing tags.","required":[],"type":"object","properties":{"updateDate":{"format":"date-time","description":"Optional updated-after filter.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[TagResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/TagResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"TagResponse":{"description":"Response describing a tag.","type":"object","properties":{"id":{"format":"int32","description":"The tag identifier.","type":"integer"},"name":{"description":"The tag name.","type":"string"},"type":{"description":"The tag type.","type":"string"}}},"TaxResponse":{"description":"Response describing a tax.","type":"object","properties":{"id":{"format":"int32","description":"The tax identifier.","type":"integer"},"name":{"description":"The tax name.","type":"string"},"rate":{"format":"double","description":"The tax rate percentage.","type":"number"},"eInvoiceTaxTypeId":{"format":"int32","description":"The e-invoice tax type identifier.","type":"integer"},"scope":{"description":"The tax scope.","enum":["Any","StockItem","ServiceItem"],"type":"string"},"salesAccount":{"$ref":"#/definitions/AccountReference","description":"The sales account reference."},"salesWithholdingAccount":{"$ref":"#/definitions/AccountReference","description":"The sales withholding account reference."},"purchaseAccount":{"$ref":"#/definitions/AccountReference","description":"The purchase account reference."},"active":{"description":"Whether the tax is active.","type":"boolean"}}},"TaxUpsertRequest":{"description":"Request to create or update a tax.","required":["name"],"type":"object","properties":{"name":{"description":"The tax name.","type":"string"},"rate":{"format":"double","description":"The tax rate percentage.","maximum":100,"exclusiveMaximum":false,"minimum":0,"exclusiveMinimum":false,"type":"number"},"eInvoiceTaxTypeId":{"format":"int32","description":"The e-invoice tax type identifier.","minimum":1,"exclusiveMinimum":true,"type":"integer"},"scope":{"description":"The tax scope.","enum":["Any","StockItem","ServiceItem"],"type":"string"},"salesAccountId":{"format":"int32","description":"The sales account identifier.","minimum":1,"exclusiveMinimum":true,"type":"integer"},"salesWithholdingAccountId":{"format":"int32","description":"The sales withholding account identifier.","minimum":1,"exclusiveMinimum":true,"type":"integer"},"purchaseAccountId":{"format":"int32","description":"The purchase account identifier.","minimum":1,"exclusiveMinimum":true,"type":"integer"},"active":{"description":"Whether the tax is active.","type":"boolean"}}},"GetEInvoiceTaxTypesQuery":{"description":"Query parameters for listing e-invoice tax types.","required":["country"],"type":"object","properties":{"country":{"description":"The country filter.","type":"string"}}},"EInvoiceTaxTypeResponse":{"description":"Response describing an e-invoice tax type.","type":"object","properties":{"id":{"format":"int32","description":"The tax type identifier.","type":"integer"},"description":{"description":"The tax type description.","type":"string"},"type":{"description":"The tax type.","type":"string"},"code":{"description":"The external-system code.","type":"string"},"country":{"description":"The country the tax type applies to.","type":"string"}}},"GetTaxesQuery":{"description":"Query parameters for the taxes collection endpoint.","required":[],"type":"object","properties":{"name":{"description":"The tax name filter.","type":"string"},"rate":{"format":"double","description":"The tax rate filter.","minimum":0,"exclusiveMinimum":false,"type":"number"},"scope":{"description":"The scope filter.","enum":["Any","StockItem","ServiceItem"],"type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[TaxResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/TaxResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"TaxInvoiceReportResponse":{"description":"Response describing a tax invoice report.","type":"object","properties":{"columns":{"description":"The ordered column definitions.","type":"array","items":{"$ref":"#/definitions/TaxInvoiceReportColumnResponse"}},"rows":{"description":"The ordered report rows.","type":"array","items":{"$ref":"#/definitions/TaxInvoiceReportRowResponse"}}}},"TaxInvoiceReportColumnResponse":{"description":"Response describing a tax invoice report column.","type":"object","properties":{"name":{"description":"The column name.","type":"string"},"type":{"description":"The CLR type name for column values.","type":"string"}}},"TaxInvoiceReportRowResponse":{"description":"Response describing a tax invoice report row.","type":"object","properties":{"values":{"description":"The row values keyed by column name.","type":"object","additionalProperties":{"type":"object"}}}},"CreateTaxableSalesInvoiceRequest":{"description":"Request to create a taxable sales invoice from a sales order.","required":["salesOrderCode","invoiceNumber","date"],"type":"object","properties":{"salesOrderCode":{"description":"The source sales order code.","type":"string"},"invoiceNumber":{"format":"int32","description":"The taxable invoice number to assign.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"date":{"format":"date-time","description":"The taxable invoice date.","type":"string"}}},"TaxableSalesInvoiceResponse":{"description":"Response describing a created taxable sales invoice.","type":"object","properties":{"invoiceCode":{"description":"The created invoice code.","type":"string"}}},"TenantResponse":{"description":"Response describing a tenant.","type":"object","properties":{"tenantId":{"description":"The unique tenant identifier.","type":"string"},"tenantName":{"description":"The tenant display name.","type":"string"}}},"GetTenantsQuery":{"description":"Query parameters for listing tenants or looking up a single tenant by name.","required":[],"type":"object","properties":{"name":{"description":"Optional tenant name lookup value.","type":"string"},"hasSingleLookup":{"description":"Whether the query should resolve a single tenant instead of the full collection.","type":"boolean","readOnly":true}}},"CreateTenantRequest":{"description":"Request to create a tenant registration record.","required":["tenantId","tenantName"],"type":"object","properties":{"tenantId":{"description":"The unique tenant identifier.","maxLength":128,"minLength":0,"type":"string"},"tenantName":{"description":"The tenant display name.","maxLength":256,"minLength":0,"type":"string"}}},"ValidateTenantUserRequest":{"description":"Request to validate a tenant user and issue an access token.","required":["username","password","domain"],"type":"object","properties":{"username":{"description":"The user name or email address.","maxLength":256,"minLength":0,"type":"string"},"password":{"description":"The plain-text password.","type":"string"},"domain":{"description":"The tenant domain to authenticate against.","maxLength":256,"minLength":0,"type":"string"}}},"ValidateTenantUserResponse":{"description":"Response returned after validating a tenant user.","type":"object","properties":{"userId":{"format":"int32","description":"The internal user identifier.","type":"integer"},"username":{"description":"The resolved user name.","type":"string"},"email":{"description":"The resolved email address.","type":"string"},"domain":{"description":"The resolved tenant domain.","type":"string"},"pricingPlan":{"description":"The pricing plan assigned to the tenant.","type":"string"},"accessToken":{"description":"The generated bearer token.","type":"string"},"tenant":{"$ref":"#/definitions/TenantResponse","description":"The tenant snapshot associated with the validated user."}}},"UnitOfMeasureResponse":{"description":"Response describing a unit-of-measure chain.","type":"object","properties":{"id":{"format":"int32","description":"Chain identifier.","type":"integer"},"name":{"description":"Chain name.","type":"string"},"notes":{"description":"Chain notes.","type":"string"},"isFree":{"description":"Whether this is the tenant's auto-created free-UOM-mode chain.","type":"boolean"},"unitOfMeasureDetails":{"description":"Ordered chain details.","type":"array","items":{"$ref":"#/definitions/UnitOfMeasureDetailResponse"}}}},"UnitOfMeasureDetailResponse":{"description":"Response describing a row in a unit-of-measure chain.","type":"object","properties":{"id":{"format":"int32","description":"Detail identifier.","type":"integer"},"name":{"description":"Display name.","type":"string"},"code":{"description":"Unit code.","type":"string"},"isPrimary":{"description":"Whether this row is the primary unit.","type":"boolean"},"ratioToPrimary":{"format":"double","description":"Conversion ratio to the primary unit.","type":"number"},"displayOrder":{"format":"int32","description":"Display order.","type":"integer"},"notes":{"description":"Notes.","type":"string"}}},"StandardUnitOfMeasureResponse":{"description":"Response describing a standard unit of measure.","type":"object","properties":{"id":{"format":"int32","description":"Identifier.","type":"integer"},"code":{"description":"Unit code.","type":"string"},"description":{"description":"Description.","type":"string"},"otherLangDescription":{"description":"Other-language description.","type":"string"}}},"GetUnitsOfMeasuresQuery":{"description":"Query parameters for listing units of measure.","required":[],"type":"object","properties":{"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[UnitOfMeasureResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/UnitOfMeasureResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"CreateUnitOfMeasureRequest":{"description":"Request to create a unit-of-measure chain.","required":["name","unitOfMeasureDetails"],"type":"object","properties":{"name":{"description":"Display name (e.g. \"Piece-Box-Carton\").","maxLength":500,"minLength":0,"type":"string"},"notes":{"description":"Optional notes.","type":"string"},"unitOfMeasureDetails":{"description":"Ordered list of units in the chain; position assigns display order.","type":"array","items":{"$ref":"#/definitions/CreateUnitOfMeasureDetailRequest"}}}},"CreateUnitOfMeasureDetailRequest":{"description":"Request to create a unit within a unit-of-measure chain.","required":["name","code"],"type":"object","properties":{"name":{"description":"Display name (e.g. \"Piece\", \"Box\").","maxLength":100,"minLength":0,"type":"string"},"code":{"description":"Unique short code (e.g. \"PCS\", \"BOX\").","maxLength":50,"minLength":0,"type":"string"},"isPrimary":{"description":"Whether this unit is the primary (base) unit of the chain.","type":"boolean"},"ratioToPrimary":{"format":"double","description":"Conversion ratio to the primary unit.","minimum":0,"exclusiveMinimum":true,"type":"number"},"notes":{"description":"Optional notes.","type":"string"}}},"GetUsersQuery":{"description":"Query parameters for listing users or looking up a single user by email.","required":[],"type":"object","properties":{"email":{"description":"Optional email address lookup value.","type":"string"},"hasSingleLookup":{"description":"Whether the query should resolve a single user instead of a page.","type":"boolean","readOnly":true},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"UserCreateRequest":{"description":"Request to create a new user.","required":[],"type":"object","properties":{"code":{"description":"The user code.","type":"string"},"userName":{"description":"The login username.","type":"string"},"fullName":{"description":"The display name.","type":"string"},"phone":{"description":"The primary phone number.","type":"string"},"email":{"description":"The email address.","type":"string"},"password":{"description":"Optional password; a random one is generated when omitted.","type":"string"},"isSupport":{"description":"Whether the user is a support user.","type":"boolean"}}},"UserResponse":{"description":"Response describing a user.","type":"object","properties":{"id":{"format":"int32","description":"The internal identifier.","type":"integer"},"code":{"description":"The user code.","type":"string"},"userName":{"description":"The login username.","type":"string"},"fullName":{"description":"The display name.","type":"string"},"phone":{"description":"The primary phone number.","type":"string"},"email":{"description":"The email address.","type":"string"},"isSupport":{"description":"Whether the user is a support user.","type":"boolean"},"isOrganizationOwner":{"description":"Whether the user is the organization owner.","type":"boolean"},"active":{"description":"Whether the user account is active.","type":"boolean"}}},"WarehouseResponse":{"description":"Response describing a warehouse.","type":"object","properties":{"id":{"format":"int32","description":"Warehouse identifier.","type":"integer"},"classification":{"$ref":"#/definitions/ClassificationReference","description":"Warehouse classification."},"code":{"description":"Warehouse code.","type":"string"},"description":{"description":"Warehouse description.","type":"string"},"mobile":{"description":"Warehouse mobile number.","type":"string"}}},"WarehouseTreeResponse":{"description":"Response describing a warehouse tree node.","type":"object","properties":{"classificationId":{"format":"int32","description":"Classification identifier.","type":"integer"},"warehouseId":{"format":"int32","description":"Warehouse identifier.","type":"integer"},"parentId":{"format":"int32","description":"Parent identifier.","type":"integer"},"treeLevel":{"format":"int32","description":"Tree level.","type":"integer"},"description":{"description":"Warehouse description.","type":"string"}}},"GetWarehouseBalanceQuery":{"description":"Query parameters for listing warehouse stock balances.","type":"object","properties":{"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[WarehouseBalanceResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/WarehouseBalanceResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"WarehouseBalanceResponse":{"description":"Response describing a stock-item balance at a warehouse.","type":"object","properties":{"warehouse":{"$ref":"#/definitions/WarehouseReference","description":"Warehouse."},"stockItem":{"$ref":"#/definitions/StockItemReference","description":"Stock item."},"balance":{"format":"double","description":"Stock balance.","type":"number"}}},"GetWarehousesQuery":{"description":"Query parameters for listing warehouses.","required":[],"type":"object","properties":{"code":{"description":"Exact code filter.","type":"string"},"name":{"description":"Description contains filter.","type":"string"},"updateDate":{"format":"date-time","description":"Returns warehouses created or updated on or after this date.","type":"string"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[WarehouseResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/WarehouseResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"WarehouseUpsertRequest":{"description":"Request to create or update a warehouse.","required":["description"],"type":"object","properties":{"classificationId":{"format":"int32","description":"Warehouse classification identifier.","type":"integer"},"code":{"description":"Warehouse code.","type":"string"},"description":{"description":"Warehouse description.","type":"string"},"mobile":{"description":"Warehouse mobile number.","type":"string"}}},"GetWarehouseStockBalancesQuery":{"description":"Query parameters for fetching stock-item balances across warehouses.","type":"object","properties":{"stockItemsIds":{"description":"Comma-separated stock-item identifiers. Required.","type":"string"},"nonZeroBalanceOnly":{"description":"When true, excludes zero-balance items.","type":"boolean"},"warehousesIds":{"description":"Optional comma-separated warehouse identifiers.","type":"string"}}},"WarehouseStockItemBalanceResponse":{"description":"Response describing a stock-item balance summary across warehouses.","type":"object","properties":{"stockItem":{"$ref":"#/definitions/StockItemReference","description":"Stock item."},"globalBalance":{"format":"double","description":"Global balance.","type":"number"},"totalBalance":{"format":"double","description":"Total balance.","type":"number"},"globalReserved":{"format":"double","description":"Global reserved balance.","type":"number"},"totalReserved":{"format":"double","description":"Total reserved balance.","type":"number"}}},"WebhookResponse":{"description":"Response describing a webhook subscription.","type":"object","properties":{"id":{"format":"int32","description":"The webhook identifier.","type":"integer"},"name":{"description":"The webhook display name.","type":"string"},"messageType":{"description":"The webhook message type.","type":"string"},"url":{"description":"The callback URL.","type":"string"},"authorizationToken":{"description":"The authorization token.","type":"string"},"events":{"description":"The selected events and filters.","type":"array","items":{"$ref":"#/definitions/WebhookEventResponse"}}}},"WebhookEventResponse":{"description":"Response describing a selected webhook event.","type":"object","properties":{"id":{"format":"int32","description":"The observable event identifier.","type":"integer"},"name":{"description":"The observable event name.","type":"string"},"selected":{"description":"Whether the event is selected.","type":"boolean"},"observerFilters":{"description":"The event filters.","type":"array","items":{"$ref":"#/definitions/WebhookFilterResponse"}}}},"WebhookFilterResponse":{"description":"Response describing a webhook filter.","type":"object","properties":{"id":{"format":"int32","description":"The filter identifier.","type":"integer"},"eventId":{"format":"int32","description":"The event identifier that owns this filter.","type":"integer"},"filterProperty":{"description":"The property name used for filtering.","type":"string"},"comparisonOperator":{"description":"The comparison operator.","type":"string"},"filterValues":{"description":"The filter values.","type":"array","items":{"type":"string"}}}},"WebhookUpsertRequest":{"description":"Request to create or update a webhook subscription.","required":[],"type":"object","properties":{"name":{"description":"The webhook display name.","type":"string"},"messageType":{"description":"The webhook message type.","type":"string"},"url":{"description":"The webhook callback URL.","type":"string"},"authorizationToken":{"description":"Optional authorization token.","type":"string"},"events":{"description":"Selected events and their filter definitions.","type":"array","items":{"$ref":"#/definitions/WebhookEventRequest"}}}},"WebhookEventRequest":{"description":"A webhook event selection in the upsert payload.","type":"object","properties":{"id":{"format":"int32","description":"The observable event identifier.","type":"integer"},"name":{"description":"The observable event name.","type":"string"},"selected":{"description":"Whether the event is selected.","type":"boolean"},"observerFilters":{"description":"Webhook filters attached to the selected event.","type":"array","items":{"$ref":"#/definitions/WebhookFilterRequest"}}}},"WebhookFilterRequest":{"description":"A webhook filter definition in the upsert payload.","type":"object","properties":{"id":{"format":"int32","description":"The filter identifier.","type":"integer"},"eventId":{"format":"int32","description":"The event identifier that owns this filter.","type":"integer"},"filterProperty":{"description":"The property name used for filtering.","type":"string"},"comparisonOperator":{"description":"The comparison operator.","type":"string"},"filterValues":{"description":"The filter values.","type":"array","items":{"type":"string"}}}},"WebhookLookupQuery":{"description":"Query parameters for looking up a webhook by listener domain.","required":[],"type":"object","properties":{"listenerDomain":{"description":"The listener domain.","type":"string"}}},"DeleteWebhookQuery":{"description":"Query parameters for deleting a webhook by listener URL.","required":[],"type":"object","properties":{"listenerUrl":{"description":"The listener URL.","type":"string"}}},"RefreshWebhookCacheRequest":{"description":"Request to invalidate the webhook cache on the current node.","required":[],"type":"object","properties":{"cacheKey":{"description":"The cache key to clear.","type":"string"}}},"WorkOrderResponse":{"description":"Response describing a work order (Issue Offering, Receive Supplies, Receive Returns, or Opening Balance).","type":"object","properties":{"id":{"format":"int32","description":"The work-order id.","type":"integer"},"type":{"description":"The document type (e.g. IssueOffering, ReceiveSupplies).","enum":["RS","RR","RT","IO","IR","IT","TR","CI","CO","JE","SI","PI","CN","DN","NR","NP","SO","SR","RecSO","PO","PR","OB","RMA"],"type":"string"},"date":{"format":"date-time","description":"The document date.","type":"string"},"serial":{"format":"int32","description":"The auto-generated serial number.","type":"integer"},"code":{"description":"The document code (unique per tenant).","type":"string"},"paperNumber":{"description":"The paper number printed on the source document.","type":"string"},"notes":{"description":"Free-form notes captured on the document.","type":"string"},"warehouse":{"$ref":"#/definitions/WarehouseReference","description":"The source warehouse the items are moved from."},"destinationWarehouse":{"$ref":"#/definitions/WarehouseReference","description":"The destination warehouse for internal-transfer documents."},"workOrderOtherPartyId":{"format":"int32","description":"The id of the other party (legacy free-text party id).","type":"integer"},"workOrderResponsibleId":{"format":"int32","description":"The id of the responsible user for the document.","type":"integer"},"customer":{"$ref":"#/definitions/CustomerReference","description":"The customer (for sales-related work orders)."},"supplier":{"$ref":"#/definitions/SupplierReference","description":"The supplier (for purchase-related work orders)."},"salesPerson":{"$ref":"#/definitions/SalesPersonReference","description":"The sales person credited (for sales-related work orders)."},"purchasePersonId":{"format":"int32","description":"The id of the purchase person (for purchase-related work orders).","type":"integer"},"currency":{"$ref":"#/definitions/CurrencyReference","description":"The document currency."},"exchangeRate":{"format":"double","description":"The exchange rate against the system currency at the document date.","type":"number"},"status":{"description":"The current document status.","enum":["Pending","Accepted","Released","Rejected"],"type":"string"},"rejectReason":{"description":"The rejection reason when the document was rejected.","type":"string"},"relatedWorkOrderHeaderId":{"format":"int32","description":"The id of the related work-order header, when one exists.","type":"integer"},"externalId":{"description":"An external identifier supplied by the caller for reconciliation.","type":"string"},"isRelatedOrderFullfilled":{"description":"Whether the related sales/purchase order has been fully fulfilled.","type":"boolean"},"incentiveID":{"format":"int32","description":"The id of the incentive plan attached to this document.","type":"integer"},"isAutoWorkOrder":{"description":"Whether the work order was auto-generated by an issued sales order.","type":"boolean"},"workOrderDetails":{"description":"The line items on the work order.","type":"array","items":{"$ref":"#/definitions/WorkOrderItemResponse"}},"grossTotal":{"format":"double","description":"The gross total computed by summing line price × quantity.","type":"number","readOnly":true}}},"WorkOrderItemResponse":{"description":"Response describing a work-order line item.","type":"object","properties":{"id":{"format":"int32","description":"The line id.","type":"integer"},"workOrderHeaderId":{"format":"int32","description":"The id of the parent work-order header.","type":"integer"},"relatedSODetailId":{"format":"int32","description":"The id of the related sales-order line, when sourced from a sales order.","type":"integer"},"relatedPODetailId":{"format":"int32","description":"The id of the related purchase-order line, when sourced from a purchase order.","type":"integer"},"relatedSRQDetailId":{"format":"int32","description":"The id of the related supplies-request line, when sourced from a supplies request.","type":"integer"},"stockItem":{"$ref":"#/definitions/StockItemReference","description":"The stock item on the line."},"unitOfMeasure":{"$ref":"#/definitions/UnitOfMeasureReference","description":"The unit of measure the quantity is expressed in."},"umRatio":{"format":"double","description":"The conversion ratio from the line UOM to the stock-item's primary UOM.","type":"number"},"quantity":{"format":"double","description":"The line quantity in the line UOM.","type":"number"},"returnedQuantity":{"format":"double","description":"The quantity returned against this line.","type":"number"},"invoicedQuantity":{"format":"double","description":"The quantity that has already been invoiced against this line.","type":"number"},"unitPrice":{"format":"double","description":"The unit price before discount and tax.","type":"number"},"price":{"format":"double","description":"The extended line price.","type":"number"},"dimensionsValue":{"format":"double","description":"The numeric value of the dimension qualifier.","type":"number"},"dimensions":{"description":"The dimension qualifier (e.g. size, color).","type":"string"},"partNumber":{"description":"The part number captured for the line.","type":"string"},"cost":{"format":"double","description":"The unit cost evaluated for the line.","type":"number"},"comments":{"description":"Free-form notes captured on the line.","type":"string"},"globalOnHandBalance":{"format":"double","description":"The on-hand balance across all warehouses at evaluation time.","type":"number"},"localOnHandBalance":{"format":"double","description":"The on-hand balance in the document's warehouse at evaluation time.","type":"number"},"salesPrice":{"format":"double","description":"The current sales price for the stock item.","type":"number"},"lastCost":{"format":"double","description":"The last cost recorded for the stock item.","type":"number"},"averageCost":{"format":"double","description":"The current average cost for the stock item.","type":"number"},"fifo":{"format":"double","description":"The current FIFO valuation for the stock item.","type":"number"},"lifo":{"format":"double","description":"The current LIFO valuation for the stock item.","type":"number"},"batchNumber":{"description":"The batch number, when the stock item is batch-tracked.","type":"string"},"productionDate":{"format":"date-time","description":"The batch production date, when applicable.","type":"string"},"expdate":{"format":"date-time","description":"The batch expiry date, when applicable.","type":"string"},"rowState":{"description":"The row state (added / modified / removed) for partial updates.","enum":["Added","Modified","Deleted"],"type":"string"},"incentiveAssigneeId":{"format":"int32","description":"The id of the incentive-assignee crediting on this line.","type":"integer"},"incentiveDetailId":{"format":"int32","description":"The id of the incentive-detail row applied to this line.","type":"integer"},"packagesCount":{"format":"int32","description":"The number of physical packages represented by the line quantity.","type":"integer"},"unitCost":{"format":"double","description":"Calculated unit cost used by the material-cost endpoint.","type":"number"}}},"GetWorkOrderMaterialCostQuery":{"description":"Query parameters for retrieving a zero-IO work-order material-cost breakdown.","type":"object","properties":{"ioCode":{"description":"IO document code.","type":"string"}}},"GetWorkOrderResponsiblesQuery":{"description":"Query parameters for listing work-order responsibles.","required":[],"type":"object","properties":{"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[WorkOrderResponsibleResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/WorkOrderResponsibleResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"WorkOrderResponsibleResponse":{"description":"Response describing a work-order responsible-user lookup row.","type":"object","properties":{"id":{"format":"int32","description":"The responsible-user id.","type":"integer"},"name":{"description":"The responsible-user display name.","type":"string"}}},"GetWorkOrderOtherPartiesQuery":{"description":"Query parameters for listing work-order other parties.","required":[],"type":"object","properties":{"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","minimum":0,"exclusiveMinimum":false,"type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","maximum":1000,"exclusiveMaximum":false,"minimum":1,"exclusiveMinimum":false,"type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[WorkOrderOtherPartyResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/WorkOrderOtherPartyResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"WorkOrderOtherPartyResponse":{"description":"Response describing a work-order other-party lookup row.","type":"object","properties":{"id":{"format":"int32","description":"The other-party id.","type":"integer"},"name":{"description":"The other-party display name.","type":"string"},"type":{"description":"The other-party type (e.g. Employee, Department).","enum":["Customer","Supplier"],"type":"string"},"glAccount":{"$ref":"#/definitions/AccountReference","description":"The general-ledger account postings for this party land on."}}},"GetWorkOrderQuery":{"description":"Query parameters for looking up a work order by code or paper number, or for listing\r\nwork orders with pagination when neither is supplied.","type":"object","properties":{"code":{"description":"Work-order document code.","type":"string"},"paperNumber":{"description":"Work-order paper number.","type":"string"},"orderDateFrom":{"format":"date-time","description":"Inclusive lower bound of the document date range. Only used when listing.","type":"string"},"orderDateTo":{"format":"date-time","description":"Inclusive upper bound of the document date range. Only used when listing.","type":"string"},"onlyMyOrders":{"description":"Whether to limit results to work orders created by the current user. Only used when\r\nlisting. Defaults to true.","type":"boolean"},"supplierId":{"format":"int32","description":"Filters to work orders for this supplier. Mutually exclusive with customerId/workOrderOtherPartyId.","type":"integer"},"customerId":{"format":"int32","description":"Filters to work orders for this customer. Mutually exclusive with supplierId/workOrderOtherPartyId.","type":"integer"},"workOrderOtherPartyId":{"format":"int32","description":"Filters to work orders for this other party. Mutually exclusive with supplierId/customerId.","type":"integer"},"offset":{"format":"int32","description":"Number of items to skip before returning results. Defaults to 0.","type":"integer"},"limit":{"format":"int32","description":"Maximum number of items to return. Defaults to 100, maximum 1000.","type":"integer"},"effectiveOffset":{"format":"int32","description":"Effective offset, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultOffset} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Offset} is null or negative.","type":"integer","readOnly":true},"effectiveLimit":{"format":"int32","description":"Effective page size, falling back to {Edara.API.DTOs.Requests.Common.PaginatedQuery.DefaultLimit} when {Edara.API.DTOs.Requests.Common.PaginatedQuery.Limit} is null or out of range.","type":"integer","readOnly":true},"effectivePage":{"format":"int32","description":"1-based page number derived from {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveOffset} and {Edara.API.DTOs.Requests.Common.PaginatedQuery.EffectiveLimit}.","type":"integer","readOnly":true}}},"PagedResult[WorkOrderResponse]":{"description":"A paginated result set.","type":"object","properties":{"items":{"description":"The items in the current page.","type":"array","items":{"$ref":"#/definitions/WorkOrderResponse"}},"totalCount":{"format":"int32","description":"The total number of items across all pages.","type":"integer"},"page":{"format":"int32","description":"The current page number.","type":"integer"},"pageSize":{"format":"int32","description":"The number of items per page.","type":"integer"},"totalPages":{"format":"int32","description":"The total number of pages derived from {Edara.API.DTOs.Responses.Common.PagedResult`1.TotalCount} and {Edara.API.DTOs.Responses.Common.PagedResult`1.PageSize}.","type":"integer","readOnly":true}}},"WorkOrderUpsertRequest":{"description":"Request to create or update a work order (shared shape across IO/RS/RR/OB).","required":["warehouseId","workOrderDetails","workOrderDetails"],"type":"object","properties":{"date":{"format":"date-time","description":"The document date.","type":"string"},"serial":{"format":"int32","description":"The serial number (auto-generated when omitted).","type":"integer"},"paperNumber":{"description":"The paper number printed on the source document.","maxLength":50,"minLength":0,"type":"string"},"notes":{"description":"Free-form notes captured on the document.","type":"string"},"warehouseId":{"format":"int32","description":"The id of the source warehouse the items are moved from. Required.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"destinationWarehouseId":{"format":"int32","description":"The id of the destination warehouse for internal-transfer documents.","type":"integer"},"workOrderResponsibleId":{"format":"int32","description":"The id of the responsible user for the document.","type":"integer"},"customerId":{"format":"int32","description":"The id of the customer (for sales-related work orders).","type":"integer"},"supplierId":{"format":"int32","description":"The id of the supplier (for purchase-related work orders).","type":"integer"},"otherPartyId":{"format":"int32","description":"The id of the other party (legacy free-text party).","type":"integer"},"salesPersonId":{"format":"int32","description":"The id of the sales person (for sales-related work orders).","type":"integer"},"purchasePersonId":{"format":"int32","description":"The id of the purchase person (for purchase-related work orders).","type":"integer"},"currencyId":{"format":"int32","description":"The id of the document currency.","type":"integer"},"exchangeRate":{"format":"double","description":"The exchange rate against the system currency at the document date.","type":"number"},"status":{"description":"The initial document status.","enum":["Pending","Accepted","Released","Rejected"],"type":"string"},"relatedSoCode":{"description":"The related sales-order code (for IO/RR documents sourced from a sales order).","type":"string"},"linkedDocumentCode":{"description":"The linked source document code (e.g. supplies request, purchase order).","type":"string"},"externalId":{"description":"An external identifier supplied by the caller for reconciliation.","type":"string"},"isAutoWorkOrder":{"description":"Whether the work order is auto-generated by an issued sales order.","type":"boolean"},"workOrderDetails":{"description":"The line items on the work order. Required, at least one.","type":"array","items":{"$ref":"#/definitions/WorkOrderItemUpsertRequest"}}}},"WorkOrderItemUpsertRequest":{"description":"Request to create or update a work-order line item.","required":["stockItemId","quantity"],"type":"object","properties":{"id":{"format":"int32","description":"The line id (set on update only).","type":"integer"},"workOrderId":{"format":"int32","description":"The id of the parent work-order header.","type":"integer"},"relatedSODetailId":{"format":"int32","description":"The id of the related sales-order line, when sourced from a sales order.","type":"integer"},"relatedPODetailId":{"format":"int32","description":"The id of the related purchase-order line, when sourced from a purchase order.","type":"integer"},"relatedSRQDetailId":{"format":"int32","description":"The id of the related supplies-request line, when sourced from a supplies request.","type":"integer"},"stockItemId":{"format":"int32","description":"The id of the stock item on the line. Required.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"unitOfMeasure":{"format":"int32","description":"The id of the unit of measure the quantity is expressed in.","type":"integer"},"umRatio":{"format":"double","description":"The conversion ratio from the line UOM to the stock-item's primary UOM.","type":"number"},"quantity":{"format":"double","description":"The line quantity in the line UOM. Required.","minimum":0,"exclusiveMinimum":true,"type":"number"},"returnedQuantity":{"format":"double","description":"The quantity returned against this line.","type":"number"},"unitPrice":{"format":"double","description":"The unit price before discount and tax.","type":"number"},"price":{"format":"double","description":"The extended line price.","type":"number"},"dimensionsValue":{"format":"double","description":"The numeric value of the dimension qualifier.","type":"number"},"dimensions":{"description":"The dimension qualifier (e.g. size, color).","type":"string"},"partNumber":{"description":"The part number captured for the line.","maxLength":100,"minLength":0,"type":"string"},"cost":{"format":"double","description":"The unit cost to evaluate the line at.","type":"number"},"comments":{"description":"Free-form notes captured on the line.","type":"string"},"globalOnHandBalance":{"format":"double","description":"The on-hand balance across all warehouses at evaluation time.","type":"number"},"localOnHandBalance":{"format":"double","description":"The on-hand balance in the document's warehouse at evaluation time.","type":"number"},"salesPrice":{"format":"double","description":"The current sales price for the stock item.","type":"number"},"lastCost":{"format":"double","description":"The last cost recorded for the stock item.","type":"number"},"averageCost":{"format":"double","description":"The current average cost for the stock item.","type":"number"},"fifo":{"format":"double","description":"The current FIFO valuation for the stock item.","type":"number"},"lifo":{"format":"double","description":"The current LIFO valuation for the stock item.","type":"number"},"batchNumber":{"description":"The batch number, when the stock item is batch-tracked.","maxLength":100,"minLength":0,"type":"string"},"productionDate":{"format":"date-time","description":"The batch production date, when applicable.","type":"string"},"expdate":{"format":"date-time","description":"The batch expiry date, when applicable.","type":"string"},"rowState":{"description":"The row state (added / modified / removed) for partial updates.","enum":["Added","Modified","Deleted"],"type":"string"},"incentiveAssigneeId":{"format":"int32","description":"The id of the incentive-assignee crediting on this line.","type":"integer"},"incentiveDetailId":{"format":"int32","description":"The id of the incentive-detail row applied to this line.","type":"integer"},"packagesCount":{"format":"int32","description":"The number of physical packages represented by the line quantity.","type":"integer"}}},"CreateIssueOfferingRequest":{"description":"Request to create an issue-offering work order (items leaving the warehouse to a customer).","required":["warehouseId","workOrderDetails","workOrderDetails"],"type":"object","properties":{"date":{"format":"date-time","description":"The document date.","type":"string"},"serial":{"format":"int32","description":"The serial number (auto-generated when omitted).","type":"integer"},"paperNumber":{"description":"The paper number printed on the source document.","maxLength":50,"minLength":0,"type":"string"},"notes":{"description":"Free-form notes captured on the document.","type":"string"},"warehouseId":{"format":"int32","description":"The id of the source warehouse the items are issued from. Required.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"workOrderResponsibleId":{"format":"int32","description":"The id of the responsible user for the document.","type":"integer"},"customerId":{"format":"int32","description":"The id of the customer the items are issued to.","type":"integer"},"otherPartyId":{"format":"int32","description":"The id of the other party when no customer is set.","type":"integer"},"salesPersonId":{"format":"int32","description":"The id of the sales person credited with the issue.","type":"integer"},"currencyId":{"format":"int32","description":"The id of the document currency.","type":"integer"},"exchangeRate":{"format":"double","description":"The exchange rate against the system currency at the document date.","type":"number"},"status":{"description":"The initial document status.","enum":["Pending","Accepted","Released","Rejected"],"type":"string"},"relatedSoCode":{"description":"The related sales-order code, when this document was sourced from a sales order.","type":"string"},"externalId":{"description":"An external identifier supplied by the caller for reconciliation.","type":"string"},"isAutoWorkOrder":{"description":"Whether the work order is auto-generated by an issued sales order.","type":"boolean"},"workOrderDetails":{"description":"The line items on the work order. Required, at least one.","type":"array","items":{"$ref":"#/definitions/WorkOrderItemUpsertRequest"}}}},"CreateReceiveReturnsRequest":{"description":"Request to create a receive-returns work order (items returned by a customer).","required":["warehouseId","workOrderDetails","workOrderDetails"],"type":"object","properties":{"date":{"format":"date-time","description":"The document date.","type":"string"},"serial":{"format":"int32","description":"The serial number (auto-generated when omitted).","type":"integer"},"paperNumber":{"description":"The paper number printed on the source document.","maxLength":50,"minLength":0,"type":"string"},"notes":{"description":"Free-form notes captured on the document.","type":"string"},"warehouseId":{"format":"int32","description":"The id of the warehouse the returned items are received into. Required.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"workOrderResponsibleId":{"format":"int32","description":"The id of the responsible user for the document.","type":"integer"},"customerId":{"format":"int32","description":"The id of the customer the items are returned from.","type":"integer"},"otherPartyId":{"format":"int32","description":"The id of the other party when no customer is set.","type":"integer"},"salesPersonId":{"format":"int32","description":"The id of the sales person originally credited with the sale.","type":"integer"},"currencyId":{"format":"int32","description":"The id of the document currency.","type":"integer"},"exchangeRate":{"format":"double","description":"The exchange rate against the system currency at the document date.","type":"number"},"status":{"description":"The initial document status.","enum":["Pending","Accepted","Released","Rejected"],"type":"string"},"externalId":{"description":"An external identifier supplied by the caller for reconciliation.","type":"string"},"isAutoWorkOrder":{"description":"Whether the work order is auto-generated.","type":"boolean"},"workOrderDetails":{"description":"The line items on the work order. Required, at least one.","type":"array","items":{"$ref":"#/definitions/WorkOrderItemUpsertRequest"}}}},"CreateReceiveSuppliesRequest":{"description":"Request to create a receive-supplies work order (items arriving from a supplier).","required":["warehouseId","workOrderDetails","workOrderDetails"],"type":"object","properties":{"date":{"format":"date-time","description":"The document date.","type":"string"},"serial":{"format":"int32","description":"The serial number (auto-generated when omitted).","type":"integer"},"paperNumber":{"description":"The paper number printed on the source document.","maxLength":50,"minLength":0,"type":"string"},"notes":{"description":"Free-form notes captured on the document.","type":"string"},"warehouseId":{"format":"int32","description":"The id of the destination warehouse the items are received into. Required.","minimum":0,"exclusiveMinimum":true,"type":"integer"},"workOrderResponsibleId":{"format":"int32","description":"The id of the responsible user for the document.","type":"integer"},"supplierId":{"format":"int32","description":"The id of the supplier the items are received from.","type":"integer"},"otherPartyId":{"format":"int32","description":"The id of the other party when no supplier is set.","type":"integer"},"purchasePersonId":{"format":"int32","description":"The id of the purchase person credited with the receipt.","type":"integer"},"currencyId":{"format":"int32","description":"The id of the document currency.","type":"integer"},"exchangeRate":{"format":"double","description":"The exchange rate against the system currency at the document date.","type":"number"},"status":{"description":"The initial document status.","enum":["Pending","Accepted","Released","Rejected"],"type":"string"},"linkedDocumentCode":{"description":"The linked source document code (e.g. supplies request, purchase order).","type":"string"},"externalId":{"description":"An external identifier supplied by the caller for reconciliation.","type":"string"},"isAutoWorkOrder":{"description":"Whether the work order is auto-generated.","type":"boolean"},"workOrderDetails":{"description":"The line items on the work order. Required, at least one.","type":"array","items":{"$ref":"#/definitions/WorkOrderItemUpsertRequest"}}}},"DeleteReceiveSuppliesByCodesRequest":{"description":"Request to delete receive-supplies work orders by code.","required":["documentCodes","documentCodes"],"type":"object","properties":{"documentCodes":{"description":"Document codes to delete.","type":"array","items":{"type":"string"}},"isDryRun":{"description":"If true, rolls back after validation.","type":"boolean"},"failOnNotFound":{"description":"If true, missing codes fail the whole operation.","type":"boolean"},"considerManualRelatedJEs":{"description":"If true, manual related journal entries are deleted first.","type":"boolean"}}},"DeleteReceiveSuppliesByCodesResponse":{"description":"Response describing the result of a receive-supplies batch deletion.","type":"object","properties":{"success":{"description":"Whether the operation succeeded.","type":"boolean"}}}},"securityDefinitions":{"Bearer":{"type":"apiKey","description":"Bearer Authorization header. Example: \"Bearer {token}\". The bearer token may be a JWT or a custom Edara token.","name":"Authorization","in":"header"}},"tags":[{"name":"Accounts"},{"name":"Brands"},{"name":"Bundles"},{"name":"Cash In/Out"},{"name":"Cities"},{"name":"Classifications"},{"name":"Common"},{"name":"Cost Centers"},{"name":"Countries"},{"name":"Currencies"},{"name":"Customers"},{"name":"Districts"},{"name":"Document Manual Links"},{"name":"Dynamic Properties"},{"name":"Journal Entries"},{"name":"Purchase Orders"},{"name":"Sales Orders"},{"name":"Sales Persons"},{"name":"Sales Returns"},{"name":"Sales Stores"},{"name":"Service Items"},{"name":"Settings"},{"name":"Stock Items"},{"name":"Suppliers"},{"name":"Tags"},{"name":"Tax Invoices"},{"name":"Taxes"},{"name":"Units of Measure"},{"name":"Warehouses"},{"name":"Work Orders"},{"name":"Webhooks Guide","description":"## Webhooks Overview\r\n\r\nWebhooks are a useful tool for apps that want to stay in sync with Edara or execute code after a specific event occurs in an Edara account. For example, you might want to trigger an action when a user creates a new stock item or when item balance changes.\r\n\r\n## What's a Webhook?\r\n\r\nA webhook enables Edara to push real-time notifications to your app. Edara uses HTTPS to send these notifications to your app as a JSON payload. You can then use these notifications to execute actions in your backend systems.\r\n\r\n## Use Cases\r\n\r\nCommon webhook use cases include:\r\n- Sending notifications to E-commerce websites\r\n- Integrating with CRM or HR software\r\n- Filtering order items and informing shipping companies about orders\r\n\r\n## Configuring Webhooks in Edara\r\n\r\n1. Navigate to **Data module > Integration > Webhooks** tab\r\n2. Click **Add New Webhook** at the top left of the page\r\n3. Give your webhook a description under the \"Name\" field\r\n4. Choose message type (Default or Custom)\r\n5. In the \"URL\" field, input the callback URL your application will use to accept the incoming webhook\r\n6. In the \"Authorization token\" field, input your token (optional)\r\n7. Choose the events you want to listen for in the \"Events list\" section\r\n8. Click **Save** to create the webhook\r\n\r\n## Event Payload Structure\r\n\r\nEvery event is delivered as `application/json` with the following envelope. These fields are present on every event regardless of `entity_type`.\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `entity_type` | `string` | Type of entity (e.g. `StockItem`, `SalesOrder`). Matches the prefix of `event_type`. |\r\n| `event_type` | `string` | The event that occurred (e.g. `After_Add`, `Balance_Changed`). |\r\n| `entity_id` | `string` | Identifier of the entity that triggered the event. |\r\n| `entity_code` | `string` | Code or reference number of the entity (e.g. `SO-1-15644`, `PROD-001`). |\r\n| `tenant_id` | `string` | Tenant identifier. |\r\n| `tenant_name` | `string` | Tenant display name. |\r\n| `data` | `object` | Full entity payload at the time of the event. The shape depends on `entity_type` — it is the entity's view model (e.g. `StockItemViewModel` for `StockItem_*` events). |\r\n| `message_attributes` | `object` | Event metadata. Always carries a `metadata` sub-object; some events add more (see per-event extras under each event family below). |\r\n\r\nWhen the event was triggered by an API call (rather than the UI), an additional top-level field `request_id` is also included — the UUID correlation id of that API call, useful for joining the webhook back to it.\r\n\r\nA few entity types extend this envelope further; those additions are documented inline under the event family they apply to.\r\n\r\n### `message_attributes.metadata`\r\n\r\nEvery event carries a `metadata` block describing who created and last touched the entity:\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `createdBy` | `string` | Edara username of the user who originally created the entity, looked up from the entity's `InsertUserId`. Same value on Add, Update and Delete events. |\r\n| `createdDate` | `string` (UTC ISO-8601) | Timestamp of the original creation. Same on Add, Update and Delete events. |\r\n| `lastModifiedBy` | `string` | On Update events: Edara username of the user who last modified the entity (resolved from `UpdateUserId`). On Delete events: the authenticated user performing the delete (from the current request's identity). Not sent on Add events. |\r\n| `lastModifiedDate` | `string` (UTC ISO-8601) | On Update events: the entity's `UpdateDate`. On Delete events: the UTC timestamp at which the delete was processed. Not sent on Add events. |\r\n\r\n### Example Payload\r\n\r\n```json\r\n{\r\n  \"entity_id\": \"12345\",\r\n  \"entity_code\": \"ITEM-001\",\r\n  \"entity_type\": \"StockItem\",\r\n  \"event_type\": \"After_Add\",\r\n  \"external_id\": \"EXT-001\",\r\n  \"tenant_id\": \"1\",\r\n  \"tenant_name\": \"Acme Corporation\",\r\n  \"request_id\": \"8a7b2cdb-7e2c-4d11-9c4e-1c0f9b0e7e34\",\r\n  \"data\": {\r\n    \"id\": 12345,\r\n    \"code\": \"ITEM-001\",\r\n    \"description\": \"Widget A\",\r\n    \"sku\": \"WGT-A\",\r\n    \"price\": 99.99\r\n  },\r\n  \"message_attributes\": {\r\n    \"metadata\": {\r\n      \"createdBy\": \"integration.user\",\r\n      \"createdDate\": \"2026-01-15T10:30:00.000000Z\",\r\n      \"lastModifiedBy\": null,\r\n      \"lastModifiedDate\": null\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n## Available Events\r\n\r\nSubscribe to any of the events below per webhook. Events are grouped by the entity they relate to.\r\n\r\n### Account Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `Account_After_Add` | Fired when a new account is created. |\r\n| `Account_After_Update` | Fired when an account is updated. |\r\n| `Account_After_Delete` | Fired when an account is deleted. |\r\n\r\n### Cost Center Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `CostCenter_After_Add` | Fired when a new cost center is created. |\r\n| `CostCenter_After_Update` | Fired when a cost center is updated. |\r\n| `CostCenter_After_Delete` | Fired when a cost center is deleted. |\r\n\r\n### Customer Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `Customer_After_Add` | Fired when a new customer is created. |\r\n| `Customer_After_Update` | Fired when a customer is updated. |\r\n| `Customer_After_Delete` | Fired when a customer is deleted. |\r\n| `Customer_Balance_Changed` | Fired when the customer's outstanding balance changes. |\r\n\r\n**Additional envelope fields**\r\n\r\n| Name | Type | Description |\r\n|------|------|-------------|\r\n| `external_id` | `string` | The customer's external identifier set by the integration. |\r\n\r\n### Supplier Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `Supplier_After_Add` | Fired when a new supplier is created. |\r\n| `Supplier_After_Update` | Fired when a supplier is updated. |\r\n| `Supplier_After_Delete` | Fired when a supplier is deleted. |\r\n\r\n### Sales Order Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `SalesOrder_After_Add` | Fired when a new sales order is created. |\r\n| `SalesOrder_After_Update` | Fired when a sales order is updated. |\r\n| `SalesOrder_After_Delete` | Fired when a sales order is deleted. |\r\n| `SalesOrder_Status_Changed` | Fired when a sales order's status transitions (e.g. Pending → Issued). |\r\n| `SalesOrder_Cashing_Done` | Fired when the related cash receipt is completed. |\r\n| `SalesOrder_Cashing_Deleted` | Fired when the related cash receipt is removed. |\r\n| `SalesOrder_NR_Done` | Fired when the related notes receivable is completed. |\r\n| `SalesOrder_NR_Deleted` | Fired when the related notes receivable is removed. |\r\n\r\n**Additional envelope fields**\r\n\r\n| Name | Type | Description |\r\n|------|------|-------------|\r\n| `external_id` | `string` | The order's external identifier set by the integration. |\r\n| `related_work_order_amount` | `decimal` | Value of the auto-generated work order linked to the order, when one was created. |\r\n\r\n### Sales Return Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `SalesReturn_After_Add` | Fired when a new sales return is created. |\r\n| `SalesReturn_After_Update` | Fired when a sales return is updated. |\r\n| `SalesReturn_After_Delete` | Fired when a sales return is deleted. |\r\n\r\n### Sales Store Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `SalesStore_After_Add` | Fired when a new sales store is created. |\r\n| `SalesStore_After_Update` | Fired when a sales store is updated. |\r\n| `SalesStore_After_Delete` | Fired when a sales store is deleted. |\r\n\r\n### Service Item Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `ServiceItem_After_Add` | Fired when a new service item is created. |\r\n| `ServiceItem_After_Update` | Fired when a service item is updated. |\r\n| `ServiceItem_After_Delete` | Fired when a service item is deleted. |\r\n\r\n**Additional envelope fields**\r\n\r\n| Name | Type | Description |\r\n|------|------|-------------|\r\n| `external_id` | `string` | The service item's external identifier set by the integration. |\r\n\r\n### Stock Item Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `StockItem_After_Add` | Fired when a new stock item is created. |\r\n| `StockItem_After_Update` | Fired when a stock item is updated. |\r\n| `StockItem_After_Delete` | Fired when a stock item is deleted. |\r\n| `StockItem_Balance_Changed` | Fired when the on-hand balance of a stock item changes in either direction. |\r\n| `StockItem_Balance_Increased` | Fired when the on-hand balance of a stock item increases. |\r\n| `StockItem_Balance_Decreased` | Fired when the on-hand balance of a stock item decreases. |\r\n| `StockItem_Reserved_Balance_Changed` | Fired when the reserved balance of a stock item changes. |\r\n\r\n**Additional envelope fields**\r\n\r\n| Name | Type | Description |\r\n|------|------|-------------|\r\n| `external_id` | `string` | The stock item's external identifier set by the integration. |\r\n\r\n#### `StockItem_Balance_Changed` extras\r\n\r\n**`message_attributes` extras**\r\n\r\n| Name | Type | Description |\r\n|------|------|-------------|\r\n| `GlobalBalance` | `decimal` | On-hand balance across all warehouses. |\r\n| `GlobalReservedBalance` | `decimal` | Reserved balance across all warehouses. |\r\n| `TotalBalance` | `decimal` | On-hand balance restricted to the subscriber's `WarehouseId` filter (equals `GlobalBalance` when no filter is set). |\r\n| `TotalReservedBalance` | `decimal` | Reserved balance restricted to the subscriber's `WarehouseId` filter. |\r\n| `StockItemBalances` | `array<StockItemBalance>` | Per-warehouse rows with `warehouseId`, `balance` and `reservedBalance`. |\r\n\r\n**Subscription filters**\r\n\r\n| Name | Description |\r\n|------|-------------|\r\n| `WarehouseId` | Optional list of warehouse ids supplied as a subscription filter. The event fires only when the change touches one of the listed warehouses. |\r\n\r\n#### `StockItem_Balance_Increased` extras\r\n\r\n**`message_attributes` extras**\r\n\r\n| Name | Type | Description |\r\n|------|------|-------------|\r\n| `GlobalBalance` | `decimal` | On-hand balance after the increase, across all warehouses. |\r\n| `GlobalReservedBalance` | `decimal` | Reserved balance across all warehouses. |\r\n| `TotalBalance` | `decimal` | On-hand balance restricted to the subscriber's `WarehouseId` filter. |\r\n| `TotalReservedBalance` | `decimal` | Reserved balance restricted to the subscriber's `WarehouseId` filter. |\r\n| `StockItemBalances` | `array<StockItemBalance>` | Per-warehouse rows. |\r\n\r\n**Subscription filters**\r\n\r\n| Name | Description |\r\n|------|-------------|\r\n| `WarehouseId` | See `StockItem_Balance_Changed`. |\r\n\r\n#### `StockItem_Balance_Decreased` extras\r\n\r\n**`message_attributes` extras**\r\n\r\n| Name | Type | Description |\r\n|------|------|-------------|\r\n| `GlobalBalance` | `decimal` | On-hand balance after the decrease, across all warehouses. |\r\n| `GlobalReservedBalance` | `decimal` | Reserved balance across all warehouses. |\r\n| `TotalBalance` | `decimal` | On-hand balance restricted to the subscriber's `WarehouseId` filter. |\r\n| `TotalReservedBalance` | `decimal` | Reserved balance restricted to the subscriber's `WarehouseId` filter. |\r\n| `StockItemBalances` | `array<StockItemBalance>` | Per-warehouse rows. |\r\n\r\n**Subscription filters**\r\n\r\n| Name | Description |\r\n|------|-------------|\r\n| `WarehouseId` | See `StockItem_Balance_Changed`. |\r\n\r\n#### `StockItem_Reserved_Balance_Changed` extras\r\n\r\n**`message_attributes` extras**\r\n\r\n| Name | Type | Description |\r\n|------|------|-------------|\r\n| `GlobalBalance` | `decimal` | On-hand balance across all warehouses. |\r\n| `GlobalReservedBalance` | `decimal` | Reserved balance across all warehouses. |\r\n| `TotalBalance` | `decimal` | On-hand balance restricted to the subscriber's `WarehouseId` filter. |\r\n| `TotalReservedBalance` | `decimal` | Reserved balance restricted to the subscriber's `WarehouseId` filter. |\r\n| `StockItemBalances` | `array<StockItemBalance>` | Per-warehouse rows. |\r\n\r\n**Subscription filters**\r\n\r\n| Name | Description |\r\n|------|-------------|\r\n| `WarehouseId` | See `StockItem_Balance_Changed`. |\r\n\r\n### Warehouse Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `Warehouse_After_Add` | Fired when a new warehouse is created. |\r\n| `Warehouse_After_Update` | Fired when a warehouse is updated. |\r\n| `Warehouse_After_Delete` | Fired when a warehouse is deleted. |\r\n| `Warehouse_Balance_Changed` | Fired when total warehouse balance changes. |\r\n\r\n**Additional envelope fields**\r\n\r\n| Name | Type | Description |\r\n|------|------|-------------|\r\n| `external_id` | `string` | The warehouse's external identifier set by the integration. |\r\n\r\n### Work Order Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `WorkOrder_After_Add` | Fired when a new work order is created. |\r\n| `WorkOrder_After_Update` | Fired when a work order is updated. |\r\n| `WorkOrder_After_Delete` | Fired when a work order is deleted. |\r\n| `WorkOrderDetail_After_Add` | Fired when a work order detail line is added. |\r\n| `WorkOrderDetail_After_Update` | Fired when a work order detail line is updated. |\r\n| `WorkOrderDetail_After_Delete` | Fired when a work order detail line is deleted. |\r\n\r\n### Purchase Order Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `PurchaseOrder_After_Add` | Fired when a new purchase order is created. |\r\n| `PurchaseOrder_After_Update` | Fired when a purchase order is updated. |\r\n| `PurchaseOrder_After_Delete` | Fired when a purchase order is deleted. |\r\n\r\n**Additional envelope fields**\r\n\r\n| Name | Type | Description |\r\n|------|------|-------------|\r\n| `related_work_order_amount` | `decimal` | Value of the auto-generated work order linked to the purchase order, when one was created. |\r\n\r\n### Dynamic Property Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `DynamicProperty_After_Add` | Fired when a new dynamic property is created. |\r\n| `DynamicProperty_After_Update` | Fired when a dynamic property is updated. |\r\n| `DynamicProperty_After_Delete` | Fired when a dynamic property is deleted. |\r\n| `DynamicPropertyValue_After_Add` | Fired when a dynamic property value is created. |\r\n| `DynamicPropertyValue_After_Update` | Fired when a dynamic property value is updated. |\r\n| `DynamicPropertyValue_After_Delete` | Fired when a dynamic property value is deleted. |\r\n\r\n### Notes Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `NotesReceivable_After_Add` | Fired when a notes receivable is created. |\r\n| `NotesReceivable_After_Update` | Fired when a notes receivable is updated. |\r\n| `NotesReceivable_After_Delete` | Fired when a notes receivable is deleted. |\r\n| `NotesPayable_After_Add` | Fired when a notes payable is created. |\r\n| `NotesPayable_After_Update` | Fired when a notes payable is updated. |\r\n| `NotesPayable_After_Delete` | Fired when a notes payable is deleted. |\r\n\r\n### Inventory Reordering Alerts\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `GlobalInventory_Reordering_Alert` | Fired when the global on-hand balance of a stock item drops below its global reorder point. |\r\n| `LocalInventory_Reordering_Alert` | Fired when a warehouse-level balance drops below its local reorder point. |\r\n\r\n### Journal Entry Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `JournalEntry_After_Delete` | Fired when a journal entry is deleted. |\r\n\r\n### Price List Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `PriceList_After_Update` | Fired when a price list is updated. |\r\n\r\n### Supplies Request Events\r\n\r\n| Event | Description |\r\n|-------|-------------|\r\n| `SuppliesRequest_After_Update` | Fired when a supplies request is updated. |\r\n\r\n## Retry Logic\r\n\r\nIf your endpoint does not respond with a 2xx status within 90 seconds, Edara will retry up to 10 times on the following schedule:\r\n\r\n| Attempt | Delay |\r\n|---------|-------|\r\n| 1 | 5 seconds |\r\n| 2 | 30 seconds |\r\n| 3 | 3 minutes |\r\n| 4 | 5 minutes |\r\n| 5 | 10 minutes |\r\n| 6 | 30 minutes |\r\n| 7 | 1 hour |\r\n| 8 | 2 hours |\r\n| 9 | 5 hours |\r\n| 10 | 10 hours |\r\n\r\nIf the final retry fails, the delivery is recorded as failed and the webhook moves on to the next event. **Outgoing webhooks are not subject to the API rate limit.**\r\n"}],"x-webhooks":[{"name":"Account_After_Add","description":"Fired when a new account is created.","entityType":"Account"},{"name":"Account_After_Update","description":"Fired when an account is updated.","entityType":"Account"},{"name":"Account_After_Delete","description":"Fired when an account is deleted.","entityType":"Account"},{"name":"CostCenter_After_Add","description":"Fired when a new cost center is created.","entityType":"CostCenter"},{"name":"CostCenter_After_Update","description":"Fired when a cost center is updated.","entityType":"CostCenter"},{"name":"CostCenter_After_Delete","description":"Fired when a cost center is deleted.","entityType":"CostCenter"},{"name":"Customer_After_Add","description":"Fired when a new customer is created.","entityType":"Customer"},{"name":"Customer_After_Update","description":"Fired when a customer is updated.","entityType":"Customer"},{"name":"Customer_After_Delete","description":"Fired when a customer is deleted.","entityType":"Customer"},{"name":"Customer_Balance_Changed","description":"Fired when the customer's outstanding balance changes.","entityType":"Customer"},{"name":"Supplier_After_Add","description":"Fired when a new supplier is created.","entityType":"Supplier"},{"name":"Supplier_After_Update","description":"Fired when a supplier is updated.","entityType":"Supplier"},{"name":"Supplier_After_Delete","description":"Fired when a supplier is deleted.","entityType":"Supplier"},{"name":"SalesOrder_After_Add","description":"Fired when a new sales order is created.","entityType":"SalesOrder"},{"name":"SalesOrder_After_Update","description":"Fired when a sales order is updated.","entityType":"SalesOrder"},{"name":"SalesOrder_After_Delete","description":"Fired when a sales order is deleted.","entityType":"SalesOrder"},{"name":"SalesOrder_Status_Changed","description":"Fired when a sales order's status transitions (e.g. Pending → Issued).","entityType":"SalesOrder"},{"name":"SalesOrder_Cashing_Done","description":"Fired when the related cash receipt is completed.","entityType":"SalesOrder"},{"name":"SalesOrder_Cashing_Deleted","description":"Fired when the related cash receipt is removed.","entityType":"SalesOrder"},{"name":"SalesOrder_NR_Done","description":"Fired when the related notes receivable is completed.","entityType":"SalesOrder"},{"name":"SalesOrder_NR_Deleted","description":"Fired when the related notes receivable is removed.","entityType":"SalesOrder"},{"name":"SalesReturn_After_Add","description":"Fired when a new sales return is created.","entityType":"SalesReturn"},{"name":"SalesReturn_After_Update","description":"Fired when a sales return is updated.","entityType":"SalesReturn"},{"name":"SalesReturn_After_Delete","description":"Fired when a sales return is deleted.","entityType":"SalesReturn"},{"name":"SalesStore_After_Add","description":"Fired when a new sales store is created.","entityType":"SalesStore"},{"name":"SalesStore_After_Update","description":"Fired when a sales store is updated.","entityType":"SalesStore"},{"name":"SalesStore_After_Delete","description":"Fired when a sales store is deleted.","entityType":"SalesStore"},{"name":"ServiceItem_After_Add","description":"Fired when a new service item is created.","entityType":"ServiceItem"},{"name":"ServiceItem_After_Update","description":"Fired when a service item is updated.","entityType":"ServiceItem"},{"name":"ServiceItem_After_Delete","description":"Fired when a service item is deleted.","entityType":"ServiceItem"},{"name":"StockItem_After_Add","description":"Fired when a new stock item is created.","entityType":"StockItem"},{"name":"StockItem_After_Update","description":"Fired when a stock item is updated.","entityType":"StockItem"},{"name":"StockItem_After_Delete","description":"Fired when a stock item is deleted.","entityType":"StockItem"},{"name":"StockItem_Balance_Changed","description":"Fired when the on-hand balance of a stock item changes in either direction.","entityType":"StockItem"},{"name":"StockItem_Balance_Increased","description":"Fired when the on-hand balance of a stock item increases.","entityType":"StockItem"},{"name":"StockItem_Balance_Decreased","description":"Fired when the on-hand balance of a stock item decreases.","entityType":"StockItem"},{"name":"StockItem_Reserved_Balance_Changed","description":"Fired when the reserved balance of a stock item changes.","entityType":"StockItem"},{"name":"Warehouse_After_Add","description":"Fired when a new warehouse is created.","entityType":"Warehouse"},{"name":"Warehouse_After_Update","description":"Fired when a warehouse is updated.","entityType":"Warehouse"},{"name":"Warehouse_After_Delete","description":"Fired when a warehouse is deleted.","entityType":"Warehouse"},{"name":"Warehouse_Balance_Changed","description":"Fired when total warehouse balance changes.","entityType":"Warehouse"},{"name":"WorkOrder_After_Add","description":"Fired when a new work order is created.","entityType":"WorkOrder"},{"name":"WorkOrder_After_Update","description":"Fired when a work order is updated.","entityType":"WorkOrder"},{"name":"WorkOrder_After_Delete","description":"Fired when a work order is deleted.","entityType":"WorkOrder"},{"name":"WorkOrderDetail_After_Add","description":"Fired when a work order detail line is added.","entityType":"WorkOrder"},{"name":"WorkOrderDetail_After_Update","description":"Fired when a work order detail line is updated.","entityType":"WorkOrder"},{"name":"WorkOrderDetail_After_Delete","description":"Fired when a work order detail line is deleted.","entityType":"WorkOrder"},{"name":"PurchaseOrder_After_Add","description":"Fired when a new purchase order is created.","entityType":"PurchaseOrder"},{"name":"PurchaseOrder_After_Update","description":"Fired when a purchase order is updated.","entityType":"PurchaseOrder"},{"name":"PurchaseOrder_After_Delete","description":"Fired when a purchase order is deleted.","entityType":"PurchaseOrder"},{"name":"DynamicProperty_After_Add","description":"Fired when a new dynamic property is created.","entityType":"DynamicProperty"},{"name":"DynamicProperty_After_Update","description":"Fired when a dynamic property is updated.","entityType":"DynamicProperty"},{"name":"DynamicProperty_After_Delete","description":"Fired when a dynamic property is deleted.","entityType":"DynamicProperty"},{"name":"DynamicPropertyValue_After_Add","description":"Fired when a dynamic property value is created.","entityType":"DynamicProperty"},{"name":"DynamicPropertyValue_After_Update","description":"Fired when a dynamic property value is updated.","entityType":"DynamicProperty"},{"name":"DynamicPropertyValue_After_Delete","description":"Fired when a dynamic property value is deleted.","entityType":"DynamicProperty"},{"name":"NotesReceivable_After_Add","description":"Fired when a notes receivable is created.","entityType":"Notes"},{"name":"NotesReceivable_After_Update","description":"Fired when a notes receivable is updated.","entityType":"Notes"},{"name":"NotesReceivable_After_Delete","description":"Fired when a notes receivable is deleted.","entityType":"Notes"},{"name":"NotesPayable_After_Add","description":"Fired when a notes payable is created.","entityType":"Notes"},{"name":"NotesPayable_After_Update","description":"Fired when a notes payable is updated.","entityType":"Notes"},{"name":"NotesPayable_After_Delete","description":"Fired when a notes payable is deleted.","entityType":"Notes"},{"name":"GlobalInventory_Reordering_Alert","description":"Fired when the global on-hand balance of a stock item drops below its global reorder point.","entityType":"InventoryReorderingAlert"},{"name":"LocalInventory_Reordering_Alert","description":"Fired when a warehouse-level balance drops below its local reorder point.","entityType":"InventoryReorderingAlert"},{"name":"JournalEntry_After_Delete","description":"Fired when a journal entry is deleted.","entityType":"JournalEntry"},{"name":"PriceList_After_Update","description":"Fired when a price list is updated.","entityType":"PriceList"},{"name":"SuppliesRequest_After_Update","description":"Fired when a supplies request is updated.","entityType":"SuppliesRequest"}],"x-tagGroups":[{"name":"Accounting","tags":["Accounts","Cash In/Out","Cost Centers","Currencies","Journal Entries","Tax Invoices","Taxes"]},{"name":"Common","tags":["Cities","Common","Countries","Districts","Document Manual Links","Settings","Tags","Webhooks Guide"]},{"name":"Inventory & Warehouse","tags":["Brands","Classifications","Dynamic Properties","Stock Items","Units of Measure","Warehouses","Work Orders"]},{"name":"Purchasing","tags":["Purchase Orders","Suppliers"]},{"name":"Sales","tags":["Bundles","Customers","Sales Orders","Sales Persons","Sales Returns","Sales Stores","Service Items"]}]}