{"openapi":"3.1.0","info":{"title":"Apizie","version":"2.0.0","description":"One API key, one envelope, many public data sources. Success responses include a `source` block to cite. Apizie Finance endpoints (SEC EDGAR, FRED, ECB, U.S. Treasury, GLEIF, World Bank, official:*) need a Finance plan."},"servers":[{"url":"https://apizie.tech"}],"security":[{"ApiKeyAuth":[]}],"paths":{"/v1/payments:paypal-invoicing/invoices-list":{"get":{"operationId":"payments_paypal_invoicing_invoices_list","summary":"List invoices","description":"GET /v2/invoicing/invoices","tags":["payments"],"x-apizie-access":"read","parameters":[{"name":"page","in":"query","required":false,"description":"The page number to be retrieved, for the list of templates. So, a combination of `page=1` and `page_size=20` returns the first 20…","schema":{"type":"integer","default":1,"description":"The page number to be retrieved, for the list of templates. So, a combination of `page=1` and `page_size=20` returns the first 20…"}},{"name":"page_size","in":"query","required":false,"description":"The maximum number of templates to return in the response.","schema":{"type":"integer","default":20,"description":"The maximum number of templates to return in the response."}},{"name":"total_required","in":"query","required":false,"description":"Indicates whether the to show total_pages and total_items in the response.","schema":{"type":"boolean","default":false,"description":"Indicates whether the to show total_pages and total_items in the response."}},{"name":"fields","in":"query","required":false,"description":"The fields to return in the response. Value is `all` or `none`. To return only the template name, ID, and default attributes, specify…","schema":{"type":"string","default":"all","description":"The fields to return in the response. Value is `all` or `none`. To return only the template name, ID, and default attributes, specify…"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-create":{"post":{"operationId":"payments_paypal_invoicing_invoices_create","summary":"Create draft invoice","description":"POST /v2/invoicing/invoices","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-send":{"post":{"operationId":"payments_paypal_invoicing_invoices_send","summary":"Send invoice","description":"POST /v2/invoicing/invoices/{invoice_id}/send","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_id"],"properties":{"invoice_id":{"type":"string","description":"The ID of the draft invoice to delete."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-remind":{"post":{"operationId":"payments_paypal_invoicing_invoices_remind","summary":"Send invoice reminder","description":"POST /v2/invoicing/invoices/{invoice_id}/remind","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_id"],"properties":{"invoice_id":{"type":"string","description":"The ID of the draft invoice to delete."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-cancel":{"post":{"operationId":"payments_paypal_invoicing_invoices_cancel","summary":"Cancel sent invoice","description":"POST /v2/invoicing/invoices/{invoice_id}/cancel","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_id","body"],"properties":{"invoice_id":{"type":"string","description":"The ID of the draft invoice to delete."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-payments":{"post":{"operationId":"payments_paypal_invoicing_invoices_payments","summary":"Record payment for invoice","description":"POST /v2/invoicing/invoices/{invoice_id}/payments","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_id","body"],"properties":{"invoice_id":{"type":"string","description":"The ID of the draft invoice to delete."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-payments-delete":{"post":{"operationId":"payments_paypal_invoicing_invoices_payments_delete","summary":"Delete external payment","description":"DELETE /v2/invoicing/invoices/{invoice_id}/payments/{transaction_id}","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_id","transaction_id"],"properties":{"invoice_id":{"type":"string","description":"The ID of the draft invoice to delete."},"transaction_id":{"type":"string","description":"The ID of the external refund transaction to delete."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-refunds":{"post":{"operationId":"payments_paypal_invoicing_invoices_refunds","summary":"Record refund for invoice","description":"POST /v2/invoicing/invoices/{invoice_id}/refunds","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_id","body"],"properties":{"invoice_id":{"type":"string","description":"The ID of the draft invoice to delete."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-refunds-delete":{"post":{"operationId":"payments_paypal_invoicing_invoices_refunds_delete","summary":"Delete external refund","description":"DELETE /v2/invoicing/invoices/{invoice_id}/refunds/{transaction_id}","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_id","transaction_id"],"properties":{"invoice_id":{"type":"string","description":"The ID of the draft invoice to delete."},"transaction_id":{"type":"string","description":"The ID of the external refund transaction to delete."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-generate-qr-code":{"post":{"operationId":"payments_paypal_invoicing_invoices_generate_qr_code","summary":"Generate QR code","description":"POST /v2/invoicing/invoices/{invoice_id}/generate-qr-code","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_id"],"properties":{"invoice_id":{"type":"string","description":"The ID of the draft invoice to delete."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoicing-generate-next-invoice-number":{"post":{"operationId":"payments_paypal_invoicing_invoicing_generate_next_invoice_number","summary":"Generate invoice number","description":"POST /v2/invoicing/generate-next-invoice-number","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-get":{"get":{"operationId":"payments_paypal_invoicing_invoices_get","summary":"Show invoice details","description":"GET /v2/invoicing/invoices/{invoice_id}","tags":["payments"],"x-apizie-access":"read","parameters":[{"name":"invoice_id","in":"query","required":true,"description":"The ID of the draft invoice to delete.","schema":{"type":"string","description":"The ID of the draft invoice to delete."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-update":{"post":{"operationId":"payments_paypal_invoicing_invoices_update","summary":"Fully update invoice","description":"PUT /v2/invoicing/invoices/{invoice_id}","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_id","body"],"properties":{"invoice_id":{"type":"string","description":"The ID of the draft invoice to delete."},"send_to_recipient":{"type":"boolean","default":true,"description":"Indicates whether to send the invoice update notification to the recipient."},"send_to_invoicer":{"type":"boolean","default":true,"description":"Indicates whether to send the invoice update notification to the merchant."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-delete":{"post":{"operationId":"payments_paypal_invoicing_invoices_delete","summary":"Delete invoice","description":"DELETE /v2/invoicing/invoices/{invoice_id}","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_id"],"properties":{"invoice_id":{"type":"string","description":"The ID of the draft invoice to delete."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoices-search-invoices":{"post":{"operationId":"payments_paypal_invoicing_invoices_search_invoices","summary":"Search for invoices","description":"POST /v2/invoicing/search-invoices","tags":["payments"],"x-apizie-access":"read","parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"page":{"type":"integer","default":1,"description":"The page number to be retrieved, for the list of templates. So, a combination of `page=1` and `page_size=20` returns the first 20…"},"page_size":{"type":"integer","default":20,"description":"The maximum number of templates to return in the response."},"total_required":{"type":"boolean","default":false,"description":"Indicates whether the to show total_pages and total_items in the response."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/templates-list":{"get":{"operationId":"payments_paypal_invoicing_templates_list","summary":"List templates","description":"GET /v2/invoicing/templates","tags":["payments"],"x-apizie-access":"read","parameters":[{"name":"fields","in":"query","required":false,"description":"The fields to return in the response. Value is `all` or `none`. To return only the template name, ID, and default attributes, specify…","schema":{"type":"string","default":"all","description":"The fields to return in the response. Value is `all` or `none`. To return only the template name, ID, and default attributes, specify…"}},{"name":"page","in":"query","required":false,"description":"The page number to be retrieved, for the list of templates. So, a combination of `page=1` and `page_size=20` returns the first 20…","schema":{"type":"integer","default":1,"description":"The page number to be retrieved, for the list of templates. So, a combination of `page=1` and `page_size=20` returns the first 20…"}},{"name":"page_size","in":"query","required":false,"description":"The maximum number of templates to return in the response.","schema":{"type":"integer","default":20,"description":"The maximum number of templates to return in the response."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/templates-create":{"post":{"operationId":"payments_paypal_invoicing_templates_create","summary":"Create template","description":"POST /v2/invoicing/templates","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/templates-get":{"get":{"operationId":"payments_paypal_invoicing_templates_get","summary":"Show template details","description":"GET /v2/invoicing/templates/{template_id}","tags":["payments"],"x-apizie-access":"read","parameters":[{"name":"template_id","in":"query","required":true,"description":"The ID of the template to delete.","schema":{"type":"string","description":"The ID of the template to delete."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/templates-update":{"post":{"operationId":"payments_paypal_invoicing_templates_update","summary":"Fully update template","description":"PUT /v2/invoicing/templates/{template_id}","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["template_id","body"],"properties":{"template_id":{"type":"string","description":"The ID of the template to delete."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/templates-delete":{"post":{"operationId":"payments_paypal_invoicing_templates_delete","summary":"Delete template","description":"DELETE /v2/invoicing/templates/{template_id}","tags":["payments"],"x-apizie-access":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["template_id"],"properties":{"template_id":{"type":"string","description":"The ID of the template to delete."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/connections-get":{"get":{"operationId":"payments_paypal_invoicing_connections_get","summary":"List Connections.","description":"GET /v2/invoicing/accounting-sync/merchant/connections","tags":["payments"],"x-apizie-access":"read","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/payments:paypal-invoicing/invoice-connection-details-get":{"get":{"operationId":"payments_paypal_invoicing_invoice_connection_details_get","summary":"List Connection Status for an Invoice.","description":"GET /v2/invoicing/accounting-sync/invoices/{id}/connections","tags":["payments"],"x-apizie-access":"read","parameters":[{"name":"id","in":"query","required":true,"description":"The invoice id of the account.","schema":{"type":"string","description":"The invoice id of the account."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"RunEnvelope":{"type":"object","required":["project","data","timestamp"],"properties":{"project":{"type":"string","example":"official:company"},"data":{},"source":{"type":"object","description":"Where the data came from. Cite it.","properties":{"official":{"type":"boolean"},"provider":{"type":"string","example":"SEC EDGAR"},"publisher":{"type":"string","example":"U.S. Securities and Exchange Commission"},"url":{"type":"string","format":"uri","description":"A page a person can open to check the value"},"apiUrl":{"type":"string","format":"uri","description":"The official API URL that was called (credentials removed)"},"retrievedAt":{"type":"string","format":"date-time"},"license":{"type":"string"},"licenseUrl":{"type":"string","format":"uri"},"attribution":{"type":"string"},"notice":{"type":"string"}}},"timestamp":{"type":"string","format":"date-time"}}},"ErrorEnvelope":{"type":"object","properties":{"content":{},"message":{"type":"string"},"errors":{"type":"array","items":{}},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}},"responses":{"Error":{"description":"Invalid key, plan gate, rate limit or upstream failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}