{"openapi":"3.1.0","info":{"title":"InvoiceCast API","version":"v1","description":"The InvoiceCast REST API for Business-plan integrations. Money is integer minor units with a currency; identifiers are UUIDs; collections use opaque cursors; every request but this document and the signed PDF download names its app in X-IC-Client, and every POST and PATCH needs an Idempotency-Key. Every PATCH is partial: a field you omit is unchanged. Generated from the application code."},"servers":[{"url":"https://invoicecast.com/api/v1"},{"url":"https://invoicecast.ca/api/v1"}],"security":[{"bearerAuth":[]}],"paths":{"/account":{"get":{"operationId":"api.account.show","tags":["account"],"summary":"Get the account","x-ic-ability":"account:read","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"If-None-Match","in":"header","required":false,"description":"An ETag; 304 when nothing changed (\u00a78.2).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get the account","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Account"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"304":{"description":"Not modified (If-None-Match matched)."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"api.account.update","tags":["account"],"summary":"Update the account","x-ic-ability":"account:write","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag from your last GET. A mismatch is 409 `stale` with the current representation (\u00a77.3).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","enum":["en-ca","fr-ca"]},"timezone":{"type":"string"}}}}}},"responses":{"200":{"description":"Update the account","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Account"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api-keys":{"get":{"operationId":"api.api-keys.index","tags":["api-keys"],"summary":"List API keys","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque `next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List API keys","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"api.api-keys.store","tags":["api-keys"],"summary":"Create an API key","description":"The plaintext `key` is returned once, on this response only. Business plan.","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"abilities":{"type":"array","minItems":1,"items":{"type":"string","enum":["clients:read","clients:write","catalog_items:read","catalog_items:write","invoices:read","invoices:write","quotes:read","quotes:write","receipts:read","receipts:write","expenses:read","expenses:write","tax_formulas:read","business_profiles:read","business_profiles:write","account:read","account:write","reports:read"]}},"expires_in_days":{"type":["integer","null"],"enum":[30,90,365]},"name":{"type":"string","maxLength":100}},"required":["abilities","name"]}}}},"responses":{"201":{"description":"Create an API key","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKey"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/api-keys/{apiKey}":{"delete":{"operationId":"api.api-keys.destroy","tags":["api-keys"],"summary":"Revoke an API key","parameters":[{"name":"apiKey","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Revoke an API key","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKey"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/auth/apple":{"post":{"operationId":"api.auth.apple","tags":["auth"],"summary":"Sign in with Apple","description":"Takes the identity token, authorization code and raw nonce from ASAuthorizationAppleIDCredential. The request to Apple must carry the SHA-256 (hex) of the nonce.","security":[],"parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"authorization_code":{"type":"string","maxLength":2048},"device_id":{"type":"string","format":"uuid"},"device_name":{"type":"string","maxLength":100},"family_name":{"type":["string","null"],"maxLength":100},"given_name":{"type":["string","null"],"maxLength":100},"identity_token":{"type":"string","maxLength":4096},"nonce":{"type":"string","minLength":16,"maxLength":255}},"required":["authorization_code","device_id","device_name","identity_token","nonce"]}}}},"responses":{"201":{"description":"Sign in with Apple","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TokenIssued"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/auth/devices":{"get":{"operationId":"api.auth.devices.index","tags":["auth"],"summary":"List signed-in devices","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List signed-in devices","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Device"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/auth/devices/{apiDevice}":{"delete":{"operationId":"api.auth.devices.destroy","tags":["auth"],"summary":"Sign out a device","parameters":[{"name":"apiDevice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Sign out a device"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/auth/email/resend":{"post":{"operationId":"api.auth.email.resend","tags":["auth"],"summary":"Resend the email verification link","security":[],"parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":255},"password":{"type":"string"}},"required":["email","password"]}}}},"responses":{"200":{"description":"Resend the email verification link","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VerificationResent"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/auth/google":{"post":{"operationId":"api.auth.google","tags":["auth"],"summary":"Sign in with a Google ID token","security":[],"parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"device_id":{"type":"string","format":"uuid"},"device_name":{"type":"string","maxLength":100},"id_token":{"type":"string"}},"required":["device_id","device_name","id_token"]}}}},"responses":{"201":{"description":"Sign in with a Google ID token","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TokenIssued"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/auth/login":{"post":{"operationId":"api.auth.login","tags":["auth"],"summary":"Sign in with email and password","description":"201 with a device token, or 202 when the account has two-factor sign-in: complete it with POST /auth/two-factor.","security":[],"parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"device_id":{"type":"string","format":"uuid"},"device_name":{"type":"string","maxLength":100},"email":{"type":"string","format":"email","maxLength":255},"password":{"type":"string"}},"required":["device_id","device_name","email","password"]}}}},"responses":{"201":{"description":"Sign in with email and password","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TokenIssued"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"202":{"description":"TwoFactorChallenge.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TwoFactorChallenge"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/auth/logout":{"post":{"operationId":"api.auth.logout","tags":["auth"],"summary":"Sign out this device","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Sign out this device"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/auth/two-factor":{"post":{"operationId":"api.auth.two-factor","tags":["auth"],"summary":"Complete a two-factor sign-in","security":[],"parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"challenge_id":{"type":"string"},"code":{},"device_id":{"type":"string","format":"uuid"},"device_name":{"type":"string","maxLength":100}},"required":["challenge_id","code","device_id","device_name"]}}}},"responses":{"201":{"description":"Complete a two-factor sign-in","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TokenIssued"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/business-categories":{"get":{"operationId":"api.business-categories.index","tags":["business-categories"],"summary":"List business categories","x-ic-ability":"business_profiles:read","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List business categories","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BusinessCategory"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/business-profiles":{"get":{"operationId":"api.business-profiles.index","tags":["business-profiles"],"summary":"List business profiles","x-ic-ability":"business_profiles:read","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque `next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"RFC 3339 timestamp: only rows changed after it, soft-deleted ones included (\u00a78.1).","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"`active` or `archived`.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List business profiles","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BusinessProfile"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/business-profiles/{businessProfile}":{"get":{"operationId":"api.business-profiles.show","tags":["business-profiles"],"summary":"Get a business profile","x-ic-ability":"business_profiles:read","parameters":[{"name":"businessProfile","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"If-None-Match","in":"header","required":false,"description":"An ETag; 304 when nothing changed (\u00a78.2).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get a business profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BusinessProfile"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"304":{"description":"Not modified (If-None-Match matched)."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"api.business-profiles.update","tags":["business-profiles"],"summary":"Update a business profile","x-ic-ability":"business_profiles:write","parameters":[{"name":"businessProfile","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag from your last GET. A mismatch is 409 `stale` with the current representation (\u00a77.3).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"accounts_payable_email":{"type":["string","null"],"format":"email","maxLength":255},"address_line_1":{"type":["string","null"],"maxLength":255},"address_line_2":{"type":["string","null"],"maxLength":255},"business_category":{"type":["string","null"],"maxLength":100},"business_category_other":{},"city":{"type":["string","null"],"maxLength":120},"country_code":{"type":["string","null"],"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"minLength":2,"maxLength":2},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"default_notes":{"type":["string","null"],"maxLength":2000},"default_payment_terms_days":{"type":["integer","null"],"minimum":0,"maximum":365},"default_supply_treatment":{"enum":["taxable","exempt","zero_rated","unknown",null]},"default_tax_formula_uuid":{"type":["string","null"],"maxLength":36},"document_filename_pattern":{"type":["string","null"],"maxLength":100},"email":{"type":["string","null"],"format":"email","maxLength":255},"entity_type":{"enum":["sole_proprietorship","corporation","partnership","llc"]},"home_provincial_registration":{"enum":["registered","not_registered","unknown",null]},"invoice_prefix":{"type":["string","null"],"maxLength":20},"name":{"type":"string","maxLength":255},"phone":{"type":["string","null"],"maxLength":40},"postal_code":{"type":["string","null"],"maxLength":20},"quote_prefix":{"type":["string","null"],"maxLength":20},"region_code":{"type":["string","null"],"maxLength":8},"tax_country":{"type":["string","null"],"enum":["CA","US","GB","FR","DE","IT","ES","NL","BE","IE","AU","NZ","OTHER"]},"tax_id":{"type":["string","null"],"maxLength":255},"tax_id_secondary":{"type":["string","null"],"maxLength":255},"tax_registration_status":{"enum":["registered","not_registered","unknown",null]},"website":{"type":["string","null"],"format":"uri","maxLength":255}}}}}},"responses":{"200":{"description":"Update a business profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BusinessProfile"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/catalog-items":{"get":{"operationId":"api.catalog-items.index","tags":["catalog-items"],"summary":"List catalog items","x-ic-ability":"catalog_items:read","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque `next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"RFC 3339 timestamp: only rows changed after it, soft-deleted ones included (\u00a78.1).","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"Name or description contains.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List catalog items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogItem"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"api.catalog-items.store","tags":["catalog-items"],"summary":"Create a catalog item","x-ic-ability":"catalog_items:write","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"default_quantity":{"type":"number","minimum":0,"maximum":9999999.999},"description":{"type":["string","null"],"maxLength":2000},"is_active":{"type":"boolean"},"name":{"type":"string","maxLength":255},"tax_treatment":{"enum":["exempt","zero_rated",null]},"type":{"type":"string","enum":["service","product","other"]},"unit_price":{"type":"number","minimum":0,"maximum":9999999999.99}},"required":["currency","default_quantity","is_active","name","type","unit_price"]}}}},"responses":{"201":{"description":"Create a catalog item","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CatalogItem"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/catalog-items/{item}":{"get":{"operationId":"api.catalog-items.show","tags":["catalog-items"],"summary":"Get a catalog item","x-ic-ability":"catalog_items:read","parameters":[{"name":"item","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"If-None-Match","in":"header","required":false,"description":"An ETag; 304 when nothing changed (\u00a78.2).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get a catalog item","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CatalogItem"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"304":{"description":"Not modified (If-None-Match matched)."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"api.catalog-items.update","tags":["catalog-items"],"summary":"Update a catalog item","x-ic-ability":"catalog_items:write","parameters":[{"name":"item","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag from your last GET. A mismatch is 409 `stale` with the current representation (\u00a77.3).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"default_quantity":{"type":"number","minimum":0,"maximum":9999999.999},"description":{"type":["string","null"],"maxLength":2000},"is_active":{"type":"boolean"},"name":{"type":"string","maxLength":255},"tax_treatment":{"enum":["exempt","zero_rated",null]},"type":{"type":"string","enum":["service","product","other"]},"unit_price":{"type":"number","minimum":0,"maximum":9999999999.99}}}}}},"responses":{"200":{"description":"Update a catalog item","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CatalogItem"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"operationId":"api.catalog-items.destroy","tags":["catalog-items"],"summary":"Delete a catalog item","x-ic-ability":"catalog_items:write","parameters":[{"name":"item","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Delete a catalog item"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/categories":{"get":{"operationId":"api.categories.index","tags":["categories"],"summary":"List expense categories","x-ic-ability":"expenses:read","x-ic-tier":"pro","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque `next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"RFC 3339 timestamp: only rows changed after it, soft-deleted ones included (\u00a78.1).","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List expense categories","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/clients":{"get":{"operationId":"api.clients.index","tags":["clients"],"summary":"List clients","x-ic-ability":"clients:read","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque `next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"RFC 3339 timestamp: only rows changed after it, soft-deleted ones included (\u00a78.1).","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"Name or email contains.","schema":{"type":"string"}},{"name":"include","in":"query","required":false,"description":"`invoice_count`.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List clients","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Client"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"api.clients.store","tags":["clients"],"summary":"Create a client","x-ic-ability":"clients:write","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address_text":{"type":["string","null"],"maxLength":500},"business":{"type":["string","null"],"maxLength":36},"country_code":{"type":["string","null"],"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"minLength":2,"maxLength":2},"email":{"type":["string","null"],"format":"email","maxLength":255},"name":{"type":"string","maxLength":255},"notes":{"type":["string","null"],"maxLength":2000},"phone":{"type":["string","null"],"maxLength":50},"preferred_language":{"enum":["en","fr",null]},"region_code":{"type":["string","null"],"maxLength":8},"tax_id":{"type":["string","null"],"maxLength":255}},"required":["name"]}}}},"responses":{"201":{"description":"Create a client","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Client"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/clients/{client}":{"get":{"operationId":"api.clients.show","tags":["clients"],"summary":"Get a client","x-ic-ability":"clients:read","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"include","in":"query","required":false,"description":"`invoice_count`.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"If-None-Match","in":"header","required":false,"description":"An ETag; 304 when nothing changed (\u00a78.2).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get a client","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Client"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"304":{"description":"Not modified (If-None-Match matched)."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"api.clients.update","tags":["clients"],"summary":"Update a client","x-ic-ability":"clients:write","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag from your last GET. A mismatch is 409 `stale` with the current representation (\u00a77.3).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"address_text":{"type":["string","null"],"maxLength":500},"business":{"type":["string","null"],"maxLength":36},"country_code":{"type":["string","null"],"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"minLength":2,"maxLength":2},"email":{"type":["string","null"],"format":"email","maxLength":255},"name":{"type":"string","maxLength":255},"notes":{"type":["string","null"],"maxLength":2000},"phone":{"type":["string","null"],"maxLength":50},"preferred_language":{"enum":["en","fr",null]},"region_code":{"type":["string","null"],"maxLength":8},"return_to_invoice":{"type":["string","null"],"format":"uuid"},"tax_id":{"type":["string","null"],"maxLength":255}}}}}},"responses":{"200":{"description":"Update a client","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Client"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"operationId":"api.clients.destroy","tags":["clients"],"summary":"Delete a client","x-ic-ability":"clients:write","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Delete a client"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/expenses":{"get":{"operationId":"api.expenses.index","tags":["expenses"],"summary":"List expenses","x-ic-ability":"expenses:read","x-ic-tier":"pro","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque `next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"RFC 3339 timestamp: only rows changed after it, soft-deleted ones included (\u00a78.1).","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD, inclusive.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD, inclusive.","schema":{"type":"string"}},{"name":"category","in":"query","required":false,"description":"Category uuid.","schema":{"type":"string"}},{"name":"business_profile","in":"query","required":false,"description":"Business profile uuid.","schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"description":"ISO 4217 code.","schema":{"type":"string"}},{"name":"itc","in":"query","required":false,"description":"Input tax credit eligibility filter.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List expenses","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Expense"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"api.expenses.store","tags":["expenses"],"summary":"Create an expense","x-ic-ability":"expenses:write","x-ic-tier":"pro","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category_uuid":{"type":"string","maxLength":36},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"description":{"type":["string","null"],"maxLength":2000},"expense_date":{"type":"string","format":"date"},"itc_eligibility":{"enum":["eligible","partial","not_eligible","unknown",null]},"itc_percent":{"type":["number","null"],"minimum":0.01,"maximum":100},"notes":{"type":["string","null"],"maxLength":2000},"subtotal":{"type":"number","maximum":9999999999.99},"supplier_tax_id":{"type":["string","null"],"maxLength":100},"tax_breakdown":{"type":["array","null"],"items":{"type":"object","properties":{"compound":{"type":"boolean"},"name":{"type":"string","maxLength":100},"rate":{"type":"number","minimum":0},"tax_amount":{"type":"number","minimum":0}},"required":["name","rate","tax_amount"]}},"tax_formula_uuid":{"type":["string","null"],"maxLength":36},"vendor_name":{"type":"string","maxLength":255}},"required":["category_uuid","currency","expense_date","subtotal","vendor_name"]}}}},"responses":{"201":{"description":"Create an expense","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Expense"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/expenses/{expense}":{"get":{"operationId":"api.expenses.show","tags":["expenses"],"summary":"Get an expense","x-ic-ability":"expenses:read","x-ic-tier":"pro","parameters":[{"name":"expense","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"If-None-Match","in":"header","required":false,"description":"An ETag; 304 when nothing changed (\u00a78.2).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get an expense","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Expense"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"304":{"description":"Not modified (If-None-Match matched)."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"api.expenses.update","tags":["expenses"],"summary":"Update an expense","x-ic-ability":"expenses:write","x-ic-tier":"pro","parameters":[{"name":"expense","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag from your last GET. A mismatch is 409 `stale` with the current representation (\u00a77.3).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"category_uuid":{"type":"string","maxLength":36},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"description":{"type":["string","null"],"maxLength":2000},"expense_date":{"type":"string","format":"date"},"itc_eligibility":{"enum":["eligible","partial","not_eligible","unknown",null]},"itc_percent":{"type":["number","null"],"minimum":0.01,"maximum":100},"notes":{"type":["string","null"],"maxLength":2000},"subtotal":{"type":"number","maximum":9999999999.99},"supplier_tax_id":{"type":["string","null"],"maxLength":100},"tax_breakdown":{"type":["array","null"],"items":{"type":"object","properties":{"compound":{"type":"boolean"},"name":{"type":"string","maxLength":100},"rate":{"type":"number","minimum":0},"tax_amount":{"type":"number","minimum":0}},"required":["name","rate","tax_amount"]}},"tax_formula_uuid":{"type":["string","null"],"maxLength":36},"vendor_name":{"type":"string","maxLength":255}}}}}},"responses":{"200":{"description":"Update an expense","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Expense"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"operationId":"api.expenses.destroy","tags":["expenses"],"summary":"Delete an expense","x-ic-ability":"expenses:write","x-ic-tier":"pro","parameters":[{"name":"expense","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Delete an expense"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/expenses/{expense}/receipt":{"get":{"operationId":"api.expenses.receipt.show","tags":["expenses"],"summary":"Download an expense receipt","description":"Streams the file with the same bearer credential; the real type is in `Content-Type`.","x-ic-ability":"expenses:read","x-ic-tier":"pro","parameters":[{"name":"expense","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Download an expense receipt","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"api.expenses.receipt.store","tags":["expenses"],"summary":"Attach or replace an expense receipt","x-ic-ability":"expenses:write","x-ic-tier":"pro","parameters":[{"name":"expense","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"receipt":{"type":"string","format":"binary"}},"required":["receipt"]}}}},"responses":{"200":{"description":"Attach or replace an expense receipt","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Expense"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"operationId":"api.expenses.receipt.destroy","tags":["expenses"],"summary":"Remove an expense receipt","x-ic-ability":"expenses:write","x-ic-tier":"pro","parameters":[{"name":"expense","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Remove an expense receipt","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Expense"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/invoices":{"get":{"operationId":"api.invoices.index","tags":["invoices"],"summary":"List invoices","x-ic-ability":"invoices:read","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque `next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"RFC 3339 timestamp: only rows changed after it, soft-deleted ones included (\u00a78.1).","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"An invoice status.","schema":{"type":"string"}},{"name":"client","in":"query","required":false,"description":"Client uuid.","schema":{"type":"string"}},{"name":"business_profile","in":"query","required":false,"description":"Business profile uuid.","schema":{"type":"string"}},{"name":"issued_from","in":"query","required":false,"description":"YYYY-MM-DD, inclusive.","schema":{"type":"string"}},{"name":"issued_to","in":"query","required":false,"description":"YYYY-MM-DD, inclusive.","schema":{"type":"string"}},{"name":"include","in":"query","required":false,"description":"Comma-separated: `line_items`, `client`, `payments`.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List invoices","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"api.invoices.store","tags":["invoices"],"summary":"Create a draft invoice","x-ic-ability":"invoices:write","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_uuid":{"type":["string","null"],"maxLength":36},"color_scheme":{"enum":["ink","ocean","ember","forest","plum",null]},"credit_amount":{"type":["number","null"],"minimum":0,"maximum":999999999},"credit_note":{"type":["string","null"],"maxLength":500},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"custom_labels":{"type":["object","null"],"properties":{"bill_to_label":{"type":["string","null"],"maxLength":100},"col_amount":{"type":["string","null"],"maxLength":100},"col_description":{"type":["string","null"],"maxLength":100},"col_qty":{"type":["string","null"],"maxLength":100},"col_rate":{"type":["string","null"],"maxLength":100},"document_title":{"type":["string","null"],"maxLength":100}}},"discount_type":{"enum":["none","percentage","fixed"]},"discount_value":{"type":["number","null"],"minimum":0,"maximum":999999999},"due_date":{"type":["string","null"],"format":"date"},"hide_logo":{"type":["boolean","null"]},"invoice_number":{"type":["string","null"],"maxLength":50},"issue_date":{"type":"string","format":"date"},"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":2000},"quantity":{"type":"number","minimum":0},"sort_order":{"type":["integer","null"],"minimum":0},"supply_kind":{"enum":["goods",null]},"tax_treatment":{"enum":["exempt","zero_rated",null]},"unit":{"type":["string","null"],"maxLength":50},"unit_price":{"type":"number"}},"required":["description","quantity","unit_price"]}},"notes":{"type":["string","null"],"maxLength":5000},"recipient_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"email":{"type":["string","null"],"format":"email","maxLength":255},"name":{"type":["string","null"],"maxLength":255},"phone":{"type":["string","null"],"maxLength":50},"tax_id":{"type":["string","null"],"maxLength":100}}},"sender_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"name":{"type":["string","null"],"maxLength":255},"tax_id":{"type":["string","null"],"maxLength":100},"tax_id_secondary":{"type":["string","null"],"maxLength":100}}},"ship_to_address":{"type":["string","null"],"maxLength":2000},"ship_to_country":{"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW",null]},"ship_to_name":{"type":["string","null"],"maxLength":500},"ship_to_region":{"enum":[null]},"tax_breakdown":{"type":["array","null"]},"tax_formula_uuid":{"type":["string","null"],"maxLength":36},"tax_mode":{"enum":["auto","manual","quoted",null]},"tax_total":{"type":["number","null"],"minimum":0},"template":{"enum":["classic","modern","executive","minimal",null]}},"required":["currency","discount_type","issue_date","items"]}}}},"responses":{"201":{"description":"Create a draft invoice","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/invoices/{invoice}":{"get":{"operationId":"api.invoices.show","tags":["invoices"],"summary":"Get a invoice","x-ic-ability":"invoices:read","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"include","in":"query","required":false,"description":"Comma-separated: `line_items`, `client`, `payments`.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"If-None-Match","in":"header","required":false,"description":"An ETag; 304 when nothing changed (\u00a78.2).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get a invoice","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"304":{"description":"Not modified (If-None-Match matched)."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"api.invoices.update","tags":["invoices"],"summary":"Update a draft invoice","x-ic-ability":"invoices:write","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag from your last GET. A mismatch is 409 `stale` with the current representation (\u00a77.3).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"client_uuid":{"type":["string","null"],"maxLength":36},"color_scheme":{"enum":["ink","ocean","ember","forest","plum",null]},"credit_amount":{"type":["number","null"],"minimum":0,"maximum":999999999},"credit_note":{"type":["string","null"],"maxLength":500},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"custom_labels":{"type":["object","null"],"properties":{"bill_to_label":{"type":["string","null"],"maxLength":100},"col_amount":{"type":["string","null"],"maxLength":100},"col_description":{"type":["string","null"],"maxLength":100},"col_qty":{"type":["string","null"],"maxLength":100},"col_rate":{"type":["string","null"],"maxLength":100},"document_title":{"type":["string","null"],"maxLength":100}}},"discount_type":{"enum":["none","percentage","fixed"]},"discount_value":{"type":["number","null"],"minimum":0,"maximum":999999999},"due_date":{"type":["string","null"],"format":"date"},"hide_logo":{"type":["boolean","null"]},"invoice_number":{"type":["string","null"],"maxLength":50},"issue_date":{"type":"string","format":"date"},"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":2000},"quantity":{"type":"number","minimum":0},"sort_order":{"type":["integer","null"],"minimum":0},"supply_kind":{"enum":["goods",null]},"tax_treatment":{"enum":["exempt","zero_rated",null]},"unit":{"type":["string","null"],"maxLength":50},"unit_price":{"type":"number"}},"required":["description","quantity","unit_price"]}},"notes":{"type":["string","null"],"maxLength":5000},"payments_enabled":{"type":["boolean","null"]},"recipient_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"email":{"type":["string","null"],"format":"email","maxLength":255},"name":{"type":["string","null"],"maxLength":255},"phone":{"type":["string","null"],"maxLength":50},"tax_id":{"type":["string","null"],"maxLength":100}}},"sender_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"name":{"type":["string","null"],"maxLength":255},"tax_id":{"type":["string","null"],"maxLength":100},"tax_id_secondary":{"type":["string","null"],"maxLength":100}}},"ship_to_address":{"type":["string","null"],"maxLength":2000},"ship_to_country":{"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW",null]},"ship_to_name":{"type":["string","null"],"maxLength":500},"ship_to_region":{"enum":[null]},"tax_breakdown":{"type":["array","null"]},"tax_formula_uuid":{"type":["string","null"],"maxLength":36},"tax_mode":{"enum":["auto","manual","quoted",null]},"tax_total":{"type":["number","null"],"minimum":0},"template":{"enum":["classic","modern","executive","minimal",null]}}}}}},"responses":{"200":{"description":"Update a draft invoice","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"operationId":"api.invoices.destroy","tags":["invoices"],"summary":"Delete a draft invoice","x-ic-ability":"invoices:write","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Delete a draft invoice"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/invoices/{invoice}/cancel":{"post":{"operationId":"api.invoices.cancel","tags":["invoices"],"summary":"Cancel a sent invoice","description":"For a sent, viewed or overdue invoice.","x-ic-ability":"invoices:write","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Cancel a sent invoice","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/invoices/{invoice}/finalize":{"post":{"operationId":"api.invoices.finalize","tags":["invoices"],"summary":"Finalize a draft invoice: assign its number and freeze it","x-ic-ability":"invoices:write","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"client_uuid":{"type":["string","null"],"maxLength":36},"color_scheme":{"enum":["ink","ocean","ember","forest","plum",null]},"credit_amount":{"type":["number","null"],"minimum":0,"maximum":999999999},"credit_note":{"type":["string","null"],"maxLength":500},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"custom_labels":{"type":["object","null"],"properties":{"bill_to_label":{"type":["string","null"],"maxLength":100},"col_amount":{"type":["string","null"],"maxLength":100},"col_description":{"type":["string","null"],"maxLength":100},"col_qty":{"type":["string","null"],"maxLength":100},"col_rate":{"type":["string","null"],"maxLength":100},"document_title":{"type":["string","null"],"maxLength":100}}},"discount_type":{"enum":["none","percentage","fixed"]},"discount_value":{"type":["number","null"],"minimum":0,"maximum":999999999},"due_date":{"type":["string","null"],"format":"date"},"hide_logo":{"type":["boolean","null"]},"invoice_number":{"type":["string","null"],"maxLength":50},"issue_date":{"type":"string","format":"date"},"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":2000},"quantity":{"type":"number","minimum":0},"sort_order":{"type":["integer","null"],"minimum":0},"supply_kind":{"enum":["goods",null]},"tax_treatment":{"enum":["exempt","zero_rated",null]},"unit":{"type":["string","null"],"maxLength":50},"unit_price":{"type":"number"}},"required":["description","quantity","unit_price"]}},"notes":{"type":["string","null"],"maxLength":5000},"payments_enabled":{"type":["boolean","null"]},"recipient_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"email":{"type":["string","null"],"format":"email","maxLength":255},"name":{"type":["string","null"],"maxLength":255},"phone":{"type":["string","null"],"maxLength":50},"tax_id":{"type":["string","null"],"maxLength":100}}},"sender_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"name":{"type":["string","null"],"maxLength":255},"tax_id":{"type":["string","null"],"maxLength":100},"tax_id_secondary":{"type":["string","null"],"maxLength":100}}},"ship_to_address":{"type":["string","null"],"maxLength":2000},"ship_to_country":{"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW",null]},"ship_to_name":{"type":["string","null"],"maxLength":500},"ship_to_region":{"enum":[null]},"tax_breakdown":{"type":["array","null"]},"tax_formula_uuid":{"type":["string","null"],"maxLength":36},"tax_mode":{"enum":["auto","manual","quoted",null]},"tax_total":{"type":["number","null"],"minimum":0},"template":{"enum":["classic","modern","executive","minimal",null]}}}}}},"responses":{"200":{"description":"Finalize a draft invoice: assign its number and freeze it","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/invoices/{invoice}/mark-paid":{"post":{"operationId":"api.invoices.mark-paid","tags":["invoices"],"summary":"Mark the invoice as paid","x-ic-ability":"invoices:write","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Mark the invoice as paid","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/invoices/{invoice}/mark-sent":{"post":{"operationId":"api.invoices.mark-sent","tags":["invoices"],"summary":"Mark the invoice as sent without emailing it","x-ic-ability":"invoices:write","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Mark the invoice as sent without emailing it","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/invoices/{invoice}/pdf":{"get":{"operationId":"api.invoices.pdf","tags":["invoices"],"summary":"Download the invoice PDF","description":"Redirects to a short-lived signed URL that serves the PDF; follow the `Location` header.","x-ic-ability":"invoices:read","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"302":{"description":"Download the invoice PDF"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/invoices/{invoice}/pdf-file":{"get":{"operationId":"api.invoices.pdf-file","tags":["invoices"],"summary":"Signed invoice PDF download","description":"The target of the `pdf` redirect. Authorized by its signature, not a bearer credential.","security":[],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Signed invoice PDF download","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/invoices/{invoice}/reopen":{"post":{"operationId":"api.invoices.reopen","tags":["invoices"],"summary":"Unlock a finalized draft for editing","x-ic-ability":"invoices:write","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Unlock a finalized draft for editing","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/invoices/{invoice}/resend":{"post":{"operationId":"api.invoices.resend","tags":["invoices"],"summary":"Email a sent invoice to the client again","description":"For a sent, viewed or overdue invoice. Same optional body as send.","x-ic-ability":"invoices:write","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Email a sent invoice to the client again","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/invoices/{invoice}/send":{"post":{"operationId":"api.invoices.send","tags":["invoices"],"summary":"Email the invoice to the client","description":"Optional body: `channel` (only `invoicecast` is supported; anything else is 422 `channel_unsupported`) and `send_copy` (boolean, BCC yourself).","x-ic-ability":"invoices:write","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Email the invoice to the client","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/me":{"get":{"operationId":"api.me.show","tags":["me"],"summary":"Get the signed-in user","x-ic-ability":"account:read","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"If-None-Match","in":"header","required":false,"description":"An ETag; 304 when nothing changed (\u00a78.2).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get the signed-in user","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/User"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"304":{"description":"Not modified (If-None-Match matched)."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"api.me.update","tags":["me"],"summary":"Update the signed-in user","x-ic-ability":"account:write","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag from your last GET. A mismatch is 409 `stale` with the current representation (\u00a77.3).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","enum":["en-ca","fr-ca"]},"name":{"type":"string","maxLength":255},"phone":{"type":["string","null"],"maxLength":50}}}}}},"responses":{"200":{"description":"Update the signed-in user","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/User"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/quotes":{"get":{"operationId":"api.quotes.index","tags":["quotes"],"summary":"List quotes","x-ic-ability":"quotes:read","x-ic-tier":"pro","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque `next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"RFC 3339 timestamp: only rows changed after it, soft-deleted ones included (\u00a78.1).","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"A quote status.","schema":{"type":"string"}},{"name":"client","in":"query","required":false,"description":"Client uuid.","schema":{"type":"string"}},{"name":"business_profile","in":"query","required":false,"description":"Business profile uuid.","schema":{"type":"string"}},{"name":"issued_from","in":"query","required":false,"description":"YYYY-MM-DD, inclusive.","schema":{"type":"string"}},{"name":"issued_to","in":"query","required":false,"description":"YYYY-MM-DD, inclusive.","schema":{"type":"string"}},{"name":"include","in":"query","required":false,"description":"Comma-separated: `line_items`, `client`, `payments`.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List quotes","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"api.quotes.store","tags":["quotes"],"summary":"Create a draft quote","x-ic-ability":"quotes:write","x-ic-tier":"pro","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_uuid":{"type":["string","null"],"maxLength":36},"color_scheme":{"enum":["ink","ocean","ember","forest","plum",null]},"credit_amount":{"type":["number","null"],"minimum":0,"maximum":999999999},"credit_note":{"type":["string","null"],"maxLength":500},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"discount_type":{"enum":["none","percentage","fixed"]},"discount_value":{"type":["number","null"],"minimum":0,"maximum":999999999},"due_date":{"type":"string","format":"date"},"invoice_number":{"type":["string","null"],"maxLength":50},"issue_date":{"type":"string","format":"date"},"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":2000},"quantity":{"type":"number","minimum":0},"sort_order":{"type":["integer","null"],"minimum":0},"supply_kind":{"enum":["goods",null]},"tax_treatment":{"enum":["exempt","zero_rated",null]},"unit":{"type":["string","null"],"maxLength":50},"unit_price":{"type":"number"}},"required":["description","quantity","unit_price"]}},"notes":{"type":["string","null"],"maxLength":5000},"ship_to_country":{"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW",null]},"ship_to_region":{"enum":[null]},"tax_breakdown":{"type":["array","null"]},"tax_formula_uuid":{"type":["string","null"],"maxLength":36},"tax_mode":{"enum":["auto","manual","quoted",null]},"tax_total":{"type":["number","null"],"minimum":0},"template":{"enum":["classic","modern","executive","minimal",null]}},"required":["currency","discount_type","due_date","issue_date","items"]}}}},"responses":{"201":{"description":"Create a draft quote","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/quotes/{invoice}":{"get":{"operationId":"api.quotes.show","tags":["quotes"],"summary":"Get a quote","x-ic-ability":"quotes:read","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"include","in":"query","required":false,"description":"Comma-separated: `line_items`, `client`, `payments`.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"If-None-Match","in":"header","required":false,"description":"An ETag; 304 when nothing changed (\u00a78.2).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get a quote","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"304":{"description":"Not modified (If-None-Match matched)."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"api.quotes.update","tags":["quotes"],"summary":"Update a draft quote","x-ic-ability":"quotes:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag from your last GET. A mismatch is 409 `stale` with the current representation (\u00a77.3).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"client_uuid":{"type":["string","null"],"maxLength":36},"color_scheme":{"enum":["ink","ocean","ember","forest","plum",null]},"credit_amount":{"type":["number","null"],"minimum":0,"maximum":999999999},"credit_note":{"type":["string","null"],"maxLength":500},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"custom_labels":{"type":["object","null"],"properties":{"bill_to_label":{"type":["string","null"],"maxLength":100},"col_amount":{"type":["string","null"],"maxLength":100},"col_description":{"type":["string","null"],"maxLength":100},"col_qty":{"type":["string","null"],"maxLength":100},"col_rate":{"type":["string","null"],"maxLength":100},"document_title":{"type":["string","null"],"maxLength":100}}},"discount_type":{"enum":["none","percentage","fixed"]},"discount_value":{"type":["number","null"],"minimum":0,"maximum":999999999},"due_date":{"type":"string","format":"date"},"hide_logo":{"type":["boolean","null"]},"invoice_number":{"type":["string","null"],"maxLength":50},"issue_date":{"type":"string","format":"date"},"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":2000},"quantity":{"type":"number","minimum":0},"sort_order":{"type":["integer","null"],"minimum":0},"supply_kind":{"enum":["goods",null]},"tax_treatment":{"enum":["exempt","zero_rated",null]},"unit":{"type":["string","null"],"maxLength":50},"unit_price":{"type":"number"}},"required":["description","quantity","unit_price"]}},"notes":{"type":["string","null"],"maxLength":5000},"payments_enabled":{"type":["boolean","null"]},"recipient_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"email":{"type":["string","null"],"format":"email","maxLength":255},"name":{"type":["string","null"],"maxLength":255},"phone":{"type":["string","null"],"maxLength":50},"tax_id":{"type":["string","null"],"maxLength":100}}},"sender_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"name":{"type":["string","null"],"maxLength":255},"tax_id":{"type":["string","null"],"maxLength":100},"tax_id_secondary":{"type":["string","null"],"maxLength":100}}},"ship_to_address":{"type":["string","null"],"maxLength":2000},"ship_to_country":{"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW",null]},"ship_to_name":{"type":["string","null"],"maxLength":500},"ship_to_region":{"enum":[null]},"tax_breakdown":{"type":["array","null"]},"tax_formula_uuid":{"type":["string","null"],"maxLength":36},"tax_mode":{"enum":["auto","manual","quoted",null]},"tax_total":{"type":["number","null"],"minimum":0},"template":{"enum":["classic","modern","executive","minimal",null]}}}}}},"responses":{"200":{"description":"Update a draft quote","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"operationId":"api.quotes.destroy","tags":["quotes"],"summary":"Delete a draft quote","x-ic-ability":"quotes:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Delete a draft quote"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/quotes/{invoice}/convert":{"post":{"operationId":"api.quotes.convert","tags":["quotes"],"summary":"Convert an accepted quote into a draft invoice","x-ic-ability":"quotes:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Convert an accepted quote into a draft invoice","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/quotes/{invoice}/finalize":{"post":{"operationId":"api.quotes.finalize","tags":["quotes"],"summary":"Finalize a draft quote: assign its number and freeze it","x-ic-ability":"quotes:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"client_uuid":{"type":["string","null"],"maxLength":36},"color_scheme":{"enum":["ink","ocean","ember","forest","plum",null]},"credit_amount":{"type":["number","null"],"minimum":0,"maximum":999999999},"credit_note":{"type":["string","null"],"maxLength":500},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"custom_labels":{"type":["object","null"],"properties":{"bill_to_label":{"type":["string","null"],"maxLength":100},"col_amount":{"type":["string","null"],"maxLength":100},"col_description":{"type":["string","null"],"maxLength":100},"col_qty":{"type":["string","null"],"maxLength":100},"col_rate":{"type":["string","null"],"maxLength":100},"document_title":{"type":["string","null"],"maxLength":100}}},"discount_type":{"enum":["none","percentage","fixed"]},"discount_value":{"type":["number","null"],"minimum":0,"maximum":999999999},"due_date":{"type":"string","format":"date"},"hide_logo":{"type":["boolean","null"]},"invoice_number":{"type":["string","null"],"maxLength":50},"issue_date":{"type":"string","format":"date"},"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":2000},"quantity":{"type":"number","minimum":0},"sort_order":{"type":["integer","null"],"minimum":0},"supply_kind":{"enum":["goods",null]},"tax_treatment":{"enum":["exempt","zero_rated",null]},"unit":{"type":["string","null"],"maxLength":50},"unit_price":{"type":"number"}},"required":["description","quantity","unit_price"]}},"notes":{"type":["string","null"],"maxLength":5000},"payments_enabled":{"type":["boolean","null"]},"recipient_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"email":{"type":["string","null"],"format":"email","maxLength":255},"name":{"type":["string","null"],"maxLength":255},"phone":{"type":["string","null"],"maxLength":50},"tax_id":{"type":["string","null"],"maxLength":100}}},"sender_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"name":{"type":["string","null"],"maxLength":255},"tax_id":{"type":["string","null"],"maxLength":100},"tax_id_secondary":{"type":["string","null"],"maxLength":100}}},"ship_to_address":{"type":["string","null"],"maxLength":2000},"ship_to_country":{"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW",null]},"ship_to_name":{"type":["string","null"],"maxLength":500},"ship_to_region":{"enum":[null]},"tax_breakdown":{"type":["array","null"]},"tax_formula_uuid":{"type":["string","null"],"maxLength":36},"tax_mode":{"enum":["auto","manual","quoted",null]},"tax_total":{"type":["number","null"],"minimum":0},"template":{"enum":["classic","modern","executive","minimal",null]}}}}}},"responses":{"200":{"description":"Finalize a draft quote: assign its number and freeze it","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/quotes/{invoice}/mark-sent":{"post":{"operationId":"api.quotes.mark-sent","tags":["quotes"],"summary":"Mark the quote as sent without emailing it","x-ic-ability":"quotes:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Mark the quote as sent without emailing it","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/quotes/{invoice}/pdf":{"get":{"operationId":"api.quotes.pdf","tags":["quotes"],"summary":"Download the quote PDF","description":"Redirects to a short-lived signed URL that serves the PDF; follow the `Location` header.","x-ic-ability":"quotes:read","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"302":{"description":"Download the quote PDF"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/quotes/{invoice}/reopen":{"post":{"operationId":"api.quotes.reopen","tags":["quotes"],"summary":"Unlock a finalized draft quote for editing","x-ic-ability":"quotes:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Unlock a finalized draft quote for editing","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/quotes/{invoice}/send":{"post":{"operationId":"api.quotes.send","tags":["quotes"],"summary":"Email the quote to the client","description":"Optional body: `channel` (only `invoicecast` is supported; anything else is 422 `channel_unsupported`) and `send_copy` (boolean, BCC yourself).","x-ic-ability":"quotes:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Email the quote to the client","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/receipts":{"get":{"operationId":"api.receipts.index","tags":["receipts"],"summary":"List receipts","x-ic-ability":"receipts:read","x-ic-tier":"pro","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque `next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"RFC 3339 timestamp: only rows changed after it, soft-deleted ones included (\u00a78.1).","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"A receipt status.","schema":{"type":"string"}},{"name":"client","in":"query","required":false,"description":"Client uuid.","schema":{"type":"string"}},{"name":"business_profile","in":"query","required":false,"description":"Business profile uuid.","schema":{"type":"string"}},{"name":"issued_from","in":"query","required":false,"description":"YYYY-MM-DD, inclusive.","schema":{"type":"string"}},{"name":"issued_to","in":"query","required":false,"description":"YYYY-MM-DD, inclusive.","schema":{"type":"string"}},{"name":"include","in":"query","required":false,"description":"Comma-separated: `line_items`, `client`, `payments`.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List receipts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"api.receipts.store","tags":["receipts"],"summary":"Create a draft receipt","x-ic-ability":"receipts:write","x-ic-tier":"pro","parameters":[{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_uuid":{"type":["string","null"],"maxLength":36},"color_scheme":{"enum":["ink","ocean","ember","forest","plum",null]},"credit_amount":{"type":["number","null"],"minimum":0,"maximum":999999999},"credit_note":{"type":["string","null"],"maxLength":500},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"discount_type":{"enum":["none","percentage","fixed"]},"discount_value":{"type":["number","null"],"minimum":0,"maximum":999999999},"invoice_number":{"type":["string","null"],"maxLength":50},"issue_date":{"type":"string","format":"date"},"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":2000},"quantity":{"type":"number","minimum":0},"sort_order":{"type":["integer","null"],"minimum":0},"supply_kind":{"enum":["goods",null]},"tax_treatment":{"enum":["exempt","zero_rated",null]},"unit":{"type":["string","null"],"maxLength":50},"unit_price":{"type":"number"}},"required":["description","quantity","unit_price"]}},"notes":{"type":["string","null"],"maxLength":5000},"ship_to_country":{"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW",null]},"ship_to_region":{"enum":[null]},"tax_breakdown":{"type":["array","null"]},"tax_formula_uuid":{"type":["string","null"],"maxLength":36},"tax_mode":{"enum":["auto","manual","quoted",null]},"tax_total":{"type":["number","null"],"minimum":0},"template":{"enum":["classic","modern","executive","minimal",null]}},"required":["currency","discount_type","issue_date","items"]}}}},"responses":{"201":{"description":"Create a draft receipt","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/receipts/{invoice}":{"get":{"operationId":"api.receipts.show","tags":["receipts"],"summary":"Get a receipt","x-ic-ability":"receipts:read","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"include","in":"query","required":false,"description":"Comma-separated: `line_items`, `client`, `payments`.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"If-None-Match","in":"header","required":false,"description":"An ETag; 304 when nothing changed (\u00a78.2).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get a receipt","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"304":{"description":"Not modified (If-None-Match matched)."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"api.receipts.update","tags":["receipts"],"summary":"Update a draft receipt","x-ic-ability":"receipts:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag from your last GET. A mismatch is 409 `stale` with the current representation (\u00a77.3).","schema":{"type":"string"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"client_uuid":{"type":["string","null"],"maxLength":36},"color_scheme":{"enum":["ink","ocean","ember","forest","plum",null]},"credit_amount":{"type":["number","null"],"minimum":0,"maximum":999999999},"credit_note":{"type":["string","null"],"maxLength":500},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"custom_labels":{"type":["object","null"],"properties":{"bill_to_label":{"type":["string","null"],"maxLength":100},"col_amount":{"type":["string","null"],"maxLength":100},"col_description":{"type":["string","null"],"maxLength":100},"col_qty":{"type":["string","null"],"maxLength":100},"col_rate":{"type":["string","null"],"maxLength":100},"document_title":{"type":["string","null"],"maxLength":100}}},"discount_type":{"enum":["none","percentage","fixed"]},"discount_value":{"type":["number","null"],"minimum":0,"maximum":999999999},"hide_logo":{"type":["boolean","null"]},"invoice_number":{"type":["string","null"],"maxLength":50},"issue_date":{"type":"string","format":"date"},"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":2000},"quantity":{"type":"number","minimum":0},"sort_order":{"type":["integer","null"],"minimum":0},"supply_kind":{"enum":["goods",null]},"tax_treatment":{"enum":["exempt","zero_rated",null]},"unit":{"type":["string","null"],"maxLength":50},"unit_price":{"type":"number"}},"required":["description","quantity","unit_price"]}},"notes":{"type":["string","null"],"maxLength":5000},"payments_enabled":{"type":["boolean","null"]},"recipient_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"email":{"type":["string","null"],"format":"email","maxLength":255},"name":{"type":["string","null"],"maxLength":255},"phone":{"type":["string","null"],"maxLength":50},"tax_id":{"type":["string","null"],"maxLength":100}}},"sender_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"name":{"type":["string","null"],"maxLength":255},"tax_id":{"type":["string","null"],"maxLength":100},"tax_id_secondary":{"type":["string","null"],"maxLength":100}}},"ship_to_address":{"type":["string","null"],"maxLength":2000},"ship_to_country":{"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW",null]},"ship_to_name":{"type":["string","null"],"maxLength":500},"ship_to_region":{"enum":[null]},"tax_breakdown":{"type":["array","null"]},"tax_formula_uuid":{"type":["string","null"],"maxLength":36},"tax_mode":{"enum":["auto","manual","quoted",null]},"tax_total":{"type":["number","null"],"minimum":0},"template":{"enum":["classic","modern","executive","minimal",null]}}}}}},"responses":{"200":{"description":"Update a draft receipt","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"operationId":"api.receipts.destroy","tags":["receipts"],"summary":"Delete a draft receipt","x-ic-ability":"receipts:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Delete a draft receipt"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/receipts/{invoice}/finalize":{"post":{"operationId":"api.receipts.finalize","tags":["receipts"],"summary":"Finalize a draft receipt: assign its number and freeze it","x-ic-ability":"receipts:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"client_uuid":{"type":["string","null"],"maxLength":36},"color_scheme":{"enum":["ink","ocean","ember","forest","plum",null]},"credit_amount":{"type":["number","null"],"minimum":0,"maximum":999999999},"credit_note":{"type":["string","null"],"maxLength":500},"currency":{"type":"string","enum":["CAD","USD","EUR","GBP","AUD"]},"custom_labels":{"type":["object","null"],"properties":{"bill_to_label":{"type":["string","null"],"maxLength":100},"col_amount":{"type":["string","null"],"maxLength":100},"col_description":{"type":["string","null"],"maxLength":100},"col_qty":{"type":["string","null"],"maxLength":100},"col_rate":{"type":["string","null"],"maxLength":100},"document_title":{"type":["string","null"],"maxLength":100}}},"discount_type":{"enum":["none","percentage","fixed"]},"discount_value":{"type":["number","null"],"minimum":0,"maximum":999999999},"hide_logo":{"type":["boolean","null"]},"invoice_number":{"type":["string","null"],"maxLength":50},"issue_date":{"type":"string","format":"date"},"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":2000},"quantity":{"type":"number","minimum":0},"sort_order":{"type":["integer","null"],"minimum":0},"supply_kind":{"enum":["goods",null]},"tax_treatment":{"enum":["exempt","zero_rated",null]},"unit":{"type":["string","null"],"maxLength":50},"unit_price":{"type":"number"}},"required":["description","quantity","unit_price"]}},"notes":{"type":["string","null"],"maxLength":5000},"payments_enabled":{"type":["boolean","null"]},"recipient_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"email":{"type":["string","null"],"format":"email","maxLength":255},"name":{"type":["string","null"],"maxLength":255},"phone":{"type":["string","null"],"maxLength":50},"tax_id":{"type":["string","null"],"maxLength":100}}},"sender_override":{"type":["object","null"],"properties":{"address":{"type":["string","null"],"maxLength":2000},"name":{"type":["string","null"],"maxLength":255},"tax_id":{"type":["string","null"],"maxLength":100},"tax_id_secondary":{"type":["string","null"],"maxLength":100}}},"ship_to_address":{"type":["string","null"],"maxLength":2000},"ship_to_country":{"enum":["CA","US","GB","AU","DE","FR","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","GA","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW",null]},"ship_to_name":{"type":["string","null"],"maxLength":500},"ship_to_region":{"enum":[null]},"tax_breakdown":{"type":["array","null"]},"tax_formula_uuid":{"type":["string","null"],"maxLength":36},"tax_mode":{"enum":["auto","manual","quoted",null]},"tax_total":{"type":["number","null"],"minimum":0},"template":{"enum":["classic","modern","executive","minimal",null]}}}}}},"responses":{"200":{"description":"Finalize a draft receipt: assign its number and freeze it","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/receipts/{invoice}/mark-sent":{"post":{"operationId":"api.receipts.mark-sent","tags":["receipts"],"summary":"Mark the receipt as sent without emailing it","x-ic-ability":"receipts:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Mark the receipt as sent without emailing it","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/receipts/{invoice}/pdf":{"get":{"operationId":"api.receipts.pdf","tags":["receipts"],"summary":"Download the receipt PDF","description":"Redirects to a short-lived signed URL that serves the PDF; follow the `Location` header.","x-ic-ability":"receipts:read","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"302":{"description":"Download the receipt PDF"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/receipts/{invoice}/reopen":{"post":{"operationId":"api.receipts.reopen","tags":["receipts"],"summary":"Unlock a finalized draft receipt for editing","x-ic-ability":"receipts:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Unlock a finalized draft receipt for editing","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/receipts/{invoice}/send":{"post":{"operationId":"api.receipts.send","tags":["receipts"],"summary":"Email the receipt to the client","description":"Optional body: `channel` (only `invoicecast` is supported; anything else is 422 `channel_unsupported`) and `send_copy` (boolean, BCC yourself).","x-ic-ability":"receipts:write","x-ic-tier":"pro","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated UUIDv4, reused across retries of the same action (\u00a77.1). Same key, same body \u2192 the original response, replayed.","schema":{"type":"string","format":"uuid"}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Email the receipt to the client","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/summary":{"get":{"operationId":"api.summary.show","tags":["summary"],"summary":"Get the monthly summary","x-ic-ability":"reports:read","parameters":[{"name":"period","in":"query","required":false,"description":"YYYY-MM; defaults to the current month. Free: current month only.","schema":{"type":"string"}},{"name":"business_profile","in":"query","required":false,"description":"Business profile uuid; omit for all businesses.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get the monthly summary","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Summary"},"meta":{"type":"object"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/tax-formulas":{"get":{"operationId":"api.tax-formulas.index","tags":["tax-formulas"],"summary":"List tax formulas","x-ic-ability":"tax_formulas:read","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque `next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"RFC 3339 timestamp: only rows changed after it, soft-deleted ones included (\u00a78.1).","schema":{"type":"string"}},{"name":"country","in":"query","required":false,"description":"ISO 3166-1 alpha-2.","schema":{"type":"string"}},{"name":"region","in":"query","required":false,"description":"Region code.","schema":{"type":"string"}},{"name":"X-IC-Client","in":"header","required":true,"description":"Your app and its version, e.g. `ic-mobile-ios/1.2.0` or `acme-sync/3.1`: at most 100 printable ASCII characters. Missing is 400 `client_header_required`; too long or other characters, 400 `client_header_invalid` (\u00a73.7).","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"X-IC-Business-Profile","in":"header","required":false,"description":"The issuing business (\u00a76). Defaults to your last selection, or the account default for an API key.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List tax formulas","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TaxFormula"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A device token (from POST /auth/login) or an API key (`ick_live_\u2026`, Business plan)."}},"schemas":{"Money":{"type":"object","properties":{"amount":{"type":"integer","description":"Integer minor units (cents). Compute on this."},"currency":{"type":"string","description":"ISO 4217 code, e.g. CAD."},"formatted":{"type":"string","description":"Display string in the request locale. Never parse it."}},"required":["amount","currency","formatted"],"description":"\u00a73.5 money: never a float."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable, machine-readable; never changes meaning within v1."},"message":{"type":"string","description":"Localized and safe to show a user."},"details":{"type":"object","description":"Code-specific context, e.g. `errors` for 422 or `current` for 409 stale."},"request_id":{"type":"string","description":"Quote this to support."}},"required":["code","message","details","request_id"]}},"required":["error"]},"CollectionMeta":{"type":"object","properties":{"next_cursor":{"type":["string","null"],"description":"Opaque; pass back as `cursor`. Null on the last page."},"has_more":{"type":"boolean"},"server_time":{"type":"string","format":"date-time","description":"Store and send back as the next `updated_since` (\u00a78.1)."}},"required":["next_cursor","has_more","server_time"]},"TokenIssued":{"type":"object","properties":{"token":{"type":"string","description":"Device token. Send as `Authorization: Bearer \u2026`."},"expires_at":{"type":["string","null"],"format":"date-time","description":"90-day sliding expiry, extended on every request."},"user":{"$ref":"#/components/schemas/User"},"account":{"$ref":"#/components/schemas/Account"}},"required":["token","expires_at","user","account"]},"TwoFactorChallenge":{"type":"object","properties":{"challenge_id":{"type":"string","description":"Pass to POST /auth/two-factor with the emailed code."},"method":{"enum":["email"]}},"required":["challenge_id","method"]},"VerificationResent":{"type":"object","properties":{"resent":{"type":"boolean"}},"required":["resent"]},"Device":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"device_name":{"type":"string"},"last_used_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"is_current":{"type":"boolean","description":"True for the device making this request."}},"required":["uuid","device_name","last_used_at","created_at","is_current"]},"Client":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":["string","null"],"format":"email"},"phone":{"type":["string","null"]},"address_text":{"type":["string","null"],"description":"Multiline address, as accepted on write."},"region_code":{"type":["string","null"]},"country_code":{"type":["string","null"],"description":"ISO 3166-1 alpha-2."},"tax_id":{"type":["string","null"]},"notes":{"type":["string","null"]},"preferred_language":{"type":["string","null"]},"default_business_profile_uuid":{"type":["string","null"],"format":"uuid","description":"A picker hint, never a scope."},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time","description":"Set only on a soft-deleted row returned by delta sync."},"invoice_count":{"type":"integer","description":"Present only with `?include=invoice_count`."}},"required":["uuid","name","email","phone","address_text","region_code","country_code","tax_id","notes","preferred_language","default_business_profile_uuid","created_at","updated_at","deleted_at"]},"CatalogItem":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"type":{"enum":["service","product","other"]},"tax_treatment":{"enum":["exempt","zero_rated",null]},"unit_price":{"$ref":"#/components/schemas/Money"},"default_quantity":{"type":"string","description":"Decimal string."},"is_active":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"}},"required":["uuid","name","description","type","tax_treatment","unit_price","default_quantity","is_active","created_at","updated_at","deleted_at"]},"Invoice":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"document_type":{"enum":["invoice","quote","receipt"]},"invoice_number":{"type":["string","null"]},"status":{"enum":["draft","sent","viewed","paid","partially_paid","overdue","cancelled","void","accepted","declined"]},"client_uuid":{"type":["string","null"],"format":"uuid"},"business_profile_uuid":{"type":["string","null"],"format":"uuid"},"issue_date":{"type":["string","null"],"format":"date"},"due_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string"},"subtotal":{"$ref":"#/components/schemas/Money"},"discount_type":{"enum":["none","percentage","fixed",null]},"discount_value":{"type":"string","description":"Decimal string: a percentage or a fixed amount."},"discount_amount":{"$ref":"#/components/schemas/Money"},"taxable_subtotal":{"$ref":"#/components/schemas/Money"},"tax_total":{"$ref":"#/components/schemas/Money"},"tax_formula_uuid":{"type":["string","null"],"format":"uuid"},"tax_breakdown":{"description":"The computed tax lines, display only."},"tax_mode":{"enum":["auto","manual","quoted",null]},"tax_rule":{"type":["string","null"],"description":"Stable rule code, e.g. ca.domestic."},"goods_tax_rule":{"type":["string","null"]},"place_of_supply":{"type":["object","null"],"properties":{"country_code":{"type":"string"},"region_code":{"type":["string","null"]}},"required":["country_code","region_code"]},"total":{"$ref":"#/components/schemas/Money"},"credit_amount":{"$ref":"#/components/schemas/Money"},"credit_note":{"type":["string","null"]},"amount_due":{"$ref":"#/components/schemas/Money"},"ship_to_name":{"type":["string","null"]},"ship_to_address":{"type":["string","null"]},"ship_to_country":{"type":["string","null"]},"ship_to_region":{"type":["string","null"]},"hide_logo":{"type":["boolean","null"]},"payments_enabled":{"type":["boolean","null"]},"notes":{"type":["string","null"]},"hosted_url":{"type":["string","null"],"format":"uri"},"is_editable":{"type":"boolean"},"is_locked":{"type":"boolean"},"sent_at":{"type":["string","null"],"format":"date-time"},"viewed_at":{"type":["string","null"],"format":"date-time"},"paid_at":{"type":["string","null"],"format":"date-time"},"locked_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"description":"Present only with `?include=line_items`."},"client":{"oneOf":[{"$ref":"#/components/schemas/Client"},{"type":"null"}],"description":"Present only with `?include=client`."},"payments":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePayment"},"description":"Present only with `?include=payments`."}},"required":["uuid","document_type","invoice_number","status","client_uuid","business_profile_uuid","issue_date","due_date","currency","subtotal","discount_type","discount_value","discount_amount","taxable_subtotal","tax_total","tax_formula_uuid","tax_breakdown","tax_mode","tax_rule","goods_tax_rule","place_of_supply","total","credit_amount","credit_note","amount_due","ship_to_name","ship_to_address","ship_to_country","ship_to_region","hide_logo","payments_enabled","notes","hosted_url","is_editable","is_locked","sent_at","viewed_at","paid_at","locked_at","created_at","updated_at","deleted_at"]},"TaxFormula":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"country_code":{"type":["string","null"]},"region_code":{"type":["string","null"]},"year":{"type":["integer","null"]},"is_system":{"type":"boolean"},"updated_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["uuid","name","country_code","region_code","year","is_system","updated_at","created_at"]},"Quote":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"document_type":{"enum":["invoice","quote","receipt"]},"invoice_number":{"type":["string","null"]},"status":{"enum":["draft","sent","viewed","paid","partially_paid","overdue","cancelled","void","accepted","declined"]},"client_uuid":{"type":["string","null"],"format":"uuid"},"business_profile_uuid":{"type":["string","null"],"format":"uuid"},"issue_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string"},"subtotal":{"$ref":"#/components/schemas/Money"},"discount_type":{"enum":["none","percentage","fixed",null]},"discount_value":{"type":"string","description":"Decimal string: a percentage or a fixed amount."},"discount_amount":{"$ref":"#/components/schemas/Money"},"taxable_subtotal":{"$ref":"#/components/schemas/Money"},"tax_total":{"$ref":"#/components/schemas/Money"},"tax_formula_uuid":{"type":["string","null"],"format":"uuid"},"tax_breakdown":{"description":"The computed tax lines, display only."},"tax_mode":{"enum":["auto","manual","quoted",null]},"tax_rule":{"type":["string","null"],"description":"Stable rule code, e.g. ca.domestic."},"goods_tax_rule":{"type":["string","null"]},"place_of_supply":{"type":["object","null"],"properties":{"country_code":{"type":"string"},"region_code":{"type":["string","null"]}},"required":["country_code","region_code"]},"total":{"$ref":"#/components/schemas/Money"},"credit_amount":{"$ref":"#/components/schemas/Money"},"credit_note":{"type":["string","null"]},"amount_due":{"$ref":"#/components/schemas/Money"},"ship_to_name":{"type":["string","null"]},"ship_to_address":{"type":["string","null"]},"ship_to_country":{"type":["string","null"]},"ship_to_region":{"type":["string","null"]},"hide_logo":{"type":["boolean","null"]},"payments_enabled":{"type":["boolean","null"]},"notes":{"type":["string","null"]},"hosted_url":{"type":["string","null"],"format":"uri"},"is_editable":{"type":"boolean"},"is_locked":{"type":"boolean"},"sent_at":{"type":["string","null"],"format":"date-time"},"viewed_at":{"type":["string","null"],"format":"date-time"},"paid_at":{"type":["string","null"],"format":"date-time"},"locked_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date"},"is_converted":{"type":"boolean"},"converted_to_invoice_uuid":{"type":["string","null"],"format":"uuid"},"accepted_at":{"type":["string","null"],"format":"date-time"},"declined_at":{"type":["string","null"],"format":"date-time"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"description":"Present only with `?include=line_items`."},"client":{"oneOf":[{"$ref":"#/components/schemas/Client"},{"type":"null"}],"description":"Present only with `?include=client`."},"payments":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePayment"},"description":"Present only with `?include=payments`."}},"required":["uuid","document_type","invoice_number","status","client_uuid","business_profile_uuid","issue_date","currency","subtotal","discount_type","discount_value","discount_amount","taxable_subtotal","tax_total","tax_formula_uuid","tax_breakdown","tax_mode","tax_rule","goods_tax_rule","place_of_supply","total","credit_amount","credit_note","amount_due","ship_to_name","ship_to_address","ship_to_country","ship_to_region","hide_logo","payments_enabled","notes","hosted_url","is_editable","is_locked","sent_at","viewed_at","paid_at","locked_at","created_at","updated_at","deleted_at","expires_at","is_converted","converted_to_invoice_uuid","accepted_at","declined_at"]},"User":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"email_change_pending":{"type":"boolean"},"phone":{"type":["string","null"]},"locale":{"type":["string","null"]},"account_role":{"enum":["owner","admin","member"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["uuid","name","email","email_change_pending","phone","locale","account_role","created_at","updated_at"]},"Account":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"tier":{"enum":["free","pro","business"]},"timezone":{"type":["string","null"]},"locale":{"type":["string","null"]},"plan":{"type":["object","null"],"properties":{"name":{"type":"string"},"slug":{"type":"string"}},"required":["name","slug"],"description":"Null when the tier comes from no subscription."},"subscription_status":{"enum":["active","past_due","unpaid","cancelled","trialing","incomplete","incomplete_expired",null]},"is_trialing":{"type":"boolean"},"current_period_end":{"type":["string","null"],"format":"date-time","description":"The trial end while trialing, else the billing period end."},"cancel_at_period_end":{"type":"boolean"},"business_profiles":{"type":"object","properties":{"limit":{"type":"integer"},"active":{"type":"integer"}},"required":["limit","active"]}},"required":["uuid","name","tier","timezone","locale","plan","subscription_status","is_trialing","current_period_end","cancel_at_period_end","business_profiles"]},"BusinessProfile":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"is_default":{"type":"boolean"},"status":{"enum":["active","archived"]},"entity_type":{"enum":["sole_proprietorship","corporation","partnership","llc",null]},"business_category":{"type":["string","null"],"description":"A slug from GET /business-categories."},"business_category_other":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"},"accounts_payable_email":{"type":["string","null"],"format":"email"},"phone":{"type":["string","null"]},"website":{"type":["string","null"],"format":"uri"},"address_line_1":{"type":["string","null"]},"address_line_2":{"type":["string","null"]},"city":{"type":["string","null"]},"region_code":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"country_code":{"type":["string","null"]},"tax_country":{"type":["string","null"]},"tax_id":{"type":["string","null"]},"tax_id_secondary":{"type":["string","null"]},"tax_registration_status":{"enum":["registered","not_registered","unknown",null]},"home_provincial_registration":{"enum":["registered","not_registered","unknown",null]},"default_supply_treatment":{"enum":["taxable","exempt","zero_rated","unknown",null]},"currency":{"type":["string","null"]},"invoice_prefix":{"type":["string","null"]},"quote_prefix":{"type":["string","null"]},"document_filename_pattern":{"type":["string","null"]},"default_tax_formula_uuid":{"type":["string","null"],"format":"uuid"},"default_payment_terms_days":{"type":["integer","null"]},"default_notes":{"type":["string","null"]},"has_logo":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"}},"required":["uuid","name","is_default","status","entity_type","business_category","business_category_other","email","accounts_payable_email","phone","website","address_line_1","address_line_2","city","region_code","postal_code","country_code","tax_country","tax_id","tax_id_secondary","tax_registration_status","home_provincial_registration","default_supply_treatment","currency","invoice_prefix","quote_prefix","document_filename_pattern","default_tax_formula_uuid","default_payment_terms_days","default_notes","has_logo","created_at","updated_at","deleted_at"]},"BusinessCategory":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","description":"Translated in the request locale."},"is_popular":{"type":"boolean"},"requires_description":{"type":"boolean","description":"True for `other`, which makes `business_category_other` required."}},"required":["slug","name","is_popular","requires_description"]},"ApiKey":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"abilities":{"type":"array","items":{"enum":["clients:read","clients:write","catalog_items:read","catalog_items:write","invoices:read","invoices:write","quotes:read","quotes:write","receipts:read","receipts:write","expenses:read","expenses:write","tax_formulas:read","business_profiles:read","business_profiles:write","account:read","account:write","reports:read"]}},"status":{"enum":["active","expired","revoked"]},"created_by":{"type":["object","null"],"properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["uuid","name"]},"expires_at":{"type":["string","null"],"format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"key":{"type":"string","description":"The plaintext, on the creation response only \u2014 and null on an idempotent replay of it."}},"required":["uuid","name","abilities","status","created_by","expires_at","last_used_at","revoked_at","created_at","updated_at"]},"Expense":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"business_profile_uuid":{"type":["string","null"],"format":"uuid"},"category_uuid":{"type":["string","null"],"format":"uuid"},"tax_formula_uuid":{"type":["string","null"],"format":"uuid"},"vendor_name":{"type":"string"},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"expense_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string"},"subtotal":{"$ref":"#/components/schemas/Money"},"tax_total":{"$ref":"#/components/schemas/Money"},"total":{"$ref":"#/components/schemas/Money"},"tax_breakdown":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"rate":{"type":"number"},"amount":{"$ref":"#/components/schemas/Money"}},"required":["name","rate","amount"]}},"supplier_tax_id":{"type":["string","null"]},"itc_eligibility":{"enum":["eligible","partial","not_eligible","unknown"]},"itc_percent":{"type":["string","null"],"description":"Decimal string; only with `partial`."},"itc_supplier_number_required":{"type":"boolean"},"itc_claim_blocked_by_documentation":{"type":"boolean"},"receipt":{"type":["object","null"],"properties":{"filename":{"type":["string","null"]},"mime_type":{"type":["string","null"]},"size_bytes":{"type":["integer","null"]},"url":{"type":"string","format":"uri","description":"Download with the same bearer credential."}},"required":["filename","mime_type","size_bytes","url"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"}},"required":["uuid","business_profile_uuid","category_uuid","tax_formula_uuid","vendor_name","description","notes","expense_date","currency","subtotal","tax_total","total","tax_breakdown","supplier_tax_id","itc_eligibility","itc_percent","itc_supplier_number_required","itc_claim_blocked_by_documentation","receipt","created_at","updated_at","deleted_at"]},"Category":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":"string"},"type":{"enum":["public","private"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"}},"required":["uuid","name","slug","type","created_at","updated_at","deleted_at"]},"Summary":{"type":"object","properties":{"period":{"type":"string","description":"YYYY-MM."},"period_start":{"type":"string","format":"date"},"period_end":{"type":"string","format":"date"},"business_profile_uuid":{"type":["string","null"],"format":"uuid","description":"Null = consolidated."},"revenue":{"type":"array","items":{"$ref":"#/components/schemas/Money"},"description":"One line per currency."},"outstanding":{"type":"array","items":{"$ref":"#/components/schemas/Money"}},"invoices_sent":{"type":"integer"},"clients":{"type":"integer"},"quotes":{"type":["object","null"],"properties":{"value_sent":{"type":"array","items":{"$ref":"#/components/schemas/Money"}},"open":{"type":"array","items":{"$ref":"#/components/schemas/Money"}},"sent":{"type":"integer"},"drafts":{"type":"integer"}},"required":["value_sent","open","sent","drafts"],"description":"Null below Pro."},"expenses":{"type":["object","null"],"properties":{"total":{"type":"array","items":{"$ref":"#/components/schemas/Money"}},"tax_paid":{"type":"array","items":{"$ref":"#/components/schemas/Money"}},"count":{"type":"integer"}},"required":["total","tax_paid","count"],"description":"Null below Pro."},"gst_tracker":{"type":["object","null"],"properties":{"status":{"enum":["not_applicable","under","approaching","exceeded"]},"rolling_total":{"$ref":"#/components/schemas/Money"},"current_quarter_total":{"$ref":"#/components/schemas/Money"},"threshold":{"$ref":"#/components/schemas/Money"},"rolling_percent":{"type":"number"},"current_quarter_percent":{"type":"number"},"breached_by":{"type":["string","null"]},"window_start":{"type":"string","format":"date"},"window_end":{"type":"string","format":"date"},"register_by_date":{"type":["string","null"],"format":"date"},"has_foreign_currency_sales":{"type":"boolean"},"source_url":{"type":"string","format":"uri"}},"required":["status","rolling_total","current_quarter_total","threshold","rolling_percent","current_quarter_percent","breached_by","window_start","window_end","register_by_date","has_foreign_currency_sales","source_url"],"description":"Account-wide; null exactly when the web shows no tracker."}},"required":["period","period_start","period_end","business_profile_uuid","revenue","outstanding","invoices_sent","clients","quotes","expenses","gst_tracker"]},"InvoiceItem":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"string","description":"Decimal string."},"unit":{"type":["string","null"]},"unit_price":{"$ref":"#/components/schemas/Money"},"amount":{"$ref":"#/components/schemas/Money"},"tax_treatment":{"enum":["exempt","zero_rated",null]},"supply_kind":{"enum":["goods",null],"description":"Null is a service."},"net_amount":{"oneOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"sort_order":{"type":["integer","null"]}},"required":["description","quantity","unit","unit_price","amount","tax_treatment","supply_kind","net_amount","sort_order"]},"InvoicePayment":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"status":{"enum":["pending","processing","succeeded","failed","abandoned","refunded","partially_refunded","disputed"]},"amount":{"$ref":"#/components/schemas/Money"},"payment_method_type":{"type":["string","null"]},"paid_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["uuid","status","amount","payment_method_type","paid_at","created_at"]}},"responses":{"BadRequest":{"description":"Malformed request: missing or invalid X-IC-Client or Idempotency-Key, `?page=`, or a bad filter value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"Missing, invalid, expired or revoked credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Not permitted: `forbidden`, `insufficient_scope` (API key ability), `upgrade_required` (plan), or `limit_reached`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Does not exist, or belongs to another account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"`stale`: If-Match did not match; `error.details.current` holds the current representation. Or `not_editable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ValidationFailed":{"description":"`validation_failed`: field errors under `error.details.errors`. Or `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Rate limited; see the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"A dependency (e.g. file storage) failed; retry with the same Idempotency-Key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}