{
  "info": {
    "name": "معتمد آسا — API نسخه ۲ (1.0.0.213)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Fill client_id and client_secret, run «دریافت توکن» once; the others use {{access_token}}. Docs: https://api-v2.asatsp.ir/docs/"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api-v2.asatsp.ir"
    },
    {
      "key": "client_id",
      "value": ""
    },
    {
      "key": "client_secret",
      "value": ""
    },
    {
      "key": "access_token",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "احراز هویت",
      "item": [
        {
          "name": "Exchanges client credentials (client_credentials grant) for a one-hour bearer JWT.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/auth/v2/token",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "v2",
                "token"
              ],
              "query": [],
              "variable": []
            },
            "description": "AllowAnonymous. client.LastUsedAt is updated on success. Form-urlencoded binds too (see auth.tokenEndpoint.requestFormat).\n\nError codes:\n- `https_required` (HTTP 400): plain http\n- `invalid_request` (HTTP 400): as Message of a Web API HttpError\n- `rate_limited` (HTTP 429): rate limit\n- `ip_not_allowed` (HTTP 403): IP restriction (code IP_NOT_ALLOWED)\n- `invalid_scope` (HTTP 403): scope malformed or not granted\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "noauth"
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"grant_type\": \"client_credentials\",\n  \"client_id\": \"{{client_id}}\",\n  \"client_secret\": \"{{client_secret}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body.access_token) { pm.collectionVariables.set(\"access_token\", body.access_token); }",
                  "pm.test(\"token issued\", () => pm.expect(body.access_token).to.be.a(\"string\"));"
                ]
              }
            }
          ]
        },
        {
          "name": "POST /api/auth/v2/client-credentials",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/auth/v2/client-credentials",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "v2",
                "client-credentials"
              ],
              "query": [],
              "variable": []
            },
            "description": "AllowAnonymous attribute, but authenticated by V2AuthService.AuthenticateLegacyForCredentials (the bearer is always read as a static key, never as a JWT). Adds Deprecation/Sunset/Warning headers. Becomes useless after the sunset.\n\nError codes:\n- `https_required` (HTTP 400): plain http\n- `invalid_request` (HTTP 400): body or credential_type missing (HttpError Message)\n- `invalid_credential_type` (HTTP 400): credential_type not customer/partner (HttpError Message)\n- `invalid_legacy_api_key` (HTTP 401): refused static key, partner kind, after the sunset, or IP refusal\n- `client_revoked` (HTTP 409): the credential is revoked or switched off\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"credential_type\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "داده‌های مرجع و دسترسی",
      "item": [
        {
          "name": "Lists the currency codes the system knows, code to display name.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/Currency",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "Currency"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.lookup.read`.\n\nAttribute-routed ([RoutePrefix(api/Currency)] + [Route(\"\")]), path case-insensitive. Not reachable as api/Currency/{id}: the conventional route matches that URL but an attribute-routed action is never selected by a conventional route, so it answers 404 {Message} (isolated probe).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Lists the unit table by internal UnitId to name (legacy; prefer /codes).",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/InvoiceItemUnit",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "InvoiceItemUnit"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.lookup.read`.\n\nInternal UnitIds are not the official codes; several ids equal another unit's official code (InvoiceController.cs:2739-2743). ToDictionary would throw on duplicate UnitId (not expected, primary key).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Lists the official unit codes (the value Body[].mu carries) with their names.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/InvoiceItemUnit/codes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "InvoiceItemUnit",
                "codes"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.lookup.read`.\n\nRows without a code are left out; a code held twice is listed once (first UnitId).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "GET /api/v2/stuffid/{code}",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/stuffid/:code",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "stuffid",
                ":code"
              ],
              "query": [],
              "variable": [
                {
                  "key": "code",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.lookup.read`.\n\nUses the backend's StuffidController.CreateCentralCatalogController().GetAsync. Extra path segments (api/v2/stuffid/x/y) fall to the catch-all 404 ROUTE_NOT_FOUND (tests).\n\nError codes:\n- `INVALID_STUFFID` (HTTP 400): code not 13 digits after normalisation\n- `STUFFID_NOT_FOUND` (HTTP 404): not in the catalogue\n- `STUFFID_UNAVAILABLE` (HTTP 502): catalogue error\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Reads the calling client's IP restriction, the address ASA sees it at and recent refusals.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/client/ip-access",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "client",
                "ip-access"
              ],
              "query": [],
              "variable": []
            },
            "description": "Any valid customer token (no scope checked: AuthenticateCustomer(db, null)).\n\nError codes:\n- `CLIENT_CREDENTIALS_REQUIRED` (HTTP 403): legacy static key or no client id\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "POST /api/v2/client/ip-access/lock",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/client/ip-access/lock",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "client",
                "ip-access",
                "lock"
              ],
              "query": [],
              "variable": []
            },
            "description": "No body is read.\n\nError codes:\n- `INVALID_IP_ACCESS` (HTTP 400): ApiClientAccessException (MegaPayBackend/Services/Auth/ApiClientAccess.cs:130-172)\n- `CLIENT_CREDENTIALS_REQUIRED` (HTTP 403): legacy static key\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule already excludes the caller\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "ثبت مشتری",
      "item": [
        {
          "name": "POST /api/register",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/register",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "register"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nProduction fiscal ids also get taxFileState/taxFileStatus/taxFileStatusTitle/taxFileMessage (tax-file inquiry). customerApiKey is always null since 1.0.0.107. A partner not yet in «همکاران API» passes PartnerAccess.Refusal (registry is a restriction only).\n\nError codes:\n- `FISCAL_ID_INVALID` (HTTP 200): result 0: fiscal id not active or of another economic code\n- `FISCAL_ID_INQUIRY_UNAVAILABLE` (HTTP 200): result 0: the inquiry did not run (TaxV2Host error, timeout)\n- `business_registered_elsewhere` (HTTP 200): result -2: an existing business this partner did not bring\n- `partner_suspended` (HTTP 200): result -1: partner registered in «همکاران API» but suspended (PartnerAccess.Refusal)\n- `capability_disabled` (HTTP 200): result -1: directRegister not enabled for the partner\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"fiscalId\": \"\",\n  \"economicCode\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "صورتحساب",
      "item": [
        {
          "name": "POST /api/invoice/send",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/send",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "send"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nValidation runs twice: before authentication (structure) and with the company (V7.9 switches). In production the validator reads the bound model re-serialized, not the raw body (serializer.notes); exr keeps its decimals from the buffered body. Cancellations (Header.ins=3): Body optional; under V7.9 for the company every field outside the cancellation pattern (Body rows included) is dropped with a warning in warnings, and a missing setm takes the reference's settlement. Corrections and returns (ins 2/4): with strict V7.9 their out-of-pattern fields (buyer included) are dropped with a warning. Every referral first takes its chain's status from the organisation (PrepareReferral). A return's Body is the remaining rows (returnRows remaining, default) or the returned rows (returned); the server matches them to the reference. proforma=true registers a proforma: no fiscal memory, never sent, ins must be 1, no irtaxid, send must not be true. fiscalId (6 chars) / sandBox choose the fiscal memory; omitted send uses the business's API v2 auto-send setting. Type-1 original invoices whose pattern needs a buyer must give a buyer the backend can register (tob/tinb/bid/bpc).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `V79_REQUIRED` (HTTP 200): strict V7.9 matrix: required field missing (only when InvoiceRules.V79.Enabled/StrictValidation are on for the company and pattern)\n- `V79_OUT_OF_PATTERN` (HTTP 200): field outside the pattern (matrix, or pattern 11 lists regardless of the flags)\n- `V79_CONTEXT_INVALID` (HTTP 200): type/pattern/subject/settlement/buyer combination invalid per the V7.9 engine\n- `V79_BODY_MAX_ONE` (HTTP 200): pattern 11 issue (always) or pattern 14 under strict V7.9: more than one Body row\n- `V79_AMOUNT_MUST_BE_ONE` (HTTP 200): strict V7.9, patterns 6 and 8: am must be 1\n- `V79_VAT_RATE_MUST_BE_ZERO` (HTTP 200): pattern 11: vra must be 0\n- `V79_VAT_AMOUNT_MUST_BE_ZERO` (HTTP 200): pattern 11: vam must be 0\n- `V79_SUBJECT_NOT_ALLOWED` (HTTP 200): pattern 11: ins=4 not allowed\n- `V79_CANCELLATION_BODY_OUT_OF_PATTERN` (HTTP 200): strict V7.9: cancellation with Body rows (normally the rows are dropped first with a warning)\n- `ARTICLE9_REGISTER_WITHOUT_SEND_RULE` (HTTP 200): indati2m sent without insr=1\n- `ARTICLE9_FEATURE_DISABLED` (HTTP 200): insr=1 while InvoiceRules.V79.Article9Enabled is off for the company\n- `ARTICLE9_INVOICE_TYPE_NOT_ALLOWED` (HTTP 200): Article 9 only for type 1 and 2\n- `ARTICLE9_INVOICE_SUBJECT_NOT_ALLOWED` (HTTP 200): Article 9 subject not valid\n- `ARTICLE9_REGISTER_REQUIRED` (HTTP 200): insr=1 without indati2m\n- `ARTICLE9_REGISTER_BEFORE_ISSUE` (HTTP 200): indati2m before indatim\n- `ARTICLE9_REGISTER_IN_FUTURE` (HTTP 200): indati2m in the future\n- `SHIPMENT_COUNTRY_REQUIRED` (HTTP 200): pattern 8: ocu/dco missing (simple model) — ShipmentLocationCoding\n- `SHIPMENT_COUNTRY_NOT_IN_CODING` (HTTP 200): pattern 8: country code not in the V7.9 appendix\n- `SHIPMENT_CITY_REQUIRED` (HTTP 200): pattern 8: Iran (033) needs a city code\n- `SHIPMENT_CITY_NOT_IN_CODING` (HTTP 200): pattern 8: city code not in the appendix\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-1 sale invoices (pattern 1) with buyer.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/salesWithBuyerData",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "salesWithBuyerData"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nSimple model: the server builds the official JSON (BuildClassicTaxInvoice, InvoiceController.cs:2095-2249) and computes every amount with floor: prdis=floor(qty*unitPrice), dis=floor(discount), adis=max(0,prdis-dis), vam=floor(vatBase*vatRate/100), odam=floor(adis*otherTaxRate/100), olam=floor(adis*govTaxRate/100), tsstam=adis+vam+odam+olam; header totals are the sums; settlement 1: cap=tbill, 2: insp=tbill, 3: cap=floor(payment) capped at tbill, insp=tbill-cap, tvop=floor(tvam*cap/tbill). The result is validated by the /send validator. The buyer is registered as a customer of the business. invoiceSubject 2/3/4 needs sourceInternalId or sourceTaxId (the chain's latest member is the reference) and the buyer object is still validated on this route. items are required for every subject (cancellation included). A row without stuffId whose items[].internalId names one of the business's goods takes that goods' stuffId, with a warning.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-2 sale invoices (pattern 1), buyer optional.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/salesEndUser",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "salesEndUser"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nAs salesWithBuyerData (type 2, pattern 1). A buyer, when given on an original invoice, is kept on the invoice; when it cannot be registered the invoice is saved without one and a warning says so (ResolveOptionalClassicBuyerId, InvoiceController.cs:2515-2552).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-1 currency-sale invoices (pattern 2).",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/exchange",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "exchange"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPattern 2 rules: items[].unit not required; currencyCode (or currency, max 3) and currencyRate > 0 required; currencyPurchaseRate > 0 and < currencyRate required; vatBaseAmount >= 0 required (sovat); unitPrice not sent as fee; the currency amount (cfee) is amountCurrency or else qty. buyer.passportNumber is accepted only here, with buyer.type 4, max 9 Latin letters/digits. declarationNo (1-14 digits) and officeCode (5 digits) optional.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-1 gold, jewellery and platinum invoices (pattern 3).",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/jewelry",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "jewelry"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPattern 3: items[].wage, profit, commission required and >= 0 (consfee, spro, bros = floor; tcpbs = floor(sum)); carat is sent as cui.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-1 contracting invoices (pattern 4).",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/contracting",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "contracting"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPattern 4: data[].contractCode required, exactly 12 digits (Header.crn).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-1 utility-bill invoices (pattern 5).",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/utilityBill",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "utilityBill"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPattern 5: data[].billNo required, 1-19 digits (Header.billid). The currency-amount check is skipped for this pattern. Strict V7.9 for pattern 5 additionally depends on InvoiceRules.V79.Pattern5Enabled.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-1 airline-ticket invoices (pattern 6).",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/flightTicket",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "flightTicket"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPattern 6: data[].flightInfo required (see nestedTypes.ClassicFlightInfoData). Header.bid comes from flightInfo.nationalId, else foreignId, else buyer.nationalCode; tinb from flightInfo.economicCode when given; bpn = flightInfo.passportNumber; ft = flightType; tinc = agentEconomicCode. Strict V7.9: every Body am must be 1.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-1 export invoices (pattern 7), buyer optional.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "export"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPattern 7: items[].netWeight > 0, currencyValue > 0, currencyCode and currencyRate > 0 required (nw, sscv, ssrv=adis; header torv=tadis, tocv=sum(sscv), tonw=sum(nw)); tprdis/tdis/tadis not sent; bpc not sent. cottageNo optional 1-14 digits, cottageDate needs cottageNo; officeCode optional 5 digits. The validation copy drops cfee/prdis/dis/adis (ClassicExportPayloadPolicy). Return from sale is not allowed for this pattern (V7.9 engine).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-1 bill-of-lading (transport) invoices (pattern 8).",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/billOfLading",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "billOfLading"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPattern 8: data[].shipmentInfo required (see nestedTypes.ClassicShipmentInfoData); maps to lno, lrno, ocu, oci, dco, dci, tid, rid, lt, cno, did, tonw, sg. Strict V7.9: am must be 1. Return from sale not allowed for this pattern.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n- `SHIPMENT_COUNTRY_REQUIRED` (HTTP 200): origin/destination country missing\n- `SHIPMENT_COUNTRY_NOT_IN_CODING` (HTTP 200): country code unknown\n- `SHIPMENT_CITY_REQUIRED` (HTTP 200): Iran without city\n- `SHIPMENT_CITY_NOT_IN_CODING` (HTTP 200): city code unknown\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-1 petroleum refining/distribution invoices (pattern 9).",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/oilProducts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "oilProducts"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPattern 9: items[].vatBaseAmount optional, >= 0; a positive value is the VAT base (Body vba) instead of adis.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /api/invoice/commoditySecurities",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/commoditySecurities",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "commoditySecurities"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPattern 11: saleAnnNo required (1-30 digits, Header.asn); saleAnnDate required, not after dateTime (Header.asd as Unix day); invoiceSubject 4 not allowed; one item only; items[].amountAfterDiscount (integer rials > 0, the deal value of the announcement) or unitPrice required, amountAfterDiscount wins over floor(qty*unitPrice); vatRate must be 0; carat optional (0 = none; >0, <=1000, 2 decimals). settlement 3 sends the cash share as cash. The response's InvoiceApiReturnInfo carries exchangeAnnouncement. Strict V7.9 for pattern 11 depends on InvoiceRules.V79.Pattern11Enabled.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n- `V79_OUT_OF_PATTERN` (HTTP 200): contractCode, billNo, tax17, payments, items[].discount/otherTaxRate/govTaxRate/contractNo/currency fields given (InvoiceController.cs:1720-1730)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-1 insurance-service invoices (pattern 13).",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/insurance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "insurance"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPattern 13: insPolicyNo required 9-12 digits (Header.In); extInsPolicyNo optional 9-12 digits (Header.an).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-1 chain-sale invoices (pattern 14).",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/chainSale",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "chainSale"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPattern 14: one item only.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /api/invoice/jewelryEndUser",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/jewelryEndUser",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "jewelryEndUser"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nType 2, pattern 3: wage/profit/commission required as for jewelry; buyer handling as salesEndUser.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration of type-2 petroleum invoices (pattern 9), buyer optional.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/oilProductsEndUser",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "oilProductsEndUser"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nType 2, pattern 9: vatBaseAmount as oilProducts.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /api/invoice/insuranceEndUser",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/insuranceEndUser",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "insuranceEndUser"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nType 2, pattern 13: insPolicyNo/extInsPolicyNo as insurance.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Simple-model registration for any allowed invoice type and pattern given in the path.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/simple/type/:invoiceType/template/:template",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "simple",
                "type",
                ":invoiceType",
                "template",
                ":template"
              ],
              "query": [],
              "variable": [
                {
                  "key": "invoiceType",
                  "value": ""
                },
                {
                  "key": "template",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.invoice.send`.\n\nSame engine and rules as the named routes; the pattern rules of the chosen template apply (see the named route for each pattern).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid already used by this business (an InvoiceLog row with the uuid); result -2 (Models/ApiValidationError.cs:28)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): an active invoice of this business already has the internalId (member error)\n- `INVOICE_INTERNAL_ID_REPEATED_IN_REQUEST` (HTTP 200): the same internalId twice in one request (member error)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction refused: the chain's exchange sale announcement is confirmed (only cancellation allowed)\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 correction refused: the announcement status could not be read\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): an earlier send of the invoice has an unknown outcome (AmbiguousSendClaimFence)\n- `BUYER_TAX_FILE_NOT_FOUND` (HTTP 200): type-1 invoice to a natural buyer given by national code only: the organisation has no tax file\n- `BUYER_TAX_FILE_AMBIGUOUS` (HTTP 200): the buyer's national code has several tax files\n- `BUYER_TAX_FILE_SERVICE_OFF` (HTTP 200): the business's tax-file inquiry service is off or unpaid\n- `BUYER_TAX_FILE_LIMIT` (HTTP 200): more than five buyer national codes would be asked in one request (BuyerTaxFileBatchBudget; checkTypeTwoBuyers widens who is asked)\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): deadlock, lock timeout or dropped connection while saving; the invoice was not refused: inquire, then resend that invoice alone with a new uuid\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): correction/cancellation/return: the reference chain's status does not allow it (field carries the backend reason code); the backend's own code (for example INVOICE_REFERENCE_STATUS_UNAVAILABLE) when the status could not be taken (InvoiceController.Referral.cs:29-73)\n- `INVOICE_REFERRAL_BUYER_MISMATCH` (HTTP 200): backend save rule (MegaPayBackend/Models/Invoice/InvoiceReferralBuyerPolicy.cs:17). On the batch routes only the message reaches the client (AddBatchItemException keeps codes only for the codes listed above); editInvoice keeps an exception's Data[Code] (InvoiceController.Edit.cs:704-715). Whether this exception sets Data[Code] was not traced.\n- `INVOICE_RETURN_REFERENCE_INVALID` (HTTP 200): return reference not found among the business's active invoices, still sending, or not registered (InvoiceController.Return.cs:122-146)\n- `INVOICE_RETURN_ROW_INVALID` (HTTP 200): a return row does not match the reference (goods id, unit price, VAT rate, contract, quantity, discount)\n- `INVOICE_RETURN_ROW_AMBIGUOUS` (HTTP 200): returnRows=returned: the goods id matches reference rows of different kinds\n- `INVOICE_RETURN_NOTHING_RETURNED` (HTTP 200): no row is reduced (remaining mode) / no returned quantity (returned mode)\n- `INVOICE_RETURN_NEEDS_CANCELLATION` (HTTP 200): nothing would remain: send a cancellation instead\n- `INVOICE_RETURN_ROWS_MODE_INVALID` (HTTP 200): returnRows not remaining|returned, or given on a non-return (validator)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /api/invoice/sendInvoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/sendInvoice",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "sendInvoice"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nUses the backend's SendCompanyInvoicesAsync for the authenticated business. Lookup by internalId: InvoiceLog.LogInvoiceId = numeric value or InvoiceLog.Code = text.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 correction send refused\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 status unreadable\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): earlier send of unknown outcome\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"internalIds\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /api/invoice/cancelInvoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/cancelInvoice",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "cancelInvoice"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.cancel`.\n\nOnly a sent invoice with a TaxId (phase 3 or 4) is cancellable. The issue time is derived from the reference (ResolveCancellationDateTime). When the chain ends in a cancellation the organisation refused (definitive failure), it is removed the panel's way first and the new cancellation is registered from the restored member.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_DUPLICATE_REQUEST` (HTTP 200): uuid used before (result -2)\n- `INVOICE_INTERNAL_ID_DUPLICATE` (HTTP 200): cancelInternalId used before (result -2)\n- `PREVIOUS_CANCELLATION_UNSENT` (HTTP 200): the chain already ends in an unsent cancellation: send it with sendInvoice\n- `PREVIOUS_CANCELLATION_PENDING` (HTTP 200): the previous cancellation is in sending or has no final answer\n- `FAILED_CANCELLATION_DELETE_NOT_ALLOWED` (HTTP 200): removal of a refused cancellation refused by the panel rule\n- `INVOICE_NOT_FOUND` (HTTP 200): removal: cancellation not found\n- `FAILED_CANCELLATION_REMOVED_NEW_NOT_REGISTERED` (HTTP 200): a refused cancellation was removed (stays removed) but the new one was not registered; the following errors say why\n- `INVOICE_REFERENCE_ACTION_NOT_ALLOWED` (HTTP 200): chain status does not allow cancellation (or the backend's INVOICE_REFERENCE_* / EXCHANGE_ANNOUNCEMENT_* code)\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): replacement save refused\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): replacement save transient failure\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"internalId\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /api/invoice/editInvoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/editInvoice",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "editInvoice"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nRaw body is read strictly: duplicate property names and wrong JSON types (non-string token/uuid/internalId/taxId/confirmationToken/description, non-boolean send/confirmCorrection, non-object data) are errors. Fiscal memory, buyer description, print template and attachments stay the invoice's. Header.tins must be the business's economic code.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `V79_REQUIRED` (HTTP 200): strict V7.9 matrix: required field missing (only when InvoiceRules.V79.Enabled/StrictValidation are on for the company and pattern)\n- `V79_OUT_OF_PATTERN` (HTTP 200): field outside the pattern (matrix, or pattern 11 lists regardless of the flags)\n- `V79_CONTEXT_INVALID` (HTTP 200): type/pattern/subject/settlement/buyer combination invalid per the V7.9 engine\n- `V79_BODY_MAX_ONE` (HTTP 200): pattern 11 issue (always) or pattern 14 under strict V7.9: more than one Body row\n- `V79_AMOUNT_MUST_BE_ONE` (HTTP 200): strict V7.9, patterns 6 and 8: am must be 1\n- `V79_VAT_RATE_MUST_BE_ZERO` (HTTP 200): pattern 11: vra must be 0\n- `V79_VAT_AMOUNT_MUST_BE_ZERO` (HTTP 200): pattern 11: vam must be 0\n- `V79_SUBJECT_NOT_ALLOWED` (HTTP 200): pattern 11: ins=4 not allowed\n- `V79_CANCELLATION_BODY_OUT_OF_PATTERN` (HTTP 200): strict V7.9: cancellation with Body rows (normally the rows are dropped first with a warning)\n- `ARTICLE9_REGISTER_WITHOUT_SEND_RULE` (HTTP 200): indati2m sent without insr=1\n- `ARTICLE9_FEATURE_DISABLED` (HTTP 200): insr=1 while InvoiceRules.V79.Article9Enabled is off for the company\n- `ARTICLE9_INVOICE_TYPE_NOT_ALLOWED` (HTTP 200): Article 9 only for type 1 and 2\n- `ARTICLE9_INVOICE_SUBJECT_NOT_ALLOWED` (HTTP 200): Article 9 subject not valid\n- `ARTICLE9_REGISTER_REQUIRED` (HTTP 200): insr=1 without indati2m\n- `ARTICLE9_REGISTER_BEFORE_ISSUE` (HTTP 200): indati2m before indatim\n- `ARTICLE9_REGISTER_IN_FUTURE` (HTTP 200): indati2m in the future\n- `SHIPMENT_COUNTRY_REQUIRED` (HTTP 200): pattern 8: ocu/dco missing (simple model) — ShipmentLocationCoding\n- `SHIPMENT_COUNTRY_NOT_IN_CODING` (HTTP 200): pattern 8: country code not in the V7.9 appendix\n- `SHIPMENT_CITY_REQUIRED` (HTTP 200): pattern 8: Iran (033) needs a city code\n- `SHIPMENT_CITY_NOT_IN_CODING` (HTTP 200): pattern 8: city code not in the appendix\n- `INVOICE_EDIT_DUPLICATE_REQUEST` (HTTP 200): uuid used before (result -2)\n- `INVOICE_NOT_FOUND` (HTTP 200): no invoice of the business with the internalId/taxId\n- `INVOICE_EDIT_NOT_CURRENT` (HTTP 200): not the chain's current active version, or a state that cannot be edited\n- `INVOICE_EDIT_CANCELLED` (HTTP 200): invoice cancelled\n- `INVOICE_EDIT_CANCELLATION` (HTTP 200): a cancellation invoice\n- `INVOICE_EDIT_SEND_IN_PROGRESS` (HTTP 200): in the send queue\n- `INVOICE_EDIT_RESULT_PENDING` (HTTP 200): sent, result not known\n- `INVOICE_EDIT_REFERENCE_NOT_ALLOWED` (HTTP 200): chain preparation refused (or the backend's own code, e.g. INVOICE_REFERENCE_STATUS_UNAVAILABLE)\n- `EXCHANGE_ANNOUNCEMENT_CONFIRMED` (HTTP 200): pattern-11 announcement confirmed: only cancellation\n- `EXCHANGE_ANNOUNCEMENT_STATUS_UNAVAILABLE` (HTTP 200): pattern-11 status unreadable\n- `INVOICE_EDIT_FIELD_NOT_CORRECTABLE` (HTTP 200): type, pattern, goods id or VAT rate differs from the reference (field names the field)\n- `INVOICE_CORRECTION_CONFIRMATION_REQUIRED` (HTTP 200): the change issues a correction and no consent was given; edit.reason FIELDS_CHANGED | SETTLEMENT_CHANGED | CHANGES_BESIDES_PAYMENT\n- `INVOICE_EDIT_CONFIRMATION_INVALID` (HTTP 200): malformed confirmationToken\n- `INVOICE_EDIT_CONFIRMATION_EXPIRED` (HTTP 200): token older than 15 minutes\n- `INVOICE_EDIT_CONFIRMATION_STALE` (HTTP 200): invoice changed since the token\n- `INVOICE_EDIT_CONFIRMATION_MISMATCH` (HTTP 200): content differs from the confirmed content\n- `INVOICE_SEND_RESULT_UNKNOWN` (HTTP 200): save refused\n- `INVOICE_DATABASE_TEMPORARILY_UNAVAILABLE` (HTTP 200): transient save failure\n- `INVOICE_EDIT_INTERNAL_ERROR` (HTTP 200): unexpected failure or unreadable body\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Edits an invoice with a full simple-model invoice; type and pattern stay the invoice's.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/simple/editInvoice",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "simple",
                "editInvoice"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nUnlike the simple batch routes, the converted JSON's validation errors keep code, field and ruleVersion here (InvoiceController.Edit.cs:979-989). Body binding is the model binder's (no strict raw reading).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `V79_REQUIRED` (HTTP 200): strict V7.9 matrix: required field missing (only when InvoiceRules.V79.Enabled/StrictValidation are on for the company and pattern)\n- `V79_OUT_OF_PATTERN` (HTTP 200): field outside the pattern (matrix, or pattern 11 lists regardless of the flags)\n- `V79_CONTEXT_INVALID` (HTTP 200): type/pattern/subject/settlement/buyer combination invalid per the V7.9 engine\n- `V79_BODY_MAX_ONE` (HTTP 200): pattern 11 issue (always) or pattern 14 under strict V7.9: more than one Body row\n- `V79_AMOUNT_MUST_BE_ONE` (HTTP 200): strict V7.9, patterns 6 and 8: am must be 1\n- `V79_VAT_RATE_MUST_BE_ZERO` (HTTP 200): pattern 11: vra must be 0\n- `V79_VAT_AMOUNT_MUST_BE_ZERO` (HTTP 200): pattern 11: vam must be 0\n- `V79_SUBJECT_NOT_ALLOWED` (HTTP 200): pattern 11: ins=4 not allowed\n- `V79_CANCELLATION_BODY_OUT_OF_PATTERN` (HTTP 200): strict V7.9: cancellation with Body rows (normally the rows are dropped first with a warning)\n- `ARTICLE9_REGISTER_WITHOUT_SEND_RULE` (HTTP 200): indati2m sent without insr=1\n- `ARTICLE9_FEATURE_DISABLED` (HTTP 200): insr=1 while InvoiceRules.V79.Article9Enabled is off for the company\n- `ARTICLE9_INVOICE_TYPE_NOT_ALLOWED` (HTTP 200): Article 9 only for type 1 and 2\n- `ARTICLE9_INVOICE_SUBJECT_NOT_ALLOWED` (HTTP 200): Article 9 subject not valid\n- `ARTICLE9_REGISTER_REQUIRED` (HTTP 200): insr=1 without indati2m\n- `ARTICLE9_REGISTER_BEFORE_ISSUE` (HTTP 200): indati2m before indatim\n- `ARTICLE9_REGISTER_IN_FUTURE` (HTTP 200): indati2m in the future\n- `SHIPMENT_COUNTRY_REQUIRED` (HTTP 200): pattern 8: ocu/dco missing (simple model) — ShipmentLocationCoding\n- `SHIPMENT_COUNTRY_NOT_IN_CODING` (HTTP 200): pattern 8: country code not in the V7.9 appendix\n- `SHIPMENT_CITY_REQUIRED` (HTTP 200): pattern 8: Iran (033) needs a city code\n- `SHIPMENT_CITY_NOT_IN_CODING` (HTTP 200): pattern 8: city code not in the appendix\n- `(as /api/invoice/editInvoice)` (HTTP 200): same INVOICE_EDIT_* and confirmation codes\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"data\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Reads the exchange sale announcement confirmation status of a pattern-11 invoice chain.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/inquiryExchangeAnnouncement",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "inquiryExchangeAnnouncement"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\ncanChange is forced false unless the token has v2.invoice.send (or is a legacy key). The chain's latest member is followed, never onto a cancellation.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `EXCHANGE_ANNOUNCEMENT_REQUEST_INVALID` (HTTP 200): neither or both of internalId/taxId\n- `INVOICE_NOT_FOUND` (HTTP 200): no such invoice for the business\n- `EXCHANGE_ANNOUNCEMENT_NOT_APPLICABLE` (HTTP 200): not a pattern-11 chain (backend InvoiceExchangeAnnouncementException; codes of InvoiceExchangeAnnouncementCodes pass through)\n- `EXCHANGE_ANNOUNCEMENT_FORBIDDEN` (HTTP 200): backend refusal\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Records manually whether a pattern-11 chain's exchange sale announcement is confirmed.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/exchangeAnnouncement",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "exchangeAnnouncement"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nChannel recorded as ApiV2; actor client id (or legacy-company:{id}).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `EXCHANGE_ANNOUNCEMENT_REQUEST_INVALID` (HTTP 200): target, confirmed, note length or expectedVersion invalid\n- `INVOICE_NOT_FOUND` (HTTP 200): no such invoice\n- `EXCHANGE_ANNOUNCEMENT_NOTE_REQUIRED` (HTTP 200): backend requires a note\n- `EXCHANGE_ANNOUNCEMENT_VERSION_CONFLICT` (HTTP 200): expectedVersion stale\n- `EXCHANGE_ANNOUNCEMENT_NOT_APPLICABLE` (HTTP 200): not a pattern-11 chain\n- `EXCHANGE_ANNOUNCEMENT_FORBIDDEN` (HTTP 200): backend refusal\n- `SUPPORT_SESSION_READ_ONLY` (HTTP 200): backend code (not expected from API v2)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"confirmed\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /api/invoice/registerPayment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/registerPayment",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "registerPayment"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nThe new payments are saved in place on a new version with the same TaxId (InvoicePaymentRegistrationFacade.AddPaymentsAsync); rows the organisation holds are locked.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_PAYMENT_REGISTRATION_DISABLED` (HTTP 200): payment registration switched off\n- `INVOICE_PAYMENT_DUPLICATE_REQUEST` (HTTP 200): uuid used before (result -2)\n- `INVOICE_NOT_FOUND` (HTTP 200): no invoice with the internalId\n- `INVOICE_PAYMENT_NOT_APPLICABLE` (HTTP 200): invoice not eligible; field carries INVOICE_CANCELLED | INVOICE_NOT_SENT | INVOICE_NOT_APPROVED | INVOICE_WITHOUT_TAX_ID | PATTERN_WITHOUT_PAYMENTS | CASH_SETTLEMENT (InvoicePaymentTaxRegistrationPolicy.cs:150-176; list may not be exhaustive)\n- `INVOICE_PAYMENT_DATE_BEFORE_ISSUE` (HTTP 200): payment before the invoice date\n- `INVOICE_PAYMENT_DATE_IN_FUTURE` (HTTP 200): payment in the future (official error 10013)\n- `INVOICE_PAYMENT_ROW_LOCKED` (HTTP 200): save touched a row the organisation holds\n- `INVOICE_PAYMENT_INTERNAL_ERROR` (HTTP 200): unexpected failure\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"uuid\": \"\",\n  \"internalId\": \"\",\n  \"payments\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /api/invoice/inquiryPayment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/inquiryPayment",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "inquiryPayment"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nNo live inquiry (liveInquiry false).\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 200): legacy key or JWT refused by the IP rule inside the controller: result -1, errors[0].code IP_NOT_ALLOWED (a JWT is normally stopped earlier by the IP gate with HTTP 403)\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate (Services/ApiClientIpGate.cs) before the controller, customer JWT only\n- `INVOICE_NOT_FOUND` (HTTP 200): no invoice\n- `INVOICE_PAYMENT_INTERNAL_ERROR` (HTTP 200): unexpected failure\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"internalId\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Describes the current state of an invoice named by internalId.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/inquiryInternalId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "inquiryInternalId"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nThe chain's latest version is described (LatestInvoiceId). Live inquiry: a registered invoice (phase 3) whose buyer status is empty or AWAITING_REACTION is first asked again through the panel's status inquiry (TaxV2Host) and the refreshed row is described.\n\nError codes:\n- `IP_NOT_ALLOWED` (HTTP 403): IP gate\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"internalId\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Batch form of inquiryInternalId.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/inquiryInternalIds",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "inquiryInternalIds"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nEach id may trigger a live inquiry.\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"internalIds\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Describes an invoice named by its serial number.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/inquiryNo",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "inquiryNo"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nPanel proformas are excluded; follows Invoice2 (latest version); internalId is not filled; live inquiry as inquiryInternalId.\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"no\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Batch form of inquiryNo.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/inquiryNos",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "inquiryNos"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nSequential lookups.\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"nos\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Describes an invoice of the business named by its tax id.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/inquiryTaxId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "inquiryTaxId"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nSeveral versions can share a TaxId; the first match is taken and its LatestInvoiceId followed. internalId not filled. Live inquiry as inquiryInternalId.\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"taxId\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Batch form of inquiryTaxId.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/invoice/inquiryTaxIds",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "invoice",
                "inquiryTaxIds"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"taxIds\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "کارگزاران",
      "item": [
        {
          "name": "GET /api/v2/partner/profile",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/profile",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "profile"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "POST /api/v2/partner/onboarding-sessions",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/onboarding-sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "onboarding-sessions"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nAnswer status 201. Events onboarding.session.* follow by webhook and GET events.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `validation_failed` (HTTP 400): fieldErrors on body, economicCode (11/14 digits), nationalId (10/11/12 digits), mobile (09 + 9 digits), reference (<=100 of letters, digits . _ - : / # @), idempotencyKey (8-64 of Latin letters, digits . _ - :), returnUrl (https on an allowed origin)\n- `rate_limited` (HTTP 429): sessions in the last hour >= partner.HourlySessionLimit (default 100); envelope status TOO_MANY_REQUESTS\n- `idempotency_conflict` (HTTP 409): the key was used for a request with other data\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"(see nestedTypes.PartnerSessionCreateRequest)\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Lists the partner's sign-up sessions, newest first.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/onboarding-sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "onboarding-sessions"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "reference",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "pageSize",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nItems carry no url.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `validation_failed` (HTTP 400): status unknown, from/to not ISO-8601\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Reads one sign-up session of the partner.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/onboarding-sessions/:sessionId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "onboarding-sessions",
                ":sessionId"
              ],
              "query": [],
              "variable": [
                {
                  "key": "sessionId",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `not_found` (HTTP 404): no such session for this partner\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Issues a new link for an open session (the old link stops working).",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/onboarding-sessions/:sessionId/link",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "onboarding-sessions",
                ":sessionId",
                "link"
              ],
              "query": [],
              "variable": [
                {
                  "key": "sessionId",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nBody optional.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `not_found` (HTTP 404): no such session\n- `session_closed` (HTTP 409): completed, expired or cancelled\n- `session_business_ready` (HTTP 409): panel already made\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Cancels an open sign-up session.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/onboarding-sessions/:sessionId/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "onboarding-sessions",
                ":sessionId",
                "cancel"
              ],
              "query": [],
              "variable": [
                {
                  "key": "sessionId",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nEvent onboarding.session.cancelled.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `not_found` (HTTP 404): no such session\n- `session_business_ready` (HTTP 409): business already made or completed\n- `session_closed` (HTTP 409): expired\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "POST /api/v2/partner/onboarding-sessions/{sessionId}/credentials",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/onboarding-sessions/:sessionId/credentials",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "onboarding-sessions",
                ":sessionId",
                "credentials"
              ],
              "query": [],
              "variable": [
                {
                  "key": "sessionId",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `not_found` (HTTP 404): no such session\n- `credentials_not_requested` (HTTP 403): session made without requestCredentials\n- `business_not_ready` (HTTP 409): panel not made yet\n- `consent_missing` (HTTP 403): owner did not agree\n- `credentials_already_claimed` (HTTP 409): claimed before (or made concurrently)\n- `business_inactive` (HTTP 409): business inactive\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "GET /api/v2/partner/events",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "events"
              ],
              "query": [
                {
                  "key": "after",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nEvent types: onboarding.session.opened, onboarding.session.business_ready, onboarding.session.completed, onboarding.session.expired, onboarding.session.cancelled, ping (PartnerRules.cs:172-177). Webhook signature: Standard Webhooks (comment PartnerV2Controller.cs:27).\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Queues a ping event to the partner's webhook (also visible in the feed).",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/webhook/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "webhook",
                "test"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\ndata.data = {message, partnerCompanyId}.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "GET /api/v2/partner/reports/overview",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/reports/overview",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "reports",
                "overview"
              ],
              "query": [
                {
                  "key": "period",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "key",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nRead with refresh=false (cached figures).\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `partner_not_found` (HTTP 404): the partner is not in «همکاران API» (PartnerWorkspaceService.cs:78, 143-146)\n- `period_invalid` (HTTP 400): period/key/from/to refused (InvoiceReportPeriods.Resolve; fieldErrors period)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "The businesses the partner brought, with their invoice figures and health, one page.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/reports/businesses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "reports",
                "businesses"
              ],
              "query": [
                {
                  "key": "period",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "key",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "health",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "sort",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "pageSize",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `partner_not_found` (HTTP 404): the partner is not in «همکاران API» (PartnerWorkspaceService.cs:78, 143-146)\n- `period_invalid` (HTTP 400): period/key/from/to refused (InvoiceReportPeriods.Resolve; fieldErrors period)\n- `validation_failed` (HTTP 400): health or sort unknown\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Errors of the saved invoices of the partner's businesses, by reason and day.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/reports/errors",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "reports",
                "errors"
              ],
              "query": [
                {
                  "key": "period",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "key",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `partner_not_found` (HTTP 404): the partner is not in «همکاران API» (PartnerWorkspaceService.cs:78, 143-146)\n- `period_invalid` (HTTP 400): period/key/from/to refused (InvoiceReportPeriods.Resolve; fieldErrors period)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Requests API v2 refused before saving (by field, day, latest with traceId and internalId).",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/reports/rejections",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "reports",
                "rejections"
              ],
              "query": [
                {
                  "key": "period",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "key",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `partner_not_found` (HTTP 404): the partner is not in «همکاران API» (PartnerWorkspaceService.cs:78, 143-146)\n- `period_invalid` (HTTP 400): period/key/from/to refused (InvoiceReportPeriods.Resolve; fieldErrors period)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Sign-up funnel for a period: stages, conversion, stalled sessions, errors by day.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/reports/onboarding",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "reports",
                "onboarding"
              ],
              "query": [
                {
                  "key": "period",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "key",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `partner_not_found` (HTTP 404): the partner is not in «همکاران API» (PartnerWorkspaceService.cs:78, 143-146)\n- `period_invalid` (HTTP 400): period/key/from/to refused (InvoiceReportPeriods.Resolve; fieldErrors period)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Invoices per business per Jalali month.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/reports/usage",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "reports",
                "usage"
              ],
              "query": [
                {
                  "key": "fromMonth",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "toMonth",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `partner_not_found` (HTTP 404): the partner is not in «همکاران API» (PartnerWorkspaceService.cs:78, 143-146)\n- `period_invalid` (HTTP 400): period/key/from/to refused (InvoiceReportPeriods.Resolve; fieldErrors period)\n- `validation_failed` (HTTP 400): month format, from after to, more than 12 months, to in the future, before 1398\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "The monthly cooperation report (overview, funnel, businesses, errors) of one month.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/reports/monthly",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "reports",
                "monthly"
              ],
              "query": [
                {
                  "key": "month",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `partner_not_found` (HTTP 404): the partner is not in «همکاران API» (PartnerWorkspaceService.cs:78, 143-146)\n- `period_invalid` (HTTP 400): period/key/from/to refused (InvoiceReportPeriods.Resolve; fieldErrors period)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "GET /api/v2/partner/reports/invoices",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/reports/invoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "reports",
                "invoices"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "",
                  "disabled": false
                },
                {
                  "key": "businessId",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `partner_not_found` (HTTP 404): the partner is not in «همکاران API» (PartnerWorkspaceService.cs:78, 143-146)\n- `period_invalid` (HTTP 400): period/key/from/to refused (InvoiceReportPeriods.Resolve; fieldErrors period)\n- `validation_failed` (HTTP 400): q empty\n- `business_not_yours` (HTTP 403): businessId not brought by the partner\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "GET /api/v2/partner/reports/health",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/partner/reports/health",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "partner",
                "reports",
                "health"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid/expired token, or a static key (partner keys are refused)\n- `forbidden` (HTTP 403): a customer token, or a partner token without v2.register (message names v2.register)\n- `partner_not_registered` (HTTP 403): the business is not in «همکاران API» (PartnerOnboardingService.RequirePartner, PartnerOnboardingService.cs:48-56)\n- `partner_suspended` (HTTP 403): partner suspended\n- `capability_disabled` (HTTP 403): the route's capability (hostedOnboarding, credentialHandover) is off\n- `service_unavailable` (HTTP 503): database unreachable (SqlException, EntityException, TimeoutException)\n- `partner_not_found` (HTTP 404): the partner is not in «همکاران API» (PartnerWorkspaceService.cs:78, 143-146)\n- `period_invalid` (HTTP 400): period/key/from/to refused (InvoiceReportPeriods.Resolve; fieldErrors period)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "کارپوشه مالیاتی",
      "item": [
        {
          "name": "PUT /api/v2/tax-workspace/invoices/bulk",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/invoices/bulk",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "invoices",
                "bulk"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nEach operation's period/issuanceDate either both given or both derived from the 22-character TaxId. Requires the delegation permission invoice.sell:manage (sales kinds) or invoice.buy:manage (purchase kinds).\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `unsupported_invoice_action` (HTTP 404): kind not purchase | virtual-purchase | sales | virtual-sales\n- `invalid_bulk_shape` (HTTP 400): both operations and taxIds\n- `invalid_bulk_size` (HTTP 400): 0 or more than TaxWorkspace.ExcelUploadMaxRows (500) operations\n- `tax_workspace_invoice_bulk_action_limit_exceeded` (HTTP 409): more than TaxWorkspace.InvoiceBulkMaxActions (20) executable actions\n- `invoice_context_lookup_limit_exceeded`: too many period/day lookups (status not traced)\n- `(item) invalid_identifier | no_action | invalid_action | invoice_context_not_verified | approve_has_reject_data | invalid_reject_reason | other_description_required | duplicate_identifier | invoice_not_awaiting_reaction | invoice_not_virtual_sale | invoice_virtual_broker_side` (HTTP 200): per item in results[] (status VALIDATION_ERROR, SKIPPED, NOT_ACTIONABLE ...)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"(see nestedTypes.TaxWorkspaceBulkInvoiceRequestDto)\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Approves or rejects third-party brokerage contracts awaiting the business's reaction.",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/brokerage-contracts/bulk",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "brokerage-contracts",
                "bulk"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nallForCurrentEconomicNumber pages the AWAITING_REACTION contracts (up to ExcelExportMaxRows).\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_contract_reactions_disabled`: TaxWorkspace.ContractReactionsEnabled off (repository false); status not traced\n- `tax_workspace_contract_permission_missing` (HTTP 403): delegation lacks TaxWorkspace.ContractReactionPermission (contract.brokerage:manage)\n- `invalid_bulk_shape` (HTTP 400): more than one selector\n- `invalid_action` (HTTP 400): allForCurrentEconomicNumber with action not APPROVE/REJECT\n- `economic_number_context_mismatch` (HTTP 403): economicNumber differs from the business's\n- `no_actionable_contracts` (HTTP 409): nothing awaits reaction (all mode)\n- `invalid_bulk_size` (HTTP 400): 0 or more than 500\n- `tax_workspace_contract_bulk_action_limit_exceeded` (HTTP 409): more than TaxWorkspace.ContractBulkMaxActions (20)\n- `(item) contract_not_found | contract_number_ambiguous | contract_context_lookup_failed | duplicate_identifier | invalid_contract_id | invalid_contract_number | contract_not_actionable` (HTTP 200): per item\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"(see nestedTypes.TaxWorkspaceBulkContractRequestDto)\": {}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "GET /api/v2/tax-workspace/invoices/{kind}",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/invoices/:kind",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "invoices",
                ":kind"
              ],
              "query": [
                {
                  "key": "(see nestedTypes.TaxWorkspaceInvoiceFilter)",
                  "value": "",
                  "disabled": false
                }
              ],
              "variable": [
                {
                  "key": "kind",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.invoice.read`.\n\nDelegation permission invoice.buy:view / invoice.sell:view / invoice.virtual.buy:view / invoice.virtual.sell:view. actionAllowed is set on sales and purchase rows. buyerRole is applied locally if the organisation refuses it.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `unsupported_invoice_kind` (HTTP 404): unknown kind\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "GET /api/v2/tax-workspace/invoices/{kind}/virtual-as-broker-client",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/invoices/:kind/virtual-as-broker-client",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "invoices",
                ":kind",
                "virtual-as-broker-client"
              ],
              "query": [
                {
                  "key": "(see nestedTypes.TaxWorkspaceInvoiceFilter)",
                  "value": "",
                  "disabled": false
                }
              ],
              "variable": [
                {
                  "key": "kind",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.invoice.read`.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `unsupported_invoice_kind` (HTTP 404): kind not sales/purchase\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "One page of the business's third-party brokerage contracts.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/brokerage-contracts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "brokerage-contracts"
              ],
              "query": [
                {
                  "key": "(see nestedTypes.TaxWorkspaceContractFilter)",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nDelegation permission contract.brokerage:view.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Exports the invoice list for the filter as an Excel file.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/invoices/:kind/excel/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "invoices",
                ":kind",
                "excel",
                "export"
              ],
              "query": [
                {
                  "key": "(see nestedTypes.TaxWorkspaceInvoiceFilter)",
                  "value": "",
                  "disabled": false
                }
              ],
              "variable": [
                {
                  "key": "kind",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.invoice.read`.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_excel_invalid_content_type` (HTTP 415): upload not multipart/form-data, or the part's Content-Type is not xlsx/octet-stream\n- `tax_workspace_excel_content_length_required` (HTTP 411): no Content-Length\n- `tax_workspace_excel_file_too_large` (HTTP 413): over ExcelUploadMaxBytes (+1 MiB multipart overhead for the request)\n- `tax_workspace_excel_file_required` (HTTP 400): not exactly one file part named file\n- `tax_workspace_excel_invalid_extension` (HTTP 415): file name not .xlsx\n- `tax_workspace_excel_row_limit_exceeded` (HTTP 413): more rows than ExcelUploadMaxRows\n- `tax_workspace_excel_content_too_large` (HTTP 413): cell content over the limits\n- `tax_workspace_excel_preview_payload_too_large` (HTTP 413): protected preview payload too large\n- `tax_workspace_excel_invalid_package | tax_workspace_excel_invalid_signature | tax_workspace_excel_encrypted_or_invalid | tax_workspace_excel_macro_or_encryption_not_allowed | tax_workspace_excel_formula_not_allowed | tax_workspace_excel_data_sheet_missing | tax_workspace_excel_header_missing | tax_workspace_excel_duplicate_header | tax_workspace_excel_unexpected_header | tax_workspace_excel_header_too_long | tax_workspace_excel_too_many_columns | tax_workspace_excel_uncompressed_limit_exceeded | tax_workspace_excel_zip_entry_limit_exceeded | tax_workspace_excel_zip_entry_name_too_long | invalid_excel_row`: file content refused (TaxWorkspaceExcelService.cs; statuses not traced one by one)\n- `invalid_excel_preview_token` (HTTP 400): malformed token (403 when bound to another actor)\n- `tax_workspace_excel_token_expired` (HTTP 409): preview token expired\n- `tax_workspace_excel_token_context_mismatch` (HTTP 403): token of another business/client/kind\n- `tax_workspace_excel_execution_claim_conflict` (HTTP 409): execution already claimed\n- `tax_workspace_excel_execution_in_progress` (HTTP 409): execution running\n- `tax_workspace_excel_execution_outcome_unknown` (HTTP 409): earlier execution's outcome unknown\n- `tax_workspace_excel_result_expired` (HTTP 409): result past retention\n- `tax_workspace_excel_export_row_limit_exceeded` (HTTP 409): export over ExcelExportMaxRows\n- `tax_workspace_excel_empty` (HTTP 503): generated file empty\n- `tax_workspace_invalid_service_result` (HTTP 503): service answered neither file nor envelope\n- `unsupported_invoice_kind` (HTTP 404): unknown kind\n- `unsupported_invoice_action` (HTTP 404): kind without reactions\n- `tax_workspace_excel_unavailable` (HTTP 503): a file the server made (export, template, result) could not be prepared; try again, then send correlationId to support (1.0.0.209; it was the 415 code before)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Downloads the empty Excel template for invoice reactions of a kind.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/invoices/:kind/excel/template",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "invoices",
                ":kind",
                "excel",
                "template"
              ],
              "query": [],
              "variable": [
                {
                  "key": "kind",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.invoice.read`.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_excel_invalid_content_type` (HTTP 415): upload not multipart/form-data, or the part's Content-Type is not xlsx/octet-stream\n- `tax_workspace_excel_content_length_required` (HTTP 411): no Content-Length\n- `tax_workspace_excel_file_too_large` (HTTP 413): over ExcelUploadMaxBytes (+1 MiB multipart overhead for the request)\n- `tax_workspace_excel_file_required` (HTTP 400): not exactly one file part named file\n- `tax_workspace_excel_invalid_extension` (HTTP 415): file name not .xlsx\n- `tax_workspace_excel_row_limit_exceeded` (HTTP 413): more rows than ExcelUploadMaxRows\n- `tax_workspace_excel_content_too_large` (HTTP 413): cell content over the limits\n- `tax_workspace_excel_preview_payload_too_large` (HTTP 413): protected preview payload too large\n- `tax_workspace_excel_invalid_package | tax_workspace_excel_invalid_signature | tax_workspace_excel_encrypted_or_invalid | tax_workspace_excel_macro_or_encryption_not_allowed | tax_workspace_excel_formula_not_allowed | tax_workspace_excel_data_sheet_missing | tax_workspace_excel_header_missing | tax_workspace_excel_duplicate_header | tax_workspace_excel_unexpected_header | tax_workspace_excel_header_too_long | tax_workspace_excel_too_many_columns | tax_workspace_excel_uncompressed_limit_exceeded | tax_workspace_excel_zip_entry_limit_exceeded | tax_workspace_excel_zip_entry_name_too_long | invalid_excel_row`: file content refused (TaxWorkspaceExcelService.cs; statuses not traced one by one)\n- `invalid_excel_preview_token` (HTTP 400): malformed token (403 when bound to another actor)\n- `tax_workspace_excel_token_expired` (HTTP 409): preview token expired\n- `tax_workspace_excel_token_context_mismatch` (HTTP 403): token of another business/client/kind\n- `tax_workspace_excel_execution_claim_conflict` (HTTP 409): execution already claimed\n- `tax_workspace_excel_execution_in_progress` (HTTP 409): execution running\n- `tax_workspace_excel_execution_outcome_unknown` (HTTP 409): earlier execution's outcome unknown\n- `tax_workspace_excel_result_expired` (HTTP 409): result past retention\n- `tax_workspace_excel_export_row_limit_exceeded` (HTTP 409): export over ExcelExportMaxRows\n- `tax_workspace_excel_empty` (HTTP 503): generated file empty\n- `tax_workspace_invalid_service_result` (HTTP 503): service answered neither file nor envelope\n- `unsupported_invoice_kind` (HTTP 404): unknown kind\n- `unsupported_invoice_action` (HTTP 404): kind without reactions\n- `tax_workspace_excel_unavailable` (HTTP 503): a file the server made (export, template, result) could not be prepared; try again, then send correlationId to support (1.0.0.209; it was the 415 code before)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Uploads a filled reaction Excel file and answers a checked preview with a preview token.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/invoices/:kind/excel/preview",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "invoices",
                ":kind",
                "excel",
                "preview"
              ],
              "query": [],
              "variable": [
                {
                  "key": "kind",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.invoice.send`.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_excel_invalid_content_type` (HTTP 415): upload not multipart/form-data, or the part's Content-Type is not xlsx/octet-stream\n- `tax_workspace_excel_content_length_required` (HTTP 411): no Content-Length\n- `tax_workspace_excel_file_too_large` (HTTP 413): over ExcelUploadMaxBytes (+1 MiB multipart overhead for the request)\n- `tax_workspace_excel_file_required` (HTTP 400): not exactly one file part named file\n- `tax_workspace_excel_invalid_extension` (HTTP 415): file name not .xlsx\n- `tax_workspace_excel_row_limit_exceeded` (HTTP 413): more rows than ExcelUploadMaxRows\n- `tax_workspace_excel_content_too_large` (HTTP 413): cell content over the limits\n- `tax_workspace_excel_preview_payload_too_large` (HTTP 413): protected preview payload too large\n- `tax_workspace_excel_invalid_package | tax_workspace_excel_invalid_signature | tax_workspace_excel_encrypted_or_invalid | tax_workspace_excel_macro_or_encryption_not_allowed | tax_workspace_excel_formula_not_allowed | tax_workspace_excel_data_sheet_missing | tax_workspace_excel_header_missing | tax_workspace_excel_duplicate_header | tax_workspace_excel_unexpected_header | tax_workspace_excel_header_too_long | tax_workspace_excel_too_many_columns | tax_workspace_excel_uncompressed_limit_exceeded | tax_workspace_excel_zip_entry_limit_exceeded | tax_workspace_excel_zip_entry_name_too_long | invalid_excel_row`: file content refused (TaxWorkspaceExcelService.cs; statuses not traced one by one)\n- `invalid_excel_preview_token` (HTTP 400): malformed token (403 when bound to another actor)\n- `tax_workspace_excel_token_expired` (HTTP 409): preview token expired\n- `tax_workspace_excel_token_context_mismatch` (HTTP 403): token of another business/client/kind\n- `tax_workspace_excel_execution_claim_conflict` (HTTP 409): execution already claimed\n- `tax_workspace_excel_execution_in_progress` (HTTP 409): execution running\n- `tax_workspace_excel_execution_outcome_unknown` (HTTP 409): earlier execution's outcome unknown\n- `tax_workspace_excel_result_expired` (HTTP 409): result past retention\n- `tax_workspace_excel_export_row_limit_exceeded` (HTTP 409): export over ExcelExportMaxRows\n- `tax_workspace_excel_empty` (HTTP 503): generated file empty\n- `tax_workspace_invalid_service_result` (HTTP 503): service answered neither file nor envelope\n- `unsupported_invoice_kind` (HTTP 404): unknown kind\n- `unsupported_invoice_action` (HTTP 404): kind without reactions\n- `tax_workspace_excel_unavailable` (HTTP 503): a file the server made (export, template, result) could not be prepared; try again, then send correlationId to support (1.0.0.209; it was the 415 code before)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Executes the reactions of a previewed Excel file.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/invoices/:kind/excel/execute",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "invoices",
                ":kind",
                "excel",
                "execute"
              ],
              "query": [],
              "variable": [
                {
                  "key": "kind",
                  "value": ""
                }
              ]
            },
            "description": "Scope: `v2.invoice.send`.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_excel_invalid_content_type` (HTTP 415): upload not multipart/form-data, or the part's Content-Type is not xlsx/octet-stream\n- `tax_workspace_excel_content_length_required` (HTTP 411): no Content-Length\n- `tax_workspace_excel_file_too_large` (HTTP 413): over ExcelUploadMaxBytes (+1 MiB multipart overhead for the request)\n- `tax_workspace_excel_file_required` (HTTP 400): not exactly one file part named file\n- `tax_workspace_excel_invalid_extension` (HTTP 415): file name not .xlsx\n- `tax_workspace_excel_row_limit_exceeded` (HTTP 413): more rows than ExcelUploadMaxRows\n- `tax_workspace_excel_content_too_large` (HTTP 413): cell content over the limits\n- `tax_workspace_excel_preview_payload_too_large` (HTTP 413): protected preview payload too large\n- `tax_workspace_excel_invalid_package | tax_workspace_excel_invalid_signature | tax_workspace_excel_encrypted_or_invalid | tax_workspace_excel_macro_or_encryption_not_allowed | tax_workspace_excel_formula_not_allowed | tax_workspace_excel_data_sheet_missing | tax_workspace_excel_header_missing | tax_workspace_excel_duplicate_header | tax_workspace_excel_unexpected_header | tax_workspace_excel_header_too_long | tax_workspace_excel_too_many_columns | tax_workspace_excel_uncompressed_limit_exceeded | tax_workspace_excel_zip_entry_limit_exceeded | tax_workspace_excel_zip_entry_name_too_long | invalid_excel_row`: file content refused (TaxWorkspaceExcelService.cs; statuses not traced one by one)\n- `invalid_excel_preview_token` (HTTP 400): malformed token (403 when bound to another actor)\n- `tax_workspace_excel_token_expired` (HTTP 409): preview token expired\n- `tax_workspace_excel_token_context_mismatch` (HTTP 403): token of another business/client/kind\n- `tax_workspace_excel_execution_claim_conflict` (HTTP 409): execution already claimed\n- `tax_workspace_excel_execution_in_progress` (HTTP 409): execution running\n- `tax_workspace_excel_execution_outcome_unknown` (HTTP 409): earlier execution's outcome unknown\n- `tax_workspace_excel_result_expired` (HTTP 409): result past retention\n- `tax_workspace_excel_export_row_limit_exceeded` (HTTP 409): export over ExcelExportMaxRows\n- `tax_workspace_excel_empty` (HTTP 503): generated file empty\n- `tax_workspace_invalid_service_result` (HTTP 503): service answered neither file nor envelope\n- `unsupported_invoice_kind` (HTTP 404): unknown kind\n- `unsupported_invoice_action` (HTTP 404): kind without reactions\n- `tax_workspace_excel_unavailable` (HTTP 503): a file the server made (export, template, result) could not be prepared; try again, then send correlationId to support (1.0.0.209; it was the 415 code before)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"previewToken\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Exports the contract list for the filter as an Excel file.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/brokerage-contracts/excel/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "brokerage-contracts",
                "excel",
                "export"
              ],
              "query": [
                {
                  "key": "(see nestedTypes.TaxWorkspaceContractFilter)",
                  "value": "",
                  "disabled": true
                }
              ],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_excel_invalid_content_type` (HTTP 415): upload not multipart/form-data, or the part's Content-Type is not xlsx/octet-stream\n- `tax_workspace_excel_content_length_required` (HTTP 411): no Content-Length\n- `tax_workspace_excel_file_too_large` (HTTP 413): over ExcelUploadMaxBytes (+1 MiB multipart overhead for the request)\n- `tax_workspace_excel_file_required` (HTTP 400): not exactly one file part named file\n- `tax_workspace_excel_invalid_extension` (HTTP 415): file name not .xlsx\n- `tax_workspace_excel_row_limit_exceeded` (HTTP 413): more rows than ExcelUploadMaxRows\n- `tax_workspace_excel_content_too_large` (HTTP 413): cell content over the limits\n- `tax_workspace_excel_preview_payload_too_large` (HTTP 413): protected preview payload too large\n- `tax_workspace_excel_invalid_package | tax_workspace_excel_invalid_signature | tax_workspace_excel_encrypted_or_invalid | tax_workspace_excel_macro_or_encryption_not_allowed | tax_workspace_excel_formula_not_allowed | tax_workspace_excel_data_sheet_missing | tax_workspace_excel_header_missing | tax_workspace_excel_duplicate_header | tax_workspace_excel_unexpected_header | tax_workspace_excel_header_too_long | tax_workspace_excel_too_many_columns | tax_workspace_excel_uncompressed_limit_exceeded | tax_workspace_excel_zip_entry_limit_exceeded | tax_workspace_excel_zip_entry_name_too_long | invalid_excel_row`: file content refused (TaxWorkspaceExcelService.cs; statuses not traced one by one)\n- `invalid_excel_preview_token` (HTTP 400): malformed token (403 when bound to another actor)\n- `tax_workspace_excel_token_expired` (HTTP 409): preview token expired\n- `tax_workspace_excel_token_context_mismatch` (HTTP 403): token of another business/client/kind\n- `tax_workspace_excel_execution_claim_conflict` (HTTP 409): execution already claimed\n- `tax_workspace_excel_execution_in_progress` (HTTP 409): execution running\n- `tax_workspace_excel_execution_outcome_unknown` (HTTP 409): earlier execution's outcome unknown\n- `tax_workspace_excel_result_expired` (HTTP 409): result past retention\n- `tax_workspace_excel_export_row_limit_exceeded` (HTTP 409): export over ExcelExportMaxRows\n- `tax_workspace_excel_empty` (HTTP 503): generated file empty\n- `tax_workspace_invalid_service_result` (HTTP 503): service answered neither file nor envelope\n- `unsupported_invoice_kind` (HTTP 404): unknown kind\n- `unsupported_invoice_action` (HTTP 404): kind without reactions\n- `tax_workspace_excel_unavailable` (HTTP 503): a file the server made (export, template, result) could not be prepared; try again, then send correlationId to support (1.0.0.209; it was the 415 code before)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Downloads the empty Excel template for contract reactions.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/brokerage-contracts/excel/template",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "brokerage-contracts",
                "excel",
                "template"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_excel_invalid_content_type` (HTTP 415): upload not multipart/form-data, or the part's Content-Type is not xlsx/octet-stream\n- `tax_workspace_excel_content_length_required` (HTTP 411): no Content-Length\n- `tax_workspace_excel_file_too_large` (HTTP 413): over ExcelUploadMaxBytes (+1 MiB multipart overhead for the request)\n- `tax_workspace_excel_file_required` (HTTP 400): not exactly one file part named file\n- `tax_workspace_excel_invalid_extension` (HTTP 415): file name not .xlsx\n- `tax_workspace_excel_row_limit_exceeded` (HTTP 413): more rows than ExcelUploadMaxRows\n- `tax_workspace_excel_content_too_large` (HTTP 413): cell content over the limits\n- `tax_workspace_excel_preview_payload_too_large` (HTTP 413): protected preview payload too large\n- `tax_workspace_excel_invalid_package | tax_workspace_excel_invalid_signature | tax_workspace_excel_encrypted_or_invalid | tax_workspace_excel_macro_or_encryption_not_allowed | tax_workspace_excel_formula_not_allowed | tax_workspace_excel_data_sheet_missing | tax_workspace_excel_header_missing | tax_workspace_excel_duplicate_header | tax_workspace_excel_unexpected_header | tax_workspace_excel_header_too_long | tax_workspace_excel_too_many_columns | tax_workspace_excel_uncompressed_limit_exceeded | tax_workspace_excel_zip_entry_limit_exceeded | tax_workspace_excel_zip_entry_name_too_long | invalid_excel_row`: file content refused (TaxWorkspaceExcelService.cs; statuses not traced one by one)\n- `invalid_excel_preview_token` (HTTP 400): malformed token (403 when bound to another actor)\n- `tax_workspace_excel_token_expired` (HTTP 409): preview token expired\n- `tax_workspace_excel_token_context_mismatch` (HTTP 403): token of another business/client/kind\n- `tax_workspace_excel_execution_claim_conflict` (HTTP 409): execution already claimed\n- `tax_workspace_excel_execution_in_progress` (HTTP 409): execution running\n- `tax_workspace_excel_execution_outcome_unknown` (HTTP 409): earlier execution's outcome unknown\n- `tax_workspace_excel_result_expired` (HTTP 409): result past retention\n- `tax_workspace_excel_export_row_limit_exceeded` (HTTP 409): export over ExcelExportMaxRows\n- `tax_workspace_excel_empty` (HTTP 503): generated file empty\n- `tax_workspace_invalid_service_result` (HTTP 503): service answered neither file nor envelope\n- `unsupported_invoice_kind` (HTTP 404): unknown kind\n- `unsupported_invoice_action` (HTTP 404): kind without reactions\n- `tax_workspace_excel_unavailable` (HTTP 503): a file the server made (export, template, result) could not be prepared; try again, then send correlationId to support (1.0.0.209; it was the 415 code before)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Uploads a filled contract-reaction Excel file and answers a checked preview.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/brokerage-contracts/excel/preview",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "brokerage-contracts",
                "excel",
                "preview"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nContract reactions must be enabled (tax_workspace_contract_reactions_disabled).\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_excel_invalid_content_type` (HTTP 415): upload not multipart/form-data, or the part's Content-Type is not xlsx/octet-stream\n- `tax_workspace_excel_content_length_required` (HTTP 411): no Content-Length\n- `tax_workspace_excel_file_too_large` (HTTP 413): over ExcelUploadMaxBytes (+1 MiB multipart overhead for the request)\n- `tax_workspace_excel_file_required` (HTTP 400): not exactly one file part named file\n- `tax_workspace_excel_invalid_extension` (HTTP 415): file name not .xlsx\n- `tax_workspace_excel_row_limit_exceeded` (HTTP 413): more rows than ExcelUploadMaxRows\n- `tax_workspace_excel_content_too_large` (HTTP 413): cell content over the limits\n- `tax_workspace_excel_preview_payload_too_large` (HTTP 413): protected preview payload too large\n- `tax_workspace_excel_invalid_package | tax_workspace_excel_invalid_signature | tax_workspace_excel_encrypted_or_invalid | tax_workspace_excel_macro_or_encryption_not_allowed | tax_workspace_excel_formula_not_allowed | tax_workspace_excel_data_sheet_missing | tax_workspace_excel_header_missing | tax_workspace_excel_duplicate_header | tax_workspace_excel_unexpected_header | tax_workspace_excel_header_too_long | tax_workspace_excel_too_many_columns | tax_workspace_excel_uncompressed_limit_exceeded | tax_workspace_excel_zip_entry_limit_exceeded | tax_workspace_excel_zip_entry_name_too_long | invalid_excel_row`: file content refused (TaxWorkspaceExcelService.cs; statuses not traced one by one)\n- `invalid_excel_preview_token` (HTTP 400): malformed token (403 when bound to another actor)\n- `tax_workspace_excel_token_expired` (HTTP 409): preview token expired\n- `tax_workspace_excel_token_context_mismatch` (HTTP 403): token of another business/client/kind\n- `tax_workspace_excel_execution_claim_conflict` (HTTP 409): execution already claimed\n- `tax_workspace_excel_execution_in_progress` (HTTP 409): execution running\n- `tax_workspace_excel_execution_outcome_unknown` (HTTP 409): earlier execution's outcome unknown\n- `tax_workspace_excel_result_expired` (HTTP 409): result past retention\n- `tax_workspace_excel_export_row_limit_exceeded` (HTTP 409): export over ExcelExportMaxRows\n- `tax_workspace_excel_empty` (HTTP 503): generated file empty\n- `tax_workspace_invalid_service_result` (HTTP 503): service answered neither file nor envelope\n- `unsupported_invoice_kind` (HTTP 404): unknown kind\n- `unsupported_invoice_action` (HTTP 404): kind without reactions\n- `tax_workspace_excel_unavailable` (HTTP 503): a file the server made (export, template, result) could not be prepared; try again, then send correlationId to support (1.0.0.209; it was the 415 code before)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Executes the reactions of a previewed contract Excel file.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/brokerage-contracts/excel/execute",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "brokerage-contracts",
                "excel",
                "execute"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_excel_invalid_content_type` (HTTP 415): upload not multipart/form-data, or the part's Content-Type is not xlsx/octet-stream\n- `tax_workspace_excel_content_length_required` (HTTP 411): no Content-Length\n- `tax_workspace_excel_file_too_large` (HTTP 413): over ExcelUploadMaxBytes (+1 MiB multipart overhead for the request)\n- `tax_workspace_excel_file_required` (HTTP 400): not exactly one file part named file\n- `tax_workspace_excel_invalid_extension` (HTTP 415): file name not .xlsx\n- `tax_workspace_excel_row_limit_exceeded` (HTTP 413): more rows than ExcelUploadMaxRows\n- `tax_workspace_excel_content_too_large` (HTTP 413): cell content over the limits\n- `tax_workspace_excel_preview_payload_too_large` (HTTP 413): protected preview payload too large\n- `tax_workspace_excel_invalid_package | tax_workspace_excel_invalid_signature | tax_workspace_excel_encrypted_or_invalid | tax_workspace_excel_macro_or_encryption_not_allowed | tax_workspace_excel_formula_not_allowed | tax_workspace_excel_data_sheet_missing | tax_workspace_excel_header_missing | tax_workspace_excel_duplicate_header | tax_workspace_excel_unexpected_header | tax_workspace_excel_header_too_long | tax_workspace_excel_too_many_columns | tax_workspace_excel_uncompressed_limit_exceeded | tax_workspace_excel_zip_entry_limit_exceeded | tax_workspace_excel_zip_entry_name_too_long | invalid_excel_row`: file content refused (TaxWorkspaceExcelService.cs; statuses not traced one by one)\n- `invalid_excel_preview_token` (HTTP 400): malformed token (403 when bound to another actor)\n- `tax_workspace_excel_token_expired` (HTTP 409): preview token expired\n- `tax_workspace_excel_token_context_mismatch` (HTTP 403): token of another business/client/kind\n- `tax_workspace_excel_execution_claim_conflict` (HTTP 409): execution already claimed\n- `tax_workspace_excel_execution_in_progress` (HTTP 409): execution running\n- `tax_workspace_excel_execution_outcome_unknown` (HTTP 409): earlier execution's outcome unknown\n- `tax_workspace_excel_result_expired` (HTTP 409): result past retention\n- `tax_workspace_excel_export_row_limit_exceeded` (HTTP 409): export over ExcelExportMaxRows\n- `tax_workspace_excel_empty` (HTTP 503): generated file empty\n- `tax_workspace_invalid_service_result` (HTTP 503): service answered neither file nor envelope\n- `unsupported_invoice_kind` (HTTP 404): unknown kind\n- `unsupported_invoice_action` (HTTP 404): kind without reactions\n- `tax_workspace_excel_unavailable` (HTTP 503): a file the server made (export, template, result) could not be prepared; try again, then send correlationId to support (1.0.0.209; it was the 415 code before)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"previewToken\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Downloads the result file of an executed Excel batch.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/excel/result",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "excel",
                "result"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nA POST that returns a file.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_excel_invalid_content_type` (HTTP 415): upload not multipart/form-data, or the part's Content-Type is not xlsx/octet-stream\n- `tax_workspace_excel_content_length_required` (HTTP 411): no Content-Length\n- `tax_workspace_excel_file_too_large` (HTTP 413): over ExcelUploadMaxBytes (+1 MiB multipart overhead for the request)\n- `tax_workspace_excel_file_required` (HTTP 400): not exactly one file part named file\n- `tax_workspace_excel_invalid_extension` (HTTP 415): file name not .xlsx\n- `tax_workspace_excel_row_limit_exceeded` (HTTP 413): more rows than ExcelUploadMaxRows\n- `tax_workspace_excel_content_too_large` (HTTP 413): cell content over the limits\n- `tax_workspace_excel_preview_payload_too_large` (HTTP 413): protected preview payload too large\n- `tax_workspace_excel_invalid_package | tax_workspace_excel_invalid_signature | tax_workspace_excel_encrypted_or_invalid | tax_workspace_excel_macro_or_encryption_not_allowed | tax_workspace_excel_formula_not_allowed | tax_workspace_excel_data_sheet_missing | tax_workspace_excel_header_missing | tax_workspace_excel_duplicate_header | tax_workspace_excel_unexpected_header | tax_workspace_excel_header_too_long | tax_workspace_excel_too_many_columns | tax_workspace_excel_uncompressed_limit_exceeded | tax_workspace_excel_zip_entry_limit_exceeded | tax_workspace_excel_zip_entry_name_too_long | invalid_excel_row`: file content refused (TaxWorkspaceExcelService.cs; statuses not traced one by one)\n- `invalid_excel_preview_token` (HTTP 400): malformed token (403 when bound to another actor)\n- `tax_workspace_excel_token_expired` (HTTP 409): preview token expired\n- `tax_workspace_excel_token_context_mismatch` (HTTP 403): token of another business/client/kind\n- `tax_workspace_excel_execution_claim_conflict` (HTTP 409): execution already claimed\n- `tax_workspace_excel_execution_in_progress` (HTTP 409): execution running\n- `tax_workspace_excel_execution_outcome_unknown` (HTTP 409): earlier execution's outcome unknown\n- `tax_workspace_excel_result_expired` (HTTP 409): result past retention\n- `tax_workspace_excel_export_row_limit_exceeded` (HTTP 409): export over ExcelExportMaxRows\n- `tax_workspace_excel_empty` (HTTP 503): generated file empty\n- `tax_workspace_invalid_service_result` (HTTP 503): service answered neither file nor envelope\n- `unsupported_invoice_kind` (HTTP 404): unknown kind\n- `unsupported_invoice_action` (HTTP 404): kind without reactions\n- `tax_workspace_excel_unavailable` (HTTP 503): a file the server made (export, template, result) could not be prepared; try again, then send correlationId to support (1.0.0.209; it was the 415 code before)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resultToken\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Reads the business's tax-workspace delegation (کارپوشه) as a connected system needs it.",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/delegation",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "delegation"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.read`.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          }
        },
        {
          "name": "Asks the tax organisation to send the owner's mobile a code for the delegation.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/delegation/otp",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "delegation",
                "otp"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nPermissions requested are the registration set (RegistrationDelegationPermissions).\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `invalid_validity` (HTTP 400): validityDurationDays outside 1..365\n- `invalid_otp` (HTTP 400): code malformed\n- `pending_otp_not_found` (HTTP 409): no code was requested or it expired\n- `otp_operation_in_progress` (HTTP 409): another OTP operation running\n- `otp_operation_concurrency` (HTTP 409): concurrent OTP change\n- `otp_operation_superseded` (HTTP 409): a newer code request replaced this one\n- `active_otp_economic_number_change` (HTTP 409): economic code changed while a code is pending\n- `invalid_otp_response` (HTTP 502): organisation answer unreadable\n- `invalid_delegation_response` (HTTP 502): organisation delegation answer unreadable\n- `otp_request_outcome_unknown | otp_verification_outcome_unknown | otp_request_interrupted | otp_verification_interrupted`: interrupted exchange (statuses not traced)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Verifies the owner's code and stores the delegation.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/delegation/verify",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "delegation",
                "verify"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `invalid_validity` (HTTP 400): validityDurationDays outside 1..365\n- `invalid_otp` (HTTP 400): code malformed\n- `pending_otp_not_found` (HTTP 409): no code was requested or it expired\n- `otp_operation_in_progress` (HTTP 409): another OTP operation running\n- `otp_operation_concurrency` (HTTP 409): concurrent OTP change\n- `otp_operation_superseded` (HTTP 409): a newer code request replaced this one\n- `active_otp_economic_number_change` (HTTP 409): economic code changed while a code is pending\n- `invalid_otp_response` (HTTP 502): organisation answer unreadable\n- `invalid_delegation_response` (HTTP 502): organisation delegation answer unreadable\n- `otp_request_outcome_unknown | otp_verification_outcome_unknown | otp_request_interrupted | otp_verification_interrupted`: interrupted exchange (statuses not traced)\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"otp\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Issues a new fiscal memory id through the delegation and saves it on the business.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/memory-unique-id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "memory-unique-id"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.invoice.send`.\n\nNot idempotent: each call asks the organisation for a new id.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_memory_unique_id_disabled` (HTTP 503): memory-unique-id services off\n- `tax_workspace_memory_permission_missing`: delegation lacks memory-unique-id:manage (status not traced)\n- `tax_workspace_memory_operation_in_progress` (HTTP 409): another memory operation running\n- `invalid_memory_unique_id` (HTTP 400): organisation returned an unusable id\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Partner: asks the organisation to send the code to a not-yet-registered taxpayer's mobile.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/onboarding/otp",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "onboarding",
                "otp"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `invalid_validity` (HTTP 400): validityDurationDays outside 1..365\n- `invalid_otp` (HTTP 400): code malformed\n- `pending_otp_not_found` (HTTP 409): no code was requested or it expired\n- `otp_operation_in_progress` (HTTP 409): another OTP operation running\n- `otp_operation_concurrency` (HTTP 409): concurrent OTP change\n- `otp_operation_superseded` (HTTP 409): a newer code request replaced this one\n- `active_otp_economic_number_change` (HTTP 409): economic code changed while a code is pending\n- `invalid_otp_response` (HTTP 502): organisation answer unreadable\n- `invalid_delegation_response` (HTTP 502): organisation delegation answer unreadable\n- `otp_request_outcome_unknown | otp_verification_outcome_unknown | otp_request_interrupted | otp_verification_interrupted`: interrupted exchange (statuses not traced)\n- `partner_suspended` (HTTP 403): registered partner suspended (PartnerAccess.Refusal; unregistered partners pass)\n- `capability_disabled` (HTTP 403): otpOnboarding off for the registered partner\n- `rate_limited` (HTTP 429): 60 code requests per partner client per hour (envelope status \"429\")\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"economicCode\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /api/v2/tax-workspace/onboarding/verify",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/onboarding/verify",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "onboarding",
                "verify"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `invalid_validity` (HTTP 400): validityDurationDays outside 1..365\n- `invalid_otp` (HTTP 400): code malformed\n- `pending_otp_not_found` (HTTP 409): no code was requested or it expired\n- `otp_operation_in_progress` (HTTP 409): another OTP operation running\n- `otp_operation_concurrency` (HTTP 409): concurrent OTP change\n- `otp_operation_superseded` (HTTP 409): a newer code request replaced this one\n- `active_otp_economic_number_change` (HTTP 409): economic code changed while a code is pending\n- `invalid_otp_response` (HTTP 502): organisation answer unreadable\n- `invalid_delegation_response` (HTTP 502): organisation delegation answer unreadable\n- `otp_request_outcome_unknown | otp_verification_outcome_unknown | otp_request_interrupted | otp_verification_interrupted`: interrupted exchange (statuses not traced)\n- `partner_suspended` (HTTP 403): registered partner suspended (PartnerAccess.Refusal; unregistered partners pass)\n- `capability_disabled` (HTTP 403): otpOnboarding off for the registered partner\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"economicCode\": \"\",\n  \"otp\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /api/v2/tax-workspace/onboarding/memory-unique-id",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-workspace/onboarding/memory-unique-id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-workspace",
                "onboarding",
                "memory-unique-id"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.register`. Partner (broker) credential.\n\nError codes:\n- `validation_failed` (HTTP 400): ModelState invalid (query/body binding) or the backend's filter/field validation; message joins the reasons\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): missing scope, or a token of the wrong kind; errors[].message names the cause\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule: a customer JWT is stopped by the IP gate (result/code body); a static key outside the rule answers this code in the envelope\n- `tax_workspace_disabled` (HTTP 503): TaxWorkspace.Enabled off (repository Web.config: false)\n- `service_not_configured` (HTTP 503): trusted-company or secret-protector configuration incomplete\n- `request_cancelled` (HTTP 408): cancelled / timed out\n- `tax_workspace_internal_error` (HTTP 500): unexpected exception\n- `invalid_api_client_context` (HTTP 401): no company or client identity\n- `company_not_available` (HTTP 403): business inactive\n- `economic_number_invalid` (HTTP 409): business economic code not 11/14 digits\n- `permission_denied` (HTTP 403): internal permission missing (for example a read actor reacting)\n- `tax_workspace_reauthorization_required` (HTTP 409): no usable delegation (expired, revoked, unreadable): ask a new one\n- `delegation_permission_missing` (HTTP 403): the delegation lacks the service's permission\n- `tax_workspace_permission_missing`: the organisation answered ACCESS_DENIED: prepended to the organisation's errors, HTTP status of the upstream answer\n- `profile_concurrency` (HTTP 409): concurrent change of the workspace profile\n- `tax_workspace_mutation_in_progress` (HTTP 409): another reaction or OTP operation is running\n- `tax_workspace_mutation_recheck_required` (HTTP 409): an earlier reaction's outcome must be re-read first\n- `tax_workspace_mutation_outcome_unknown` (HTTP 409): earlier reaction outcome unknown\n- `tax_workspace_identity_changed` (HTTP 409): the business's economic code changed during the operation\n- `economic_number_reconciliation_required` (HTTP 409): economic code change pending\n- `economic_number_change_in_progress` (HTTP 409): economic code change running\n- `(organisation codes)`: upstream refusal: envelope status = the organisation's status (or INVALID_RESPONSE), errors = the organisation's [{code,message}], fieldErrors passed through; HTTP = upstream 4xx/5xx, 401 becomes 502, a non-error status becomes 502 (FromUpstream, TaxWorkspaceApplicationService.cs:5225-5249)\n- `upstream_timeout | upstream_transport_error | upstream_invalid_response | upstream_invalid_data | upstream_empty_response | upstream_response_too_large | upstream_server_error | upstream_unavailable | upstream_unauthorized | upstream_nonce_invalid | certificate_signing_failed`: transport, nonce, signing or answer-format failures (TrustedCompanyApiClient / TaxWorkspaceApplicationService; statuses not traced one by one)\n- `tax_workspace_memory_unique_id_disabled` (HTTP 503): memory-unique-id services off\n- `tax_workspace_memory_permission_missing`: delegation lacks memory-unique-id:manage (status not traced)\n- `tax_workspace_memory_operation_in_progress` (HTTP 409): another memory operation running\n- `invalid_memory_unique_id` (HTTP 400): organisation returned an unusable id\n- `partner_suspended` (HTTP 403): registered partner suspended (PartnerAccess.Refusal; unregistered partners pass)\n- `capability_disabled` (HTTP 403): otpOnboarding off for the registered partner\n- `onboarding_owner_check_required` (HTTP 409): no successful verify by this partner client for this economic code in the last 30 minutes\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"economicCode\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "استعلام پرونده مالیاتی",
      "item": [
        {
          "name": "POST /api/v2/tax-file-inquiry",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json; charset=utf-8"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v2/tax-file-inquiry",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v2",
                "tax-file-inquiry"
              ],
              "query": [],
              "variable": []
            },
            "description": "Scope: `v2.lookup.read`.\n\nNew in API v2 1.0.0.195. Refusals (service off, wallet, busy) happen before the organisation is asked and cost nothing. correlationId in the envelope is the inquiry id as 32 hex digits.\n\nError codes:\n- `unauthorized` (HTTP 401): no/invalid token\n- `forbidden` (HTTP 403): wrong kind or scope\n- `IP_NOT_ALLOWED` (HTTP 403): IP rule (auth.ErrorCode passed through)\n- `validation_failed` (HTTP 400): identifier not a valid shape\n- `tax_file_inquiry_not_active` (HTTP 403): the business's «استعلام پرونده مالیاتی خریدار» service is off\n- `tax_file_inquiry_wallet_insufficient` (HTTP 402): wallet balance too low\n- `tax_file_inquiry_busy` (HTTP 429): the business's previous inquiry is still running (30 s wait)\n- `tax_file_lookup_unavailable` (HTTP 503): tax workspace off or not configured\n- `organization_timeout` (HTTP 504): organisation did not answer in time\n- `organization_unavailable` (HTTP 502): organisation error\n- `request_cancelled` (HTTP 408): client disconnected\n- `tax_file_inquiry_internal_error` (HTTP 500): unexpected\n\nhttps://api-v2.asatsp.ir/docs/",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"identifier\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    }
  ]
}
