{"openapi":"3.1.0","info":{"title":"MyBizMate Platform API","version":"1.0.0","description":"Generated from the platform registry. Every path here is a registered action; editing this file by hand will be overwritten. A company connects its own systems with an API key (the `apiKey` scheme), created on the Developers page of MyBizMate; the guide is at /docs."},"servers":[{"url":"https://mybizmate.io"}],"paths":{"/api/v1/sales_invoice/create":{"post":{"operationId":"sales_invoice_create","summary":"create a sales_invoice","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","posting_date","lines"],"properties":{"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sales_invoice/post":{"post":{"operationId":"sales_invoice_post","summary":"post a sales_invoice","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","id"],"properties":{"id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sheet_document/create":{"post":{"operationId":"sheet_document_create","summary":"create a sheet_document","security":[{"bearerAuth":["books.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope books.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sheet_document/post":{"post":{"operationId":"sheet_document_post","summary":"post a sheet_document","security":[{"bearerAuth":["books.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","id"],"properties":{"id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope books.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/item/list":{"post":{"operationId":"item_list","summary":"list a item","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"limit":{"type":"integer","maximum":2000,"minimum":1},"offset":{"type":"integer","minimum":0},"company_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/item_category/list":{"post":{"operationId":"item_category_list","summary":"list a item_category","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"limit":{"type":"integer","maximum":2000,"minimum":1},"offset":{"type":"integer","minimum":0},"company_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/price_list_line/list":{"post":{"operationId":"price_list_line_list","summary":"list a price_list_line","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"limit":{"type":"integer","maximum":2000,"minimum":1},"offset":{"type":"integer","minimum":0},"company_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sales_order/post":{"post":{"operationId":"sales_order_post","summary":"post a sales_order","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","id"],"properties":{"id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sales_order/list":{"post":{"operationId":"sales_order_list","summary":"list a sales_order","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"state":{"type":"string"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/sales_order/get":{"post":{"operationId":"sales_order_get","summary":"get a sales_order","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/sales_order/create":{"post":{"operationId":"sales_order_create","summary":"create a sales_order","description":"Also callable with a company's API key that holds the \"Create and change drafts\" permission (`write`). With an API key, the API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]},{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","posting_date","lines"],"properties":{"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"},"sales_agent_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"Missing scope sales.write; with an API key, the key lacks the `write` permission, developer mode is off, or the member the key acts as may not do this."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/sales_order/update":{"post":{"operationId":"sales_order_update","summary":"update a sales_order","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","posting_date","lines"],"properties":{"id":{"type":"string","format":"uuid"},"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/sales_order/set_state":{"post":{"operationId":"sales_order_set_state","summary":"set_state a sales_order","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","to_state"],"properties":{"id":{"type":"string","format":"uuid"},"to_state":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/sales_order/discard":{"post":{"operationId":"sales_order_discard","summary":"discard a sales_order","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/sales_order/cancel":{"post":{"operationId":"sales_order_cancel","summary":"cancel a sales_order","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","cancel_reason"],"properties":{"id":{"type":"string","format":"uuid"},"cancel_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/sales_order/create_from":{"post":{"operationId":"sales_order_create_from","summary":"create_from a sales_order","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `target_type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["source_document_id","lines"],"properties":{"lines":{"type":"array","minItems":1},"source_document_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/fulfillment/post":{"post":{"operationId":"fulfillment_post","summary":"post a fulfillment","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","id"],"properties":{"id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/fulfillment/list":{"post":{"operationId":"fulfillment_list","summary":"list a fulfillment","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"state":{"type":"string"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/fulfillment/get":{"post":{"operationId":"fulfillment_get","summary":"get a fulfillment","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/fulfillment/create":{"post":{"operationId":"fulfillment_create","summary":"create a fulfillment","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["posting_date","lines"],"properties":{"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/fulfillment/update":{"post":{"operationId":"fulfillment_update","summary":"update a fulfillment","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","posting_date","lines"],"properties":{"id":{"type":"string","format":"uuid"},"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/fulfillment/set_state":{"post":{"operationId":"fulfillment_set_state","summary":"set_state a fulfillment","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","to_state"],"properties":{"id":{"type":"string","format":"uuid"},"to_state":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/fulfillment/discard":{"post":{"operationId":"fulfillment_discard","summary":"discard a fulfillment","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/fulfillment/cancel":{"post":{"operationId":"fulfillment_cancel","summary":"cancel a fulfillment","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","cancel_reason"],"properties":{"id":{"type":"string","format":"uuid"},"cancel_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/fulfillment/create_from":{"post":{"operationId":"fulfillment_create_from","summary":"create_from a fulfillment","description":"Also callable with a company's API key that holds the \"Create and change drafts\" permission (`write`). With an API key, the API sets `company_id`, `target_type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]},{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","source_document_id","target_type_code"],"properties":{"company_id":{"type":"string","format":"uuid"},"target_type_code":{"type":"string"},"source_document_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"Missing scope sales.write; with an API key, the key lacks the `write` permission, developer mode is off, or the member the key acts as may not do this."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/delivery/post":{"post":{"operationId":"delivery_post","summary":"post a delivery","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","id"],"properties":{"id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/delivery/list":{"post":{"operationId":"delivery_list","summary":"list a delivery","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"state":{"type":"string"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/delivery/get":{"post":{"operationId":"delivery_get","summary":"get a delivery","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/delivery/create":{"post":{"operationId":"delivery_create","summary":"create a delivery","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["posting_date","lines"],"properties":{"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/delivery/update":{"post":{"operationId":"delivery_update","summary":"update a delivery","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","posting_date","lines"],"properties":{"id":{"type":"string","format":"uuid"},"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/delivery/set_state":{"post":{"operationId":"delivery_set_state","summary":"set_state a delivery","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","to_state"],"properties":{"id":{"type":"string","format":"uuid"},"to_state":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/delivery/discard":{"post":{"operationId":"delivery_discard","summary":"discard a delivery","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/delivery/cancel":{"post":{"operationId":"delivery_cancel","summary":"cancel a delivery","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","cancel_reason"],"properties":{"id":{"type":"string","format":"uuid"},"cancel_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/delivery/create_from":{"post":{"operationId":"delivery_create_from","summary":"create_from a delivery","description":"Also callable with a company's API key that holds the \"Create and change drafts\" permission (`write`). With an API key, the API sets `company_id`, `target_type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]},{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","source_document_id","target_type_code"],"properties":{"company_id":{"type":"string","format":"uuid"},"target_type_code":{"type":"string"},"source_document_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"Missing scope sales.write; with an API key, the key lacks the `write` permission, developer mode is off, or the member the key acts as may not do this."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/sfa_company/list":{"post":{"operationId":"sfa_company_list","summary":"list a sfa_company","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_warehouse/list":{"post":{"operationId":"sfa_warehouse_list","summary":"list a sfa_warehouse","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"limit":{"type":"integer","maximum":2000,"minimum":1},"offset":{"type":"integer","minimum":0},"company_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_sales_order/discard":{"post":{"operationId":"sfa_sales_order_discard","summary":"discard a sfa_sales_order","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","sales_order_id"],"properties":{"company_id":{"type":"string","format":"uuid"},"sales_order_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_company_ocr/list":{"post":{"operationId":"sfa_company_ocr_list","summary":"list a sfa_company_ocr","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company_id":{"type":"string","format":"uuid"},"company_ids":{"type":"array"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_company_owner/list":{"post":{"operationId":"sfa_company_owner_list","summary":"list a sfa_company_owner","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_company/connect":{"post":{"operationId":"pos_company_connect","summary":"connect a pos_company","security":[{"bearerAuth":["pos.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required on this action: a request without one is refused (422). Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code","pos_company_ref"],"properties":{"code":{"type":"string"},"pos_company_ref":{"type":"string","format":"uuid"},"pos_company_label":{"type":"string","maxLength":120}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_company/disconnect":{"post":{"operationId":"pos_company_disconnect","summary":"disconnect a pos_company","security":[{"bearerAuth":["pos.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required on this action: a request without one is refused (422). Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","pos_company_ref"],"properties":{"company_id":{"type":"string","format":"uuid"},"pos_company_ref":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_company/status":{"post":{"operationId":"pos_company_status","summary":"status a pos_company","security":[{"bearerAuth":["pos.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_ids"],"properties":{"company_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500,"minItems":1}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_company/connect_v2":{"post":{"operationId":"pos_company_connect_v2","summary":"connect_v2 a pos_company","security":[{"bearerAuth":["pos.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required on this action: a request without one is refused (422). Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code","pos_company_ref"],"properties":{"code":{"type":"string"},"pos_company_ref":{"type":"string","format":"uuid"},"pos_company_label":{"type":"string","maxLength":120}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_company/status_v2":{"post":{"operationId":"pos_company_status_v2","summary":"status_v2 a pos_company","security":[{"bearerAuth":["pos.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_ids"],"properties":{"company_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500,"minItems":1}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_vehicle/list":{"post":{"operationId":"sfa_vehicle_list","summary":"list a sfa_vehicle","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"limit":{"type":"integer","maximum":2000,"minimum":1},"offset":{"type":"integer","minimum":0},"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_customer/list":{"post":{"operationId":"sfa_customer_list","summary":"list a sfa_customer","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"limit":{"type":"integer","maximum":2000,"minimum":1},"offset":{"type":"integer","minimum":0},"company_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_customer/create":{"post":{"operationId":"sfa_customer_create","summary":"create a sfa_customer","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"tin":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"addr_zip":{"type":"string"},"rdo_code":{"type":"string"},"addr_city":{"type":"string"},"last_name":{"type":"string"},"company_id":{"type":"string","format":"uuid"},"contact_no":{"type":"string"},"first_name":{"type":"string"},"trade_name":{"type":"string"},"addr_street":{"type":"string"},"entity_type":{"enum":["company","individual"],"type":"string"},"middle_name":{"type":"string"},"addr_barangay":{"type":"string"},"addr_district":{"type":"string"},"registered_name":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_item_supplier/list":{"post":{"operationId":"sfa_item_supplier_list","summary":"list a sfa_item_supplier","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"limit":{"type":"integer","maximum":2000,"minimum":1},"offset":{"type":"integer","minimum":0},"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_inventory/list":{"post":{"operationId":"sfa_inventory_list","summary":"list a sfa_inventory","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"limit":{"type":"integer","maximum":2000,"minimum":1},"offset":{"type":"integer","minimum":0},"company_id":{"type":"string","format":"uuid"},"warehouse_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_item_default/list":{"post":{"operationId":"sfa_item_default_list","summary":"list a sfa_item_default","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"limit":{"type":"integer","maximum":2000,"minimum":1},"offset":{"type":"integer","minimum":0},"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_classic_invoice/create":{"post":{"operationId":"sfa_classic_invoice_create","summary":"create a sfa_classic_invoice","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","party_id","doc_date","reference_no","terms","lines"],"properties":{"memo":{"type":"string","maxLength":500},"lines":{"type":"array","items":{"type":"object","required":["item_id","qty","unit_price","gross_amount"],"properties":{"qty":{"type":"number"},"uom":{"type":"string"},"item_id":{"type":"string","format":"uuid"},"item_code":{"type":"string"},"unit_price":{"type":"number"},"gross_amount":{"type":"number"},"warehouse_id":{"type":"string","format":"uuid"},"discount_amount":{"type":"number"}}},"maxItems":200,"minItems":1},"terms":{"enum":["cash","on_account"],"type":"string"},"doc_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"},"party_id":{"type":"string","format":"uuid"},"payments":{"type":"array","items":{"type":"object","required":["method","amount"],"properties":{"amount":{"type":"string","pattern":"^[0-9]{1,12}([.][0-9]{1,2})?$"},"method":{"enum":["cash","check","bank_transfer","bank_deposit","e_wallet","card","other"],"type":"string"},"check_date":{"type":"string","format":"date"},"reference_no":{"type":"string","maxLength":40}}},"maxItems":1},"company_id":{"type":"string","format":"uuid"},"reference_no":{"type":"string","maxLength":100}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_classic_invoice/create_from":{"post":{"operationId":"sfa_classic_invoice_create_from","summary":"create_from a sfa_classic_invoice","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","delivery_id"],"properties":{"memo":{"type":"string","maxLength":500},"terms":{"enum":["cash","on_account"],"type":"string"},"doc_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"},"payments":{"type":"array","items":{"type":"object","required":["method","amount"],"properties":{"amount":{"type":"string","pattern":"^[0-9]{1,12}([.][0-9]{1,2})?$"},"method":{"enum":["cash","check","bank_transfer","bank_deposit","e_wallet","card","other"],"type":"string"},"check_date":{"type":"string","format":"date"},"reference_no":{"type":"string","maxLength":40}}},"maxItems":1},"company_id":{"type":"string","format":"uuid"},"delivery_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_workflow_state/set":{"post":{"operationId":"sfa_workflow_state_set","summary":"set a sfa_workflow_state","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","id","to_state"],"properties":{"id":{"type":"string","format":"uuid"},"to_state":{"type":"string"},"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_field_ops/save":{"post":{"operationId":"sfa_field_ops_save","summary":"save a sfa_field_ops","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","document_id"],"properties":{"company_id":{"type":"string","format":"uuid"},"shipped_on":{"type":"string"},"document_id":{"type":"string","format":"uuid"},"delivered_on":{"type":"string"},"vehicle_plate":{"type":"string"},"delivery_status":{"type":"string"},"delivery_exception":{"type":"string"},"driver_personnel_id":{"type":"string"},"picker_personnel_id":{"type":"string"},"expected_logistics_updated_at":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_logistics/save":{"post":{"operationId":"sfa_logistics_save","summary":"save a sfa_logistics","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","document_id"],"properties":{"pod_note":{"type":"string"},"company_id":{"type":"string","format":"uuid"},"shipped_on":{"type":"string"},"document_id":{"type":"string","format":"uuid"},"pack_status":{"type":"string"},"pick_status":{"type":"string"},"received_by":{"type":"string"},"carrier_name":{"type":"string"},"delivered_on":{"type":"string"},"pod_reference":{"type":"string"},"tracking_number":{"type":"string"},"invoice_document_id":{"type":"string"},"expected_logistics_updated_at":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_item/list":{"post":{"operationId":"pos_item_list","summary":"list a pos_item","security":[{"bearerAuth":["pos.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","pos_company_ref"],"properties":{"limit":{"type":"integer","maximum":500,"minimum":1},"after_id":{"type":"string","format":"uuid"},"item_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"minItems":1},"company_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string","format":"date-time"},"pos_company_ref":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_item/list_v2":{"post":{"operationId":"pos_item_list_v2","summary":"list_v2 a pos_item","security":[{"bearerAuth":["pos.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","pos_company_ref"],"properties":{"limit":{"type":"integer","maximum":500,"minimum":1},"after_id":{"type":"string","format":"uuid"},"item_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"minItems":1},"company_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string","format":"date-time"},"pos_company_ref":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_sale/create":{"post":{"operationId":"pos_sale_create","summary":"create a pos_sale","security":[{"bearerAuth":["pos.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required on this action: a request without one is refused (422). Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","pos_company_ref","pos_sale_ref","doc_date","customer_class","lines"],"properties":{"lines":{"type":"array","items":{"type":"object","required":["item_id","tax_code","gross_amount","discount_amount"],"properties":{"item_id":{"type":"string","format":"uuid"},"tax_code":{"enum":["VAT","EXEMPT","ZERO","NONVAT"],"type":"string"},"description":{"type":"string","maxLength":300},"gross_amount":{"type":"number","minimum":0},"discount_amount":{"type":"number","minimum":0}}},"maxItems":200,"minItems":1},"doc_date":{"type":"string","format":"date"},"party_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"particulars":{"type":"string","maxLength":500},"pos_sale_ref":{"type":"string","maxLength":100,"minLength":1},"customer_class":{"enum":["regular","senior_citizen","pwd"],"type":"string"},"cash_account_id":{"type":"string","format":"uuid"},"pos_company_ref":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_sale/void":{"post":{"operationId":"pos_sale_void","summary":"void a pos_sale","security":[{"bearerAuth":["pos.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required on this action: a request without one is refused (422). Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","pos_company_ref","document_id"],"properties":{"reason":{"type":"string","maxLength":200},"company_id":{"type":"string","format":"uuid"},"document_id":{"type":"string","format":"uuid"},"pos_company_ref":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_sale/create_v2":{"post":{"operationId":"pos_sale_create_v2","summary":"create_v2 a pos_sale","security":[{"bearerAuth":["pos.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required on this action: a request without one is refused (422). Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","pos_company_ref","pos_sale_ref","doc_date","customer_class","lines"],"properties":{"lines":{"type":"array","items":{"type":"object","required":["item_id","tax_code","gross_amount","discount_amount"],"properties":{"item_id":{"type":"string","format":"uuid"},"tax_code":{"enum":["VAT","EXEMPT","ZERO","NONVAT"],"type":"string"},"description":{"type":"string","maxLength":300},"gross_amount":{"type":"number","minimum":0},"discount_amount":{"type":"number","minimum":0}}},"maxItems":200,"minItems":1},"doc_date":{"type":"string","format":"date"},"party_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"particulars":{"type":"string","maxLength":500},"pos_sale_ref":{"type":"string","maxLength":100,"minLength":1},"customer_class":{"enum":["regular","senior_citizen","pwd"],"type":"string"},"cash_account_id":{"type":"string","format":"uuid"},"pos_company_ref":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_sale/create_v3":{"post":{"operationId":"pos_sale_create_v3","summary":"create_v3 a pos_sale","security":[{"bearerAuth":["pos.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"},"description":"Required on this action: a request without one is refused (422). Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","pos_company_ref","pos_sale_ref","doc_date","customer_class","lines","contract_version"],"properties":{"lines":{"type":"array","items":{"type":"object","required":["item_id","tax_code","qty","unit_price","gross_amount","discount_amount"],"properties":{"qty":{"type":"number","exclusiveMinimum":0},"uom":{"type":"string","maxLength":32},"item_id":{"type":"string","format":"uuid"},"tax_code":{"enum":["VAT","EXEMPT","ZERO","NONVAT"],"type":"string"},"unit_price":{"type":"number","minimum":0},"description":{"type":"string","maxLength":300},"gross_amount":{"type":"number","minimum":0},"warehouse_id":{"type":"string","format":"uuid"},"discount_amount":{"type":"number","minimum":0},"regular_tax_code":{"enum":["VAT","EXEMPT","ZERO","NONVAT"],"type":"string"}}},"maxItems":200,"minItems":1},"doc_date":{"type":"string","format":"date"},"party_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"particulars":{"type":"string","maxLength":500},"pos_sale_ref":{"type":"string","maxLength":100,"minLength":1},"warehouse_id":{"type":"string","format":"uuid"},"customer_class":{"enum":["regular","senior_citizen","pwd"],"type":"string"},"cash_account_id":{"type":"string","format":"uuid"},"pos_company_ref":{"type":"string","format":"uuid"},"contract_version":{"enum":[3],"type":"number"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/personnel/list":{"post":{"operationId":"personnel_list","summary":"list a personnel","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"limit":{"type":"integer","maximum":2000,"minimum":1},"offset":{"type":"integer","minimum":0},"company_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/document/list":{"post":{"operationId":"document_list","summary":"list a document","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/document/get":{"post":{"operationId":"document_get","summary":"get a document","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/pos_setup/get":{"post":{"operationId":"pos_setup_get","summary":"get a pos_setup","security":[{"bearerAuth":["pos.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","pos_company_ref"],"properties":{"company_id":{"type":"string","format":"uuid"},"pos_company_ref":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/pos_setup/get_v2":{"post":{"operationId":"pos_setup_get_v2","summary":"get_v2 a pos_setup","security":[{"bearerAuth":["pos.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","pos_company_ref"],"properties":{"company_id":{"type":"string","format":"uuid"},"pos_company_ref":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope pos.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key. `pos_needs_classic_book` is permanent while the book stays ERP, and only v1's actions answer it (their `_v2` twins serve such a book): do not retry it — show `error` to the user and stop syncing that company through v1. `period_locked` is retryable once the office opens an amendment window: block that company's queue, retry daily and never re-date the sale. `pos_item_not_on_book` is permanent for that body: re-sync the catalog (the body may be rebuilt only if this was its first call). `pos_item_no_revenue_account` is retryable once the office sets the item's sales account: retry the same body. `pos_tax_code_missing` is retryable after setup: check `pos_setup.get` (`tax_profiles`, `company.vat_features_enabled`), then retry the same body. `pos_scpwd_line_not_exempt` is permanent, a POS bug: fix the POS and rebuild the body. `pos_cash_account_invalid` is retryable: re-activate the account and retry the same body, or re-map it (a re-mapped sale may rebuild its body only if this was its first call). `pos_no_ar_account` is retryable once the office sets up an Accounts Receivable account: retry the same body. `pos_no_output_vat_account` is retryable once the office sets up an Output VAT account: retry the same body. `pos_no_default_customer` is retryable once the office restores the VARIOUS CUSTOMERS customer: retry the same body. `pos_zero_total` is permanent: do not send zero-total sales. `pos_uom_invalid` is retryable once the office sets the item's unit: block the row and look again every 15 minutes. `pos_warehouse_required` is retryable once the store's warehouse is chosen: block the row, then rebuild the body under the same key (the first call made nothing). `pos_warehouse_invalid` is retryable once another warehouse is chosen: block the row and rebuild the body as above. `pos_item_not_sellable` is permanent for that body, a POS bug (the till never sells a bundle): fail the row. `pos_void_needs_office` needs the office, so ask again daily: list the sale as \"void in MyBizMate\", and once the office has voided it the same key answers `already_voided`."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_payment_method/list":{"post":{"operationId":"sfa_payment_method_list","summary":"list a sfa_payment_method","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_collection/create":{"post":{"operationId":"sfa_collection_create","summary":"create a sfa_collection","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","invoice_id","date","amount","method","or_reference","sfa_payment_id"],"properties":{"date":{"type":"string","format":"date"},"memo":{"type":"string","maxLength":500},"amount":{"type":"string","pattern":"^[0-9]{1,12}([.][0-9]{1,2})?$"},"method":{"enum":["cash","check","bank_transfer","bank_deposit","e_wallet","card","other"],"type":"string"},"check_date":{"type":"string","format":"date"},"company_id":{"type":"string","format":"uuid"},"invoice_id":{"type":"string","format":"uuid"},"or_reference":{"type":"string","maxLength":100},"reference_no":{"type":"string","maxLength":40},"sfa_payment_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_collection/discard":{"post":{"operationId":"sfa_collection_discard","summary":"discard a sfa_collection","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","id"],"properties":{"id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_collection/list":{"post":{"operationId":"sfa_collection_list","summary":"list a sfa_collection","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500},"company_id":{"type":"string","format":"uuid"},"sfa_payment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_credit_memo/create":{"post":{"operationId":"sfa_credit_memo_create","summary":"create a sfa_credit_memo","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","invoice_id","date","return_no","goods_back","settlement","lines","total","sfa_return_id"],"properties":{"date":{"type":"string","format":"date"},"memo":{"type":"string","maxLength":500},"lines":{"type":"array","items":{"type":"object","required":["item_id","qty","unit_price","amount"],"properties":{"qty":{"type":"string"},"unit":{"type":"string","maxLength":40},"amount":{"type":"string"},"item_id":{"type":"string","format":"uuid"},"unit_price":{"type":"string"},"description":{"type":"string","maxLength":500}}},"maxItems":200,"minItems":1},"total":{"type":"string"},"reason":{"type":"string","maxLength":500},"return_no":{"type":"string","maxLength":100},"company_id":{"type":"string","format":"uuid"},"goods_back":{"type":"boolean"},"invoice_id":{"type":"string","format":"uuid"},"settlement":{"enum":["store_credit","refund"],"type":"string"},"return_type":{"type":"string","maxLength":100},"sfa_return_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_credit_memo/discard":{"post":{"operationId":"sfa_credit_memo_discard","summary":"discard a sfa_credit_memo","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","id","sfa_return_id"],"properties":{"id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"sfa_return_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_credit_memo/list":{"post":{"operationId":"sfa_credit_memo_list","summary":"list a sfa_credit_memo","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500},"company_id":{"type":"string","format":"uuid"},"sfa_return_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_receivable/list":{"post":{"operationId":"sfa_receivable_list","summary":"list a sfa_receivable","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","party_ids"],"properties":{"party_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500,"minItems":1},"company_id":{"type":"string","format":"uuid"},"invoice_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500,"minItems":1}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_document_file/sign":{"post":{"operationId":"sfa_document_file_sign","summary":"sign a sfa_document_file","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","sfa_attachment_id","content_type","byte_size"],"properties":{"byte_size":{"type":"number","maximum":10485760,"minimum":1},"company_id":{"type":"string","format":"uuid"},"document_id":{"type":"string","format":"uuid"},"content_type":{"enum":["image/jpeg","image/png","image/webp","application/pdf"],"type":"string"},"sfa_attachment_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_document_file/record":{"post":{"operationId":"sfa_document_file_record","summary":"record a sfa_document_file","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","sfa_attachment_id","storage_path","content_type","byte_size","file_name"],"properties":{"byte_size":{"type":"number","maximum":10485760,"minimum":1},"file_name":{"type":"string","maxLength":200},"company_id":{"type":"string","format":"uuid"},"document_id":{"type":"string","format":"uuid"},"content_type":{"enum":["image/jpeg","image/png","image/webp","application/pdf"],"type":"string"},"storage_path":{"type":"string","maxLength":500},"sfa_attachment_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_document_file/discard":{"post":{"operationId":"sfa_document_file_discard","summary":"discard a sfa_document_file","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","document_id","id"],"properties":{"id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"document_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_customer_registration/save":{"post":{"operationId":"sfa_customer_registration_save","summary":"save a sfa_customer_registration","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","personnel_id","sfa_customer_id"],"properties":{"tin":{"type":"string"},"email":{"type":"string","maxLength":254},"addr_zip":{"type":"string"},"addr_city":{"type":"string","maxLength":120},"company_id":{"type":"string","format":"uuid"},"contact_no":{"type":"string","maxLength":50},"store_name":{"type":"string","maxLength":200},"addr_street":{"type":"string","maxLength":180},"personnel_id":{"type":"string","format":"uuid"},"addr_barangay":{"type":"string","maxLength":120},"addr_district":{"type":"string","maxLength":120},"contact_person":{"type":"string","maxLength":200},"registered_name":{"type":"string","maxLength":200},"registration_id":{"type":"string","format":"uuid"},"sfa_customer_id":{"type":"string","format":"uuid"},"expected_updated_at":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_customer_registration/submit":{"post":{"operationId":"sfa_customer_registration_submit","summary":"submit a sfa_customer_registration","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","registration_id","expected_updated_at"],"properties":{"company_id":{"type":"string","format":"uuid"},"registration_id":{"type":"string","format":"uuid"},"expected_updated_at":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_customer_registration/list":{"post":{"operationId":"sfa_customer_registration_list","summary":"list a sfa_customer_registration","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"company_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string"},"registration_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500},"sfa_customer_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":500}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_customer_registration/withdraw":{"post":{"operationId":"sfa_customer_registration_withdraw","summary":"withdraw a sfa_customer_registration","security":[{"bearerAuth":["sales.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","registration_id","sfa_attachment_id","reason"],"properties":{"reason":{"type":"string","maxLength":500},"company_id":{"type":"string","format":"uuid"},"registration_id":{"type":"string","format":"uuid"},"sfa_attachment_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope sales.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_stock_transfer/create":{"post":{"operationId":"sfa_stock_transfer_create","summary":"create a sfa_stock_transfer","security":[{"bearerAuth":["stock_transfer.write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","doc_date","from_warehouse_id","to_warehouse_id","agent_personnel_id","reference","lines"],"properties":{"memo":{"type":"string","maxLength":500},"lines":{"type":"array","items":{"type":"object","required":["item_id","qty"],"properties":{"qty":{"type":"number"},"uom":{"type":"string"},"item_id":{"type":"string","format":"uuid"}}},"maxItems":200,"minItems":1},"doc_date":{"type":"string","format":"date"},"reference":{"type":"string","maxLength":100},"company_id":{"type":"string","format":"uuid"},"to_warehouse_id":{"type":"string","format":"uuid"},"from_warehouse_id":{"type":"string","format":"uuid"},"agent_personnel_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope stock_transfer.write."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/sfa_item_unit/list":{"post":{"operationId":"sfa_item_unit_list","summary":"list a sfa_item_unit","security":[{"bearerAuth":["masters.read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id"],"properties":{"limit":{"type":"integer","maximum":500,"minimum":1},"offset":{"type":"integer","minimum":0},"company_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Accepted and applied."},"401":{"description":"Unauthenticated."},"403":{"description":"Missing scope masters.read."},"404":{"description":"Unknown action."},"409":{"description":"Idempotency key reused with a different payload."},"422":{"description":"Payload failed schema validation, or the action was refused. A refusal may carry a `reason` code beside `error`, which says what kind of refusal it is. `fulfillment_in_progress` is permanent: do not retry it — show `error` to the user. `erp_transactions_exhausted` is retryable once the company's month is topped up in MyBizMate, or on the 1st when it resets: hold that company's postings, then retry the same body, and tell the user that this month's transactions are used up. The SFA's collection and invoice doors: `amount_invalid`, `unknown_method`, `check_needs_reference`, `reference_not_taken`, `check_date_not_taken`, `check_date_invalid` and `reference_invalid` are permanent for that body: correct the payment and send it again (a refusal stores nothing, so the same key may be used). `one_payment_only`, `payment_needs_cash_terms` and `payment_amount_mismatch` are permanent for that body: an invoice carries its payment only as one payment, on Cash terms, for its whole total; send any other payment as a collection (`sfa_collection.create`) once the office posts the invoice. `no_account_for_method` is retryable once the office sets that payment method's Cash/Bank account in MyBizMate: retry the same body. `payment_already_sent`: the payment has its collection already; do not send it again. `not_found` is permanent for that body: the invoice is not in the company's books. `not_posted` is retryable once the office posts the invoice (a voided invoice stays refused): retry the same body. `no_customer` is permanent for that body: the invoice names no customer, so the office records the collection in MyBizMate. `date_in_locked_period` is retryable once the office opens an amendment window: retry the same body. `account_missing` is retryable once the office restores its Accounts Receivable account in MyBizMate: retry the same body. `date_before_invoice` and `over_balance` are permanent for that body: show `error` and wait for a person. `not_sfa_collection` is permanent: do not retry it. `posted` needs the office: the collection is posted, so the office voids it in MyBizMate; do not retry the discard. `ids_invalid` and `ids_too_many` (the list, `sfa_collection.list`) are permanent for that body: name 1 to 500 ids in all — payments (`sfa_payment_ids`), collections (`ids`) or both — and read more in more calls. A collection deleted in MyBizMate lists as `deleted`, with the number and times its record kept; a record whose collection is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its collection was deleted answers the first answer, that collection's id, and makes nothing: send the payment again under a fresh key. The SFA's credit memo actions answer these. `return_already_sent`: the return has its credit memo already; do not send it again. `not_found`, `date_before_invoice`, `statutory_discount`, `mixed_vat` and `zero_line` are permanent for that return: do not retry it — show `error` to the user, and the office records the return in MyBizMate. `total_mismatch`, `item_not_on_invoice`, `more_than_left`, `amount_mismatch` and `item_not_returnable` are permanent for that body: correct the return and send it again (a refused request stores nothing, so its key is free), or show `error` to the user. `not_posted` is retryable once the office posts the invoice (a voided one never is): retry the same body. `date_locked`, `goods_back_off`, `warehouse_inactive`, `account_missing` and `no_advance_account` are retryable once the office does what `error` says: retry the same body. `posted` and `not_sfa_memo` refuse a discard the office must finish: do not retry it — show `error` to the user. `ids_invalid` and `ids_too_many` (the list, `sfa_credit_memo.list`) are permanent for that body: name 1 to 500 ids in all — returns (`sfa_return_ids`), credit memos (`ids`) or both — and read more in more calls. A credit memo deleted in MyBizMate (the office's Discard of the SFA's draft is its rejection) lists as `deleted`, with the number and times its record kept; a record whose memo is gone with no tombstone (its trigger off, or a TRUNCATE) lists as `deleted` with a null `deleted_at` and `doc_no`. A create sent again under its first key after its memo was deleted answers the first answer, that memo's id, and makes nothing: send the return again under a fresh key. The SFA's receivables read (`sfa_receivable.list`) answers these. `party_ids_invalid` and `party_ids_too_many` are permanent for that body: send `party_ids` as a list of 1 to 500 customer ids, and read more customers in more calls. `invoice_ids_invalid` and `invoice_ids_too_many` are permanent for that body: send `invoice_ids` as a list of 1 to 500 invoice ids, or leave it out. The SFA's file door (`sfa_document_file`) answers these. `not_found` is permanent for that file: the document is gone or voided, so skip the file. `not_sfa_document` is permanent: the document is not a Sales Invoice or Credit Memo the SFA made, so the office adds the file in MyBizMate. `file_type` and `file_too_big` are permanent for that file: only a JPEG, PNG, WebP or PDF of at most 10 MB is taken. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the document holds 25 of the SFA's files: show `error` to a person. `not_the_file` (record) is retryable: put the bytes again through a fresh link from `sign`, then record again. `not_sfa_file` (discard) is permanent: the file was not sent by the SFA; do not retry the discard. `issued_document` (discard) is permanent: the document issued a registered number, so its files stay attached; do not retry the discard. The SFA's registration actions (`sfa_customer_registration`) answer these. `not_found` is permanent for that body: the registration is not one the SFA saved, so read the list by the store. `closed` is no failure: the registration is with Accounting or decided, so read it again and follow its state. `stale` is retryable: read the registration again, then send the change or the submit at its new version. `personnel_not_agent` is permanent for that body: name an active sales agent of the company. `missing_documents` and `missing_fields` are retryable once what is missing arrives: hold the submit until the registration lacks nothing. `ids_invalid` and `ids_too_many` (the list) are permanent for that body: name 1 to 500 ids in all, registrations or SFA stores or both, or a time in `updated_since`, and read more in more calls. A store's documents (`sfa_document_file` given a registration and its slot, and `sfa_customer_registration.withdraw`) answer these. `not_found` is permanent for that file: the registration is not one the SFA saved, so read the list by the store. `closed` is permanent: the registration was rejected, so its files can't change; do not retry. `recorded_already` (sign) is no failure: go straight to `record`, which answers the file's record. `too_many_files` is permanent while the registration holds 5 current files of that document from the SFA: withdraw one first. A Sales Order the credit control holds answers this, at Confirm order (`sfa_workflow_state.set`) or carried forward unconfirmed (`fulfillment.create_from`, or a create that names it as its source). `credit_hold` is retryable once a manager approves the order in MyBizMate, or the customer pays down: keep the order waiting, show `error`, and send it again later. The SFA's stock transfer door (`sfa_stock_transfer.create`) answers these. `warehouse_not_in_company` and `same_warehouse` are permanent for that body: correct the transfer's From and To warehouses and send it again (a refused request stores nothing, so its key is free), or show `error` to a person. `warehouse_inactive` is retryable once the office restores the warehouse in MyBizMate: retry the same body, or send another warehouse under the same key. `transfer_needs_approval` is permanent while the company's Stock Transfers need approval: show `error` to a person, and the office records the transfer in MyBizMate. `agent_not_found` is permanent for that body: send the salesman's own Personnel id, or show `error` to a person. `agent_field_unclear` is retryable once the office gives the Stock Transfer tab exactly one column linked to Personnel: keep the transfer waiting, show `error`, and retry the same body. `item_not_stock` is permanent for that body: show `error` to a person, and the office records the transfer in MyBizMate. `unit_not_convertible` is retryable once the office adds the item's conversion for the unit sent: retry the same body, or send the line in the item's stocking unit under the same key. `warehouse_short` is retryable once the From warehouse holds enough in MyBizMate: retry the same body, or correct the quantities and send them under the same key."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/invoice/list":{"post":{"operationId":"invoice_list","summary":"list a invoice","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/invoice/get":{"post":{"operationId":"invoice_get","summary":"get a invoice","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/invoice/post":{"post":{"operationId":"invoice_post","summary":"post a invoice","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/invoice/void":{"post":{"operationId":"invoice_void","summary":"void a invoice","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/invoice/delete":{"post":{"operationId":"invoice_delete","summary":"delete a invoice","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/invoice/create_from":{"post":{"operationId":"invoice_create_from","summary":"create_from a invoice","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["source_document_id"],"properties":{"doc_date":{"type":"string","format":"date"},"party_id":{"type":"string","format":"uuid"},"source_document_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/invoice/create":{"post":{"operationId":"invoice_create","summary":"create a invoice","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `sheet`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["date","lines"],"properties":{"date":{"type":"string","format":"date"},"lines":{"type":"array","maxItems":200,"minItems":1},"terms":{"type":"string"},"customer_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/bill/list":{"post":{"operationId":"bill_list","summary":"list a bill","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/bill/get":{"post":{"operationId":"bill_get","summary":"get a bill","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/bill/post":{"post":{"operationId":"bill_post","summary":"post a bill","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/bill/void":{"post":{"operationId":"bill_void","summary":"void a bill","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/bill/delete":{"post":{"operationId":"bill_delete","summary":"delete a bill","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/bill/create_from":{"post":{"operationId":"bill_create_from","summary":"create_from a bill","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["purchase_order_id"],"properties":{"doc_date":{"type":"string","format":"date"},"purchase_order_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/bill/create":{"post":{"operationId":"bill_create","summary":"create a bill","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `sheet`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["date","lines"],"properties":{"date":{"type":"string","format":"date"},"lines":{"type":"array","maxItems":200,"minItems":1},"terms":{"type":"string"},"supplier_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/collection/list":{"post":{"operationId":"collection_list","summary":"list a collection","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/collection/get":{"post":{"operationId":"collection_get","summary":"get a collection","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/collection/post":{"post":{"operationId":"collection_post","summary":"post a collection","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/collection/void":{"post":{"operationId":"collection_void","summary":"void a collection","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/collection/delete":{"post":{"operationId":"collection_delete","summary":"delete a collection","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/payment/list":{"post":{"operationId":"payment_list","summary":"list a payment","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/payment/get":{"post":{"operationId":"payment_get","summary":"get a payment","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/payment/post":{"post":{"operationId":"payment_post","summary":"post a payment","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/payment/void":{"post":{"operationId":"payment_void","summary":"void a payment","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/payment/delete":{"post":{"operationId":"payment_delete","summary":"delete a payment","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/credit_memo/list":{"post":{"operationId":"credit_memo_list","summary":"list a credit_memo","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/credit_memo/get":{"post":{"operationId":"credit_memo_get","summary":"get a credit_memo","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/credit_memo/post":{"post":{"operationId":"credit_memo_post","summary":"post a credit_memo","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/credit_memo/void":{"post":{"operationId":"credit_memo_void","summary":"void a credit_memo","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/credit_memo/delete":{"post":{"operationId":"credit_memo_delete","summary":"delete a credit_memo","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/debit_memo/list":{"post":{"operationId":"debit_memo_list","summary":"list a debit_memo","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/debit_memo/get":{"post":{"operationId":"debit_memo_get","summary":"get a debit_memo","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/debit_memo/post":{"post":{"operationId":"debit_memo_post","summary":"post a debit_memo","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/debit_memo/void":{"post":{"operationId":"debit_memo_void","summary":"void a debit_memo","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/debit_memo/delete":{"post":{"operationId":"debit_memo_delete","summary":"delete a debit_memo","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/supplier_memo/list":{"post":{"operationId":"supplier_memo_list","summary":"list a supplier_memo","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/supplier_memo/get":{"post":{"operationId":"supplier_memo_get","summary":"get a supplier_memo","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/supplier_memo/post":{"post":{"operationId":"supplier_memo_post","summary":"post a supplier_memo","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/supplier_memo/void":{"post":{"operationId":"supplier_memo_void","summary":"void a supplier_memo","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/supplier_memo/delete":{"post":{"operationId":"supplier_memo_delete","summary":"delete a supplier_memo","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/wht_received/list":{"post":{"operationId":"wht_received_list","summary":"list a wht_received","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/wht_received/get":{"post":{"operationId":"wht_received_get","summary":"get a wht_received","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/wht_received/post":{"post":{"operationId":"wht_received_post","summary":"post a wht_received","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/wht_received/void":{"post":{"operationId":"wht_received_void","summary":"void a wht_received","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/wht_received/delete":{"post":{"operationId":"wht_received_delete","summary":"delete a wht_received","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/wht_issued/get":{"post":{"operationId":"wht_issued_get","summary":"get a wht_issued","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/wht_issued/list":{"post":{"operationId":"wht_issued_list","summary":"list a wht_issued","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/wht_issued/post":{"post":{"operationId":"wht_issued_post","summary":"post a wht_issued","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/wht_issued/void":{"post":{"operationId":"wht_issued_void","summary":"void a wht_issued","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/wht_issued/delete":{"post":{"operationId":"wht_issued_delete","summary":"delete a wht_issued","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_in/get":{"post":{"operationId":"stock_in_get","summary":"get a stock_in","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_in/list":{"post":{"operationId":"stock_in_list","summary":"list a stock_in","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_in/post":{"post":{"operationId":"stock_in_post","summary":"post a stock_in","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_in/void":{"post":{"operationId":"stock_in_void","summary":"void a stock_in","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_in/delete":{"post":{"operationId":"stock_in_delete","summary":"delete a stock_in","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_out/get":{"post":{"operationId":"stock_out_get","summary":"get a stock_out","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_out/list":{"post":{"operationId":"stock_out_list","summary":"list a stock_out","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_out/post":{"post":{"operationId":"stock_out_post","summary":"post a stock_out","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_out/void":{"post":{"operationId":"stock_out_void","summary":"void a stock_out","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_out/delete":{"post":{"operationId":"stock_out_delete","summary":"delete a stock_out","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_transfer/get":{"post":{"operationId":"stock_transfer_get","summary":"get a stock_transfer","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_transfer/list":{"post":{"operationId":"stock_transfer_list","summary":"list a stock_transfer","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_transfer/post":{"post":{"operationId":"stock_transfer_post","summary":"post a stock_transfer","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_transfer/void":{"post":{"operationId":"stock_transfer_void","summary":"void a stock_transfer","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/stock_transfer/delete":{"post":{"operationId":"stock_transfer_delete","summary":"delete a stock_transfer","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/journal_entry/list":{"post":{"operationId":"journal_entry_list","summary":"list a journal_entry","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/journal_entry/get":{"post":{"operationId":"journal_entry_get","summary":"get a journal_entry","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `doc_types`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/journal_entry/post":{"post":{"operationId":"journal_entry_post","summary":"post a journal_entry","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/journal_entry/void":{"post":{"operationId":"journal_entry_void","summary":"void a journal_entry","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","void_reason"],"properties":{"id":{"type":"string","format":"uuid"},"void_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/journal_entry/delete":{"post":{"operationId":"journal_entry_delete","summary":"delete a journal_entry","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/quotation/list":{"post":{"operationId":"quotation_list","summary":"list a quotation","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"state":{"type":"string"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/quotation/get":{"post":{"operationId":"quotation_get","summary":"get a quotation","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/quotation/create":{"post":{"operationId":"quotation_create","summary":"create a quotation","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["posting_date","lines"],"properties":{"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/quotation/update":{"post":{"operationId":"quotation_update","summary":"update a quotation","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","posting_date","lines"],"properties":{"id":{"type":"string","format":"uuid"},"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/quotation/set_state":{"post":{"operationId":"quotation_set_state","summary":"set_state a quotation","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","to_state"],"properties":{"id":{"type":"string","format":"uuid"},"to_state":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/quotation/discard":{"post":{"operationId":"quotation_discard","summary":"discard a quotation","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/quotation/cancel":{"post":{"operationId":"quotation_cancel","summary":"cancel a quotation","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","cancel_reason"],"properties":{"id":{"type":"string","format":"uuid"},"cancel_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_request/list":{"post":{"operationId":"purchase_request_list","summary":"list a purchase_request","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"state":{"type":"string"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_request/get":{"post":{"operationId":"purchase_request_get","summary":"get a purchase_request","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_request/create":{"post":{"operationId":"purchase_request_create","summary":"create a purchase_request","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["posting_date","lines"],"properties":{"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_request/update":{"post":{"operationId":"purchase_request_update","summary":"update a purchase_request","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","posting_date","lines"],"properties":{"id":{"type":"string","format":"uuid"},"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_request/set_state":{"post":{"operationId":"purchase_request_set_state","summary":"set_state a purchase_request","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","to_state"],"properties":{"id":{"type":"string","format":"uuid"},"to_state":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_request/discard":{"post":{"operationId":"purchase_request_discard","summary":"discard a purchase_request","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_request/cancel":{"post":{"operationId":"purchase_request_cancel","summary":"cancel a purchase_request","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","cancel_reason"],"properties":{"id":{"type":"string","format":"uuid"},"cancel_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_order/list":{"post":{"operationId":"purchase_order_list","summary":"list a purchase_order","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sort":{"type":"string"},"limit":{"type":"number"},"state":{"type":"string"},"offset":{"type":"number"},"status":{"type":"string"},"date_to":{"type":"string","format":"date"},"after_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"date_from":{"type":"string","format":"date"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_order/get":{"post":{"operationId":"purchase_order_get","summary":"get a purchase_order","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `type_codes`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_order/create":{"post":{"operationId":"purchase_order_create","summary":"create a purchase_order","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["posting_date","lines"],"properties":{"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_order/update":{"post":{"operationId":"purchase_order_update","summary":"update a purchase_order","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","posting_date","lines"],"properties":{"id":{"type":"string","format":"uuid"},"lines":{"type":"array","minItems":1},"party_id":{"type":"string","format":"uuid"},"posting_date":{"type":"string","format":"date"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_order/set_state":{"post":{"operationId":"purchase_order_set_state","summary":"set_state a purchase_order","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","to_state"],"properties":{"id":{"type":"string","format":"uuid"},"to_state":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_order/discard":{"post":{"operationId":"purchase_order_discard","summary":"discard a purchase_order","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_order/cancel":{"post":{"operationId":"purchase_order_cancel","summary":"cancel a purchase_order","description":"Called with a company's API key that holds the \"Post, void and cancel\" permission (`post`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"post","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","cancel_reason"],"properties":{"id":{"type":"string","format":"uuid"},"cancel_reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `post` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/purchase_order/create_from":{"post":{"operationId":"purchase_order_create_from","summary":"create_from a purchase_order","description":"Called with a company's API key that holds the \"Create and change drafts\" permission (`write`). The API sets `company_id`, `target_type_code`: leave them out of the body.","x-mybizmate-key-permission":"write","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Reuse to retry the identical request. Reusing it with a different payload is refused."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["source_document_id","lines"],"properties":{"lines":{"type":"array","minItems":1},"source_document_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Accepted and applied. A retry under the same Idempotency-Key is answered the first answer, with the header Idempotent-Replayed: true."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `write` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/company/get":{"post":{"operationId":"company_get","summary":"get a company","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`: leave it out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/customer/list":{"post":{"operationId":"customer_list","summary":"list a customer","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `master`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tin":{"type":"string"},"code":{"type":"string"},"limit":{"type":"number"},"search":{"type":"string"},"after_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/supplier/list":{"post":{"operationId":"supplier_list","summary":"list a supplier","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `master`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tin":{"type":"string"},"code":{"type":"string"},"limit":{"type":"number"},"search":{"type":"string"},"after_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/product/list":{"post":{"operationId":"product_list","summary":"list a product","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `master`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tin":{"type":"string"},"code":{"type":"string"},"limit":{"type":"number"},"search":{"type":"string"},"after_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/warehouse/list":{"post":{"operationId":"warehouse_list","summary":"list a warehouse","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `master`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tin":{"type":"string"},"code":{"type":"string"},"limit":{"type":"number"},"search":{"type":"string"},"after_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/tax_code/list":{"post":{"operationId":"tax_code_list","summary":"list a tax_code","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `master`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tin":{"type":"string"},"code":{"type":"string"},"limit":{"type":"number"},"search":{"type":"string"},"after_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}},"/api/v1/account/list":{"post":{"operationId":"account_list","summary":"list a account","description":"Called with a company's API key that holds the \"Read\" permission (`read`). The API sets `company_id`, `master`: leave them out of the body.","x-mybizmate-key-permission":"read","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Optional, and ignored on this action: it only reads."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tin":{"type":"string"},"code":{"type":"string"},"limit":{"type":"number"},"search":{"type":"string"},"after_id":{"type":"string","format":"uuid"},"updated_since":{"type":"string"}}}}}},"responses":{"200":{"description":"The answer."},"400":{"description":"The body is not a JSON object (`body_invalid`)."},"401":{"description":"The API key or its secret is not valid, or the key is revoked or expired (`invalid_credentials`, `key_revoked`, `key_expired`). A request with no `Authorization: Basic` header is answered as the token API's: `{\"error\": \"unauthenticated\"}`, or a 400 first when its body is not a JSON object."},"403":{"description":"The API key lacks the `read` permission (`missing_scope`), developer mode is off or the plan no longer includes it (`developer_mode_off`, `plan_required`), the person the key acts as is no longer an owner or admin (`key_owner_not_admin`) or may not do this (`permission_denied`), or the body names another company (`company_mismatch`)."},"404":{"description":"No such action (`unknown_action`), or the id names no record of this resource (`not_found`)."},"409":{"description":"The Idempotency-Key was already used for a different request (`idempotency_key_reused`), or for this one more than 7 days ago, past which a retry is not answered from its record (`idempotency_key_expired`), or the request conflicts with a record that already exists (`conflict`)."},"413":{"description":"The body is larger than 1,000,000 bytes (`body_too_large`)."},"422":{"description":"With an API key, every refusal answers `error` (a sentence; a rule of the books refuses in the words shown on screen) and `reason` (a stable code). `validation_failed`, `field_not_allowed`, `invalid_request`, `idempotency_key_invalid` and `discount_amount_required` are permanent for that body: correct it and send it again. `refused`, `permission_denied` and `limit_reached` are a person's to resolve in MyBizMate: show `error`. `cash_terms_post_in_app`: a sales invoice or bill on Cash terms is posted in MyBizMate, where its payment is recorded with it. `not_a_draft`: only a draft is deleted with an API key. `document_invalid`: a sale or bill could not be built from the body; `problems` names each cell at fault (`field`, and `line`, counted from 1, for a line's): correct them and send it again. `cash_terms_in_app`: a sale or bill on Cash terms is entered in MyBizMate, where it posts with its collection or payment; send `\"terms\": \"on_account\"` for one recorded on account."},"429":{"description":"Too many requests for this API key in one minute (`rate_limited`): wait the seconds in Retry-After. Or this key id sent too many times from your address with the same secret, which is not valid (`too_many_failed_attempts`): send the right secret, or wait the seconds in Retry-After."},"500":{"description":"A fault on MyBizMate's side (`server_error`). Send it again under the same Idempotency-Key."},"503":{"description":"MyBizMate is busy with the record (`busy`), stopped a call that ran past the 8 seconds one call may take (`timeout`: nothing was written), or did not answer (`unavailable`): send the same request again under the same Idempotency-Key, after Retry-After. A write may have been made where it was `unavailable`: the key is what keeps it from being made twice."}}}}},"webhooks":{"erp_document.posted":{"post":{"summary":"An ERP document was posted to the general ledger.","description":"Event erp_document.posted v1. Signed with HMAC-SHA256; verify the X-MyBizMate-Signature header over \"<timestamp>.<body>\".","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","const":"erp_document.posted"},"version":{"type":"integer"},"occurred_at":{"type":"string","format":"date-time"},"company_id":{"type":"string","format":"uuid"},"correlation_id":{"type":"string","format":"uuid"},"data":{"type":"object"}}}}}},"responses":{"2xx":{"description":"Acknowledged; any non-2xx is retried."}}}},"document.posted":{"post":{"summary":"A classic sheet document was posted to the general ledger.","description":"Event document.posted v1. Signed with HMAC-SHA256; verify the X-MyBizMate-Signature header over \"<timestamp>.<body>\".","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","const":"document.posted"},"version":{"type":"integer"},"occurred_at":{"type":"string","format":"date-time"},"company_id":{"type":"string","format":"uuid"},"correlation_id":{"type":"string","format":"uuid"},"data":{"type":"object"}}}}}},"responses":{"2xx":{"description":"Acknowledged; any non-2xx is retried."}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"basic","description":"A company's API key: the key ID (mbk_…) as the user name and its secret (mbs_…) as the password. An owner or admin creates one in MyBizMate, on the Developers page, once developer mode is on. A key belongs to one company and acts as the member who created it."},"bearerAuth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://mybizmate.io/oauth/authorize","tokenUrl":"https://mybizmate.io/oauth/token","scopes":{"sales.read":"Read sales documents and their line items.","sales.write":"Create, update and post sales documents.","books.read":"Read classic sheet documents and their journal legs.","books.write":"Create and post classic sheet documents.","masters.read":"Read item, category, personnel and price masters.","pos.read":"Read a connected MyBizMate POS company's status and the book data it needs to sell.","pos.write":"Connect and disconnect a MyBizMate POS company, and send it sales as Classic drafts.","stock_transfer.write":"Move stock between a company's warehouses as posted Stock Transfers (the SFA's van load-outs and returns).","api.read":"Read a company's documents and master data (API keys).","api.write":"Create, change, post and void a company's documents (API keys)."}}}}},"schemas":{"sales_invoice":{"type":"object","properties":{"customer_id":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"grand_total":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"net_total":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"tax_total":{"type":"string","description":"Projected field (registry v1)."}}},"sheet_document":{"type":"object","properties":{"credit":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"debit":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"reference":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."}}},"item":{"type":"object","properties":{"category_id":{"type":"string","description":"Projected field (registry v1)."},"cost":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"image_path":{"type":"string","description":"Projected field (registry v1)."},"is_active":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."},"price":{"type":"string","description":"Projected field (registry v1)."},"sku":{"type":"string","description":"Projected field (registry v1)."},"type":{"type":"string","description":"Projected field (registry v1)."},"unit":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"item_category":{"type":"object","properties":{"created_at":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"is_active":{"type":"string","description":"Projected field (registry v1)."},"level":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."}}},"price_list_line":{"type":"object","properties":{"discount_pct":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"item_code":{"type":"string","description":"Projected field (registry v1)."},"item_id":{"type":"string","description":"Projected field (registry v1)."},"min_qty":{"type":"string","description":"Projected field (registry v1)."},"price_list_code":{"type":"string","description":"Projected field (registry v1)."},"price_list_id":{"type":"string","description":"Projected field (registry v1)."},"unit_price":{"type":"string","description":"Projected field (registry v1)."},"uom":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."},"valid_from":{"type":"string","description":"Projected field (registry v1)."},"valid_to":{"type":"string","description":"Projected field (registry v1)."}}},"sales_order":{"type":"object","properties":{"agent_id":{"type":"string","description":"Projected field (registry v1)."},"customer_id":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"grand_total":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"net_total":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"tax_total":{"type":"string","description":"Projected field (registry v1)."}}},"fulfillment":{"type":"object","properties":{"id":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"source_id":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."}}},"delivery":{"type":"object","properties":{"delivered_at":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"source_id":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_company":{"type":"object","properties":{"id":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"trade_name":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_warehouse":{"type":"object","properties":{"code":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"is_active":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_sales_order":{"type":"object","properties":{"already_gone":{"type":"string","description":"Projected field (registry v1)."},"discarded":{"type":"string","description":"Projected field (registry v1)."},"sales_order_id":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_company_ocr":{"type":"object","properties":{"company_id":{"type":"string","description":"Projected field (registry v1)."},"current_period_end":{"type":"string","description":"Projected field (registry v1)."},"has_full_ocr":{"type":"string","description":"Projected field (registry v1)."},"has_ocr_addon":{"type":"string","description":"Projected field (registry v1)."},"is_max":{"type":"string","description":"Projected field (registry v1)."},"owner_on_ocr_plan":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_company_owner":{"type":"object","properties":{"company_id":{"type":"string","description":"Projected field (registry v1)."},"has_full_ocr":{"type":"string","description":"Projected field (registry v1)."},"is_max":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"trade_name":{"type":"string","description":"Projected field (registry v1)."}}},"pos_company":{"type":"object","properties":{"companies":{"type":"string","description":"Projected field (registry v1)."},"company":{"type":"string","description":"Projected field (registry v1)."},"connection_id":{"type":"string","description":"Projected field (registry v1)."},"entitlement":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_vehicle":{"type":"object","properties":{"id":{"type":"string","description":"Projected field (registry v1)."},"is_active":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."},"plate":{"type":"string","description":"Projected field (registry v1)."},"ppe_group_key":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"tag_no":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_customer":{"type":"object","properties":{"address":{"type":"string","description":"Projected field (registry v1)."},"code":{"type":"string","description":"Projected field (registry v1)."},"display_name":{"type":"string","description":"Projected field (registry v1)."},"entity_type":{"type":"string","description":"Projected field (registry v1)."},"existed":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"is_active":{"type":"string","description":"Projected field (registry v1)."},"kind":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."},"registered_name":{"type":"string","description":"Projected field (registry v1)."},"tin":{"type":"string","description":"Projected field (registry v1)."},"trade_name":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_item_supplier":{"type":"object","properties":{"is_preferred":{"type":"string","description":"Projected field (registry v1)."},"item_id":{"type":"string","description":"Projected field (registry v1)."},"supplier_id":{"type":"string","description":"Projected field (registry v1)."},"supplier_name":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_inventory":{"type":"object","properties":{"cost_price":{"type":"string","description":"Projected field (registry v1)."},"item_id":{"type":"string","description":"Projected field (registry v1)."},"qty_on_hand":{"type":"string","description":"Projected field (registry v1)."},"total_value":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."},"warehouse_id":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_item_default":{"type":"object","properties":{"income_account_id":{"type":"string","description":"Projected field (registry v1)."},"item_id":{"type":"string","description":"Projected field (registry v1)."},"tax_profile_id":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_classic_invoice":{"type":"object","properties":{"created":{"type":"string","description":"Projected field (registry v1)."},"doc_no":{"type":"string","description":"Projected field (registry v1)."},"document_id":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"terms":{"type":"string","description":"Projected field (registry v1)."},"terms_applied":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_workflow_state":{"type":"object","properties":{"from_state":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"terminal":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."},"workflow_state":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_field_ops":{"type":"object","properties":{"document_id":{"type":"string","description":"Projected field (registry v1)."},"logistics":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_logistics":{"type":"object","properties":{"document_id":{"type":"string","description":"Projected field (registry v1)."},"logistics":{"type":"string","description":"Projected field (registry v1)."}}},"pos_item":{"type":"object","properties":{"as_of":{"type":"string","description":"Projected field (registry v1)."},"items":{"type":"string","description":"Projected field (registry v1)."},"next_after_id":{"type":"string","description":"Projected field (registry v1)."}}},"pos_sale":{"type":"object","properties":{"doc_no":{"type":"string","description":"Projected field (registry v1)."},"document_id":{"type":"string","description":"Projected field (registry v1)."},"line_count":{"type":"string","description":"Projected field (registry v1)."},"output_vat":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."}}},"personnel":{"type":"object","properties":{"code":{"type":"string","description":"Projected field (registry v1)."},"contact_no":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"is_active":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."},"roles":{"type":"string","description":"Projected field (registry v1)."},"sales_agent_type":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."},"warehouse_id":{"type":"string","description":"Projected field (registry v1)."}}},"document":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"pos_setup":{"type":"object","properties":{"ar_ready":{"type":"string","description":"Projected field (registry v1)."},"cash_accounts":{"type":"string","description":"Projected field (registry v1)."},"company":{"type":"string","description":"Projected field (registry v1)."},"default_cash_account_id":{"type":"string","description":"Projected field (registry v1)."},"default_tax_code":{"type":"string","description":"Projected field (registry v1)."},"default_warehouse_id":{"type":"string","description":"Projected field (registry v1)."},"entitlement":{"type":"string","description":"Projected field (registry v1)."},"item_categories":{"type":"string","description":"Projected field (registry v1)."},"output_vat_ready":{"type":"string","description":"Projected field (registry v1)."},"price_levels":{"type":"string","description":"Projected field (registry v1)."},"sale_door_versions":{"type":"string","description":"Projected field (registry v1)."},"statutory":{"type":"string","description":"Projected field (registry v1)."},"tax_profiles":{"type":"string","description":"Projected field (registry v1)."},"various_customers":{"type":"string","description":"Projected field (registry v1)."},"warehouses":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_payment_method":{"type":"object","properties":{"account_code":{"type":"string","description":"Projected field (registry v1)."},"account_id":{"type":"string","description":"Projected field (registry v1)."},"account_name":{"type":"string","description":"Projected field (registry v1)."},"method":{"type":"string","description":"Projected field (registry v1)."},"money_in_now":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_collection":{"type":"object","properties":{"already_gone":{"type":"string","description":"Projected field (registry v1)."},"deleted_at":{"type":"string","description":"Projected field (registry v1)."},"discarded":{"type":"string","description":"Projected field (registry v1)."},"doc_no":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"sfa_payment_id":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"voided_at":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_credit_memo":{"type":"object","properties":{"deleted":{"type":"string","description":"Projected field (registry v1)."},"deleted_at":{"type":"string","description":"Projected field (registry v1)."},"doc_no":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"sfa_return_id":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"voided_at":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_receivable":{"type":"object","properties":{"as_of":{"type":"string","description":"Projected field (registry v1)."},"invoices":{"type":"string","description":"Projected field (registry v1)."},"oldest_due_date":{"type":"string","description":"Projected field (registry v1)."},"open_balance":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_document_file":{"type":"object","properties":{"deleted":{"type":"string","description":"Projected field (registry v1)."},"document_id":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"storage_path":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_customer_registration":{"type":"object","properties":{"decided_at":{"type":"string","description":"Projected field (registry v1)."},"decision_reason":{"type":"string","description":"Projected field (registry v1)."},"missing":{"type":"string","description":"Projected field (registry v1)."},"party":{"type":"string","description":"Projected field (registry v1)."},"registration_id":{"type":"string","description":"Projected field (registry v1)."},"return_reason":{"type":"string","description":"Projected field (registry v1)."},"sfa_customer_id":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_stock_transfer":{"type":"object","properties":{"doc_no":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."}}},"sfa_item_unit":{"type":"object","properties":{"item_id":{"type":"string","description":"Projected field (registry v1)."},"qty_per":{"type":"string","description":"Projected field (registry v1)."},"uom":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"invoice":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"bill":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"collection":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"payment":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"credit_memo":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"debit_memo":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"supplier_memo":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"wht_received":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"wht_issued":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"stock_in":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"stock_out":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"stock_transfer":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"journal_entry":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"posted_at":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"quotation":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"net_total":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"state":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"tax_total":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"purchase_request":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"net_total":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"state":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"tax_total":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"purchase_order":{"type":"object","properties":{"currency":{"type":"string","description":"Projected field (registry v1)."},"date":{"type":"string","description":"Projected field (registry v1)."},"due_date":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"memo":{"type":"string","description":"Projected field (registry v1)."},"net_total":{"type":"string","description":"Projected field (registry v1)."},"number":{"type":"string","description":"Projected field (registry v1)."},"party_id":{"type":"string","description":"Projected field (registry v1)."},"reference_no":{"type":"string","description":"Projected field (registry v1)."},"state":{"type":"string","description":"Projected field (registry v1)."},"status":{"type":"string","description":"Projected field (registry v1)."},"tax_total":{"type":"string","description":"Projected field (registry v1)."},"total":{"type":"string","description":"Projected field (registry v1)."},"updated_at":{"type":"string","description":"Projected field (registry v1)."}}},"company":{"type":"object","properties":{"id":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."},"tin":{"type":"string","description":"Projected field (registry v1)."}}},"customer":{"type":"object","properties":{"code":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."}}},"supplier":{"type":"object","properties":{"code":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."}}},"product":{"type":"object","properties":{"code":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."}}},"warehouse":{"type":"object","properties":{"code":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."}}},"tax_code":{"type":"object","properties":{"code":{"type":"string","description":"Projected field (registry v1)."},"description":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."}}},"account":{"type":"object","properties":{"code":{"type":"string","description":"Projected field (registry v1)."},"id":{"type":"string","description":"Projected field (registry v1)."},"name":{"type":"string","description":"Projected field (registry v1)."}}}}}}