{ "openapi": "3.0.3", "info": { "title": "Sequence API", "version": "0.1.0", "description": "Sequence API" }, "servers": [ { "url": "https://sandbox.sequencehq.com/api", "description": "Sequence API" } ], "tags": [ { "name": "Products" }, { "name": "List Prices" }, { "name": "Organizations" }, { "name": "Customers" }, { "name": "Contacts" }, { "name": "Customer Aliases" }, { "name": "Discounts" }, { "name": "Billing Schedules" }, { "name": "Prices" }, { "name": "Credits" }, { "name": "Quotes" }, { "name": "Invoices" }, { "name": "Credit Notes" }, { "name": "Credit Note Line Items" }, { "name": "Invoice Settings" }, { "name": "Invoice Line Items" }, { "name": "Activities" }, { "name": "Notification Policies" } ], "paths": { "/usage-metrics": { "get": { "tags": [ "Usage Metrics" ], "summary": "List all Usage Metrics", "description": "List all Usage Metrics", "operationId": "getUsageMetrics", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "name", "in": "query", "description": "Filter metrics by name (case-insensitive substring)", "required": false, "schema": { "type": "string" } }, { "name": "id", "in": "query", "description": "Filter metrics by ID (case-insensitive substring)", "required": false, "schema": { "type": "string" } }, { "name": "eventType", "in": "query", "description": "Filter metrics by event type(s). Comma-separated; individual values must be percent-encoded so values containing commas are preserved.", "required": false, "schema": { "type": "string" } }, { "name": "eventProperty", "in": "query", "description": "Filter metrics by aggregation property name(s). Comma-separated; individual values must be percent-encoded so values containing commas are preserved.", "required": false, "schema": { "type": "string" } }, { "name": "aggregationType", "in": "query", "description": "Filter metrics by aggregation type(s); comma-separated", "required": false, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListUsageMetricEndpointProductResponseModel", "example": { "items": [ { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListUsageMetricEndpointProductResponseModel": { "summary": "", "value": { "items": [ { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Usage Metrics" ], "summary": "Create a new Usage Metric", "description": "Create a new Usage Metric", "operationId": "postUsageMetrics", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUsageMetricEndpointCreateUsageMetricRequestModel", "example": { "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ] } }, "examples": { "CreateUsageMetricEndpointCreateUsageMetricRequestModel": { "summary": "", "value": { "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ] } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUsageMetricEndpointProductCreateUsageMetricResponseModel", "example": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } }, "examples": { "CreateUsageMetricEndpointProductCreateUsageMetricResponseModel": { "summary": "", "value": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/usage-metrics/{id}": { "get": { "tags": [ "Usage Metrics" ], "summary": "Get a Usage Metric by ID", "description": "Get a Usage Metric by ID", "operationId": "getUsageMetricsById", "parameters": [ { "name": "id", "in": "path", "description": "Unique ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetUsageMetricEndpointProductGetUsageMetricResponseModel", "example": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } }, "examples": { "GetUsageMetricEndpointProductGetUsageMetricResponseModel": { "summary": "", "value": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Usage Metrics" ], "summary": "Update a Usage Metric", "description": "Update a Usage Metric", "operationId": "putUsageMetricsById", "parameters": [ { "name": "id", "in": "path", "description": "Unique ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUsageMetricEndpointUpdateUsageMetricRequestModel", "example": { "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ] } }, "examples": { "UpdateUsageMetricEndpointUpdateUsageMetricRequestModel": { "summary": "", "value": { "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ] } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUsageMetricEndpointProductUpdateUsageMetricResponseModel", "example": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } }, "examples": { "UpdateUsageMetricEndpointProductUpdateUsageMetricResponseModel": { "summary": "", "value": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Usage Metrics" ], "summary": "Delete a Usage Metric", "description": "Delete a Usage Metric", "operationId": "deleteUsageMetricsById", "parameters": [ { "name": "id", "in": "path", "description": "Unique ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteUsageMetricEndpointProductDeleteUsageMetricResponseModel", "example": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } }, "examples": { "DeleteUsageMetricEndpointProductDeleteUsageMetricResponseModel": { "summary": "", "value": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/usage-events": { "get": { "tags": [ "Usage Events" ], "summary": "List all Usage Events", "description": "List all Usage Events", "operationId": "getUsageEvents", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).", "required": false, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "description": "Pagination offset. To retrieve a non-contiguous page, use this parameter to specify the offset to fetch relative to `pagination.after` or `pagination.before`.", "required": false, "schema": { "type": "integer" } }, { "name": "customerAlias", "in": "query", "description": "Filter events by customer alias", "required": false, "schema": { "type": "array" } }, { "name": "unmappedAliasesOnly", "in": "query", "description": "Include unmapped aliases only", "required": false, "schema": { "type": "boolean" } }, { "name": "eventType", "in": "query", "description": "Filter events by type", "required": false, "schema": { "type": "string" } }, { "name": "eventId", "in": "query", "description": "Filter events by event id", "required": false, "schema": { "type": "string" } }, { "name": "eventTimestampBefore", "in": "query", "description": "Filter events by timestamp before", "required": false, "schema": { "type": "string" } }, { "name": "eventTimestampAfter", "in": "query", "description": "Filter events by timestamp after", "required": false, "schema": { "type": "string" } }, { "name": "sortBy", "in": "query", "description": "Sort column. Default: creation time.", "required": false, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListUsageEventEndpointEndpointResponseModel", "example": { "items": [ { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "eventType": "message-sent", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "eventTimestamp": "2022-10-01T00:00:00Z", "eventProperties": { "length": 500, "type": "text_message" } } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListUsageEventEndpointEndpointResponseModel": { "summary": "", "value": { "items": [ { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "eventType": "message-sent", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "eventTimestamp": "2022-10-01T00:00:00Z", "eventProperties": { "length": 500, "type": "text_message" } } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Usage Events" ], "summary": "Create a new Usage Event", "description": "Create a new Usage Event", "operationId": "postUsageEvents", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUsageEventEndpointCreateUsageEventRequestModel", "example": { "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "eventType": "message-sent", "eventTimestamp": "2022-10-01T00:00:00Z", "eventProperties": { "length": 500, "type": "text_message" } } }, "examples": { "CreateUsageEventEndpointCreateUsageEventRequestModel": { "summary": "", "value": { "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "eventType": "message-sent", "eventTimestamp": "2022-10-01T00:00:00Z", "eventProperties": { "length": 500, "type": "text_message" } } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUsageEventEndpointProductCreateUsageEventResponseModel", "example": { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "eventType": "message-sent", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "eventProperties": { "length": 500, "type": "text_message" } } }, "examples": { "CreateUsageEventEndpointProductCreateUsageEventResponseModel": { "summary": "", "value": { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "eventType": "message-sent", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "eventProperties": { "length": 500, "type": "text_message" } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/usage-metrics/{usageMetricId}/calculate": { "get": { "tags": [ "Usage Metrics" ], "summary": "Calculate usage metric for customer and timeframe", "description": "Calculate usage metric for customer and timeframe", "operationId": "getUsageMetricsByUsageMetricIdCalculate", "parameters": [ { "name": "usageMetricId", "in": "path", "description": "Usage Metric ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "customerAliases", "in": "query", "description": "Customer Aliases / internal IDs", "required": true, "schema": { "type": "string" } }, { "name": "periodStart", "in": "query", "description": "Billing period start", "required": true, "schema": { "type": "string" } }, { "name": "periodEnd", "in": "query", "description": "Billing period end (inclusive)", "required": true, "schema": { "type": "string" } }, { "name": "customParameters", "in": "query", "description": "Custom parameter values", "required": false, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsageMetricCalculationResponse", "example": { "name": "total_messages_sent", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "SUM", "eventCount": 5, "value": 150.035, "unit": "bytes", "minEventId": "0183d0f1-6b5a-74d4-9129-1f4b90191666", "maxEventId": "0183ea03-aca0-7019-b80d-6aacce344e92" } }, "examples": { "UsageMetricCalculationResponse": { "summary": "", "value": { "name": "total_messages_sent", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "SUM", "eventCount": 5, "value": 150.035, "unit": "bytes", "minEventId": "0183d0f1-6b5a-74d4-9129-1f4b90191666", "maxEventId": "0183ea03-aca0-7019-b80d-6aacce344e92" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/seat-metrics": { "get": { "tags": [ "Seat Metrics" ], "summary": "List all seat metrics", "description": "Retrieve a paginated list of all your seat metrics.", "operationId": "getSeatMetrics", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListSeatMetricEndpointProductListSeatMetricPaginatedResponseModel", "example": { "items": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListSeatMetricEndpointProductListSeatMetricPaginatedResponseModel": { "summary": "", "value": { "items": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Seat Metrics" ], "summary": "Create a seat metric", "description": "Create a new seat metric which can be used in prices.", "operationId": "postSeatMetrics", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSeatMetricRequest", "example": { "seatType": "admin", "description": "Allows user to make admin changes over whole account", "label": "Administrator" } }, "examples": { "CreateSeatMetricRequest": { "summary": "", "value": { "seatType": "admin", "description": "Allows user to make admin changes over whole account", "label": "Administrator" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SeatMetric", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } }, "examples": { "SeatMetric": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/seat-metrics/{id}": { "get": { "tags": [ "Seat Metrics" ], "summary": "Get a seat metric", "description": "Retrieve the details of one of your seat metrics.", "operationId": "getSeatMetricsById", "parameters": [ { "name": "id", "in": "path", "description": "Unique ID for this seat metric.", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetSeatMetricEndpointProductGetSeatMetricResponseModel", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } }, "examples": { "GetSeatMetricEndpointProductGetSeatMetricResponseModel": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Seat Metrics" ], "summary": "Update a seat metric", "description": "Update a seat metric which can be used in prices.", "operationId": "putSeatMetricsById", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSeatMetricRequest", "example": { "description": "Allows user to make admin changes over whole account", "label": "Administrator" } }, "examples": { "UpdateSeatMetricRequest": { "summary": "", "value": { "description": "Allows user to make admin changes over whole account", "label": "Administrator" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SeatMetric", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } }, "examples": { "SeatMetric": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Seat Metrics" ], "summary": "Delete a seat metric", "description": "Delete a seat metric", "operationId": "deleteSeatMetricsById", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SeatMetric", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } }, "examples": { "SeatMetric": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/seat-events": { "get": { "tags": [ "Seat Events" ], "summary": "List all seat events", "description": "Retrieve a paginated list of all your submitted seat events.", "operationId": "getSeatEvents", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).", "required": false, "schema": { "type": "string" } }, { "name": "customerAlias", "in": "query", "description": "Filter event by customer alias", "required": false, "schema": { "type": "string" } }, { "name": "customerIds", "in": "query", "description": "Filter events by customer IDs. Resolves to all of each customer's aliases (and the customer ID itself). Comma-separated, max 25 IDs.", "required": false, "schema": { "type": "string" } }, { "name": "seatType", "in": "query", "description": "Filter events by seat type. Comma-separated, max 25 values.", "required": false, "schema": { "type": "string" } }, { "name": "customerEventId", "in": "query", "description": "Filter events by customer event ID", "required": false, "schema": { "type": "string" } }, { "name": "eventTimestampBefore", "in": "query", "description": "Filter events by timestamp before", "required": false, "schema": { "type": "string" } }, { "name": "eventTimestampAfter", "in": "query", "description": "Filter events by timestamp after", "required": false, "schema": { "type": "string" } }, { "name": "sortBy", "in": "query", "description": "Sort column. Default: creation time.", "required": false, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListSeatEventsEndpointEndpointResponseModel", "example": { "items": [ { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListSeatEventsEndpointEndpointResponseModel": { "summary": "", "value": { "items": [ { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Seat Events" ], "summary": "Create a seat event", "description": "Create a new seat event. Seat events are used for calculating charges.", "operationId": "postSeatEvents", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSeatEventEndpointCreateSeatEventRequestModel", "example": { "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 } }, "examples": { "CreateSeatEventEndpointCreateSeatEventRequestModel": { "summary": "", "value": { "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSeatEventEndpointProductCreateSeatEventResponseModel", "example": { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 } }, "examples": { "CreateSeatEventEndpointProductCreateSeatEventResponseModel": { "summary": "", "value": { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/seat-events/{id}": { "get": { "tags": [ "Seat Events" ], "summary": "Get a seat event by ID", "description": "Retrieve a seat event by its ID", "operationId": "getSeatEventsById", "parameters": [ { "name": "id", "in": "path", "description": "Unique ID for this seat event", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SeatEvent", "example": { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 } }, "examples": { "SeatEvent": { "summary": "", "value": { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/seat-balances": { "get": { "tags": [ "Seat Metrics" ], "summary": "List Seat balances by Customer", "description": "List Seat balances grouped by Customer and seat type.", "operationId": "getSeatBalances", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "excludeZeroQuantity", "in": "query", "description": "Exclude customers with no seats usage. Defaults to false.", "required": false, "schema": { "type": "boolean" } }, { "name": "customerAliases", "in": "query", "description": "Filter seat balances by customer alias", "required": false, "schema": { "type": "string" } }, { "name": "customerIds", "in": "query", "description": "Filter seat balances by customer IDs. Max 25 IDs.", "required": false, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCustomerSeatBalancesEndpointListCustomerSeatBalancesPaginatedResponseModel", "example": { "items": [ { "id": "d82010a6-6835-41f8-9dd3-6f858f617f35", "sequenceAccountId": "806460ce-050d-45e4-8d22-b403a523b866", "legalName": "Acme Corp", "customerAliases": [ "acme" ], "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z", "balances": [ { "seatType": "admin", "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListCustomerSeatBalancesEndpointListCustomerSeatBalancesPaginatedResponseModel": { "summary": "", "value": { "items": [ { "id": "d82010a6-6835-41f8-9dd3-6f858f617f35", "sequenceAccountId": "806460ce-050d-45e4-8d22-b403a523b866", "legalName": "Acme Corp", "customerAliases": [ "acme" ], "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z", "balances": [ { "seatType": "admin", "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/products/{id}": { "get": { "tags": [ "Products" ], "summary": "Get a Product by ID", "description": "Get a Product by ID", "operationId": "getProductsById", "parameters": [ { "name": "id", "in": "path", "description": "Unique Product ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240730ProductResponse", "example": { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } }, "examples": { "Stable20240730ProductResponse": { "summary": "", "value": { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Products" ], "summary": "Update a Product", "description": "Update a Product", "operationId": "putProductsById", "parameters": [ { "name": "id", "in": "path", "description": "Unique Product ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240730ProductRequest", "example": { "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88" } }, "examples": { "Stable20240730ProductRequest": { "summary": "", "value": { "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240730ProductResponse", "example": { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } }, "examples": { "Stable20240730ProductResponse": { "summary": "", "value": { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/list-prices": { "get": { "tags": [ "List Prices" ], "summary": "List all list prices", "description": "List all list prices", "operationId": "getListPrices", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "currency", "in": "query", "description": "Filter by currency.", "required": false, "schema": { "type": "string" } }, { "name": "productId", "in": "query", "description": "Filter list prices by a given product ID.", "required": false, "schema": { "type": "string" } }, { "name": "billingFrequency", "in": "query", "description": "Filter by billing frequency.", "required": false, "schema": { "type": "string" } }, { "name": "includeArchived", "in": "query", "description": "Include archived list prices in results", "required": false, "schema": { "type": "boolean" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "example": { "items": [ { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "oneOf": [ { "$ref": "#/components/schemas/ListListPricesEndpointResponseModel" } ] }, "examples": { "ListListPricesEndpointResponseModel": { "summary": "", "value": { "items": [ { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "List Prices" ], "summary": "Create a list price", "description": "Create a new list price", "operationId": "postListPrices", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 } }, "oneOf": [ { "$ref": "#/components/schemas/OneTimeListPriceRequest" }, { "$ref": "#/components/schemas/FixedListPriceRequest" }, { "$ref": "#/components/schemas/LinearListPriceRequest" }, { "$ref": "#/components/schemas/PackageListPriceRequest" }, { "$ref": "#/components/schemas/SeatBasedListPriceRequest" }, { "$ref": "#/components/schemas/GraduatedListPriceRequest" }, { "$ref": "#/components/schemas/VolumeListPriceRequest" } ] }, "examples": { "GraduatedListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 } } }, "VolumeListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } }, "SeatBasedListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } }, "PackageListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } }, "LinearListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } }, "FixedListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } }, "OneTimeListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "oneOf": [ { "$ref": "#/components/schemas/OneTimeListPriceResponse" }, { "$ref": "#/components/schemas/FixedListPriceResponse" }, { "$ref": "#/components/schemas/LinearListPriceResponse" }, { "$ref": "#/components/schemas/PackageListPriceResponse" }, { "$ref": "#/components/schemas/SeatBasedListPriceResponse" }, { "$ref": "#/components/schemas/GraduatedListPriceResponse" }, { "$ref": "#/components/schemas/VolumeListPriceResponse" } ] }, "examples": { "GraduatedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "VolumeListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "SeatBasedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "PackageListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "LinearListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "FixedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "OneTimeListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/products": { "get": { "tags": [ "Products" ], "summary": "List all Products", "description": "List all Products", "operationId": "getProducts", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "query", "description": "Filter by name", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240730ListResponseModel", "example": { "items": [ { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "Stable20240730ListResponseModel": { "summary": "", "value": { "items": [ { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Products" ], "summary": "Create a new Product", "description": "Create a new Product", "operationId": "postProducts", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240730ProductRequest", "example": { "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88" } }, "examples": { "Stable20240730ProductRequest": { "summary": "", "value": { "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240730ProductResponse", "example": { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } }, "examples": { "Stable20240730ProductResponse": { "summary": "", "value": { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/list-prices/{id}/archive": { "post": { "tags": [ "List Prices" ], "summary": "Archive a list price", "description": "Mark a list price as archived", "operationId": "postListPricesByIdArchive", "parameters": [ { "name": "id", "in": "path", "description": "List Price Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "oneOf": [ { "$ref": "#/components/schemas/OneTimeListPriceResponse" }, { "$ref": "#/components/schemas/FixedListPriceResponse" }, { "$ref": "#/components/schemas/LinearListPriceResponse" }, { "$ref": "#/components/schemas/PackageListPriceResponse" }, { "$ref": "#/components/schemas/SeatBasedListPriceResponse" }, { "$ref": "#/components/schemas/GraduatedListPriceResponse" }, { "$ref": "#/components/schemas/VolumeListPriceResponse" } ] }, "examples": { "GraduatedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "VolumeListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "SeatBasedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "PackageListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "LinearListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "FixedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "OneTimeListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/products/{id}/archive": { "post": { "tags": [ "Products" ], "summary": "Archive a product", "description": "Archive one of your products. Once archived, new prices cannot be created for the product.", "operationId": "postProductsByIdArchive", "parameters": [ { "name": "id", "in": "path", "description": "Product ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240509ProductResponse", "example": { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } }, "examples": { "Stable20240509ProductResponse": { "summary": "", "value": { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/list-prices/{id}": { "get": { "tags": [ "List Prices" ], "summary": "Get a list price", "description": "Get a list price by ID", "operationId": "getListPricesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "oneOf": [ { "$ref": "#/components/schemas/OneTimeListPriceResponse" }, { "$ref": "#/components/schemas/FixedListPriceResponse" }, { "$ref": "#/components/schemas/LinearListPriceResponse" }, { "$ref": "#/components/schemas/PackageListPriceResponse" }, { "$ref": "#/components/schemas/SeatBasedListPriceResponse" }, { "$ref": "#/components/schemas/GraduatedListPriceResponse" }, { "$ref": "#/components/schemas/VolumeListPriceResponse" } ] }, "examples": { "GraduatedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "VolumeListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "SeatBasedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "PackageListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "LinearListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "FixedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "OneTimeListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "List Prices" ], "summary": "Update a list price", "description": "Update a list price", "operationId": "putListPricesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 } }, "oneOf": [ { "$ref": "#/components/schemas/OneTimeListPriceRequest" }, { "$ref": "#/components/schemas/FixedListPriceRequest" }, { "$ref": "#/components/schemas/LinearListPriceRequest" }, { "$ref": "#/components/schemas/PackageListPriceRequest" }, { "$ref": "#/components/schemas/SeatBasedListPriceRequest" }, { "$ref": "#/components/schemas/GraduatedListPriceRequest" }, { "$ref": "#/components/schemas/VolumeListPriceRequest" } ] }, "examples": { "GraduatedListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 } } }, "VolumeListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } }, "SeatBasedListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } }, "PackageListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } }, "LinearListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } }, "FixedListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } }, "OneTimeListPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "oneOf": [ { "$ref": "#/components/schemas/OneTimeListPriceResponse" }, { "$ref": "#/components/schemas/FixedListPriceResponse" }, { "$ref": "#/components/schemas/LinearListPriceResponse" }, { "$ref": "#/components/schemas/PackageListPriceResponse" }, { "$ref": "#/components/schemas/SeatBasedListPriceResponse" }, { "$ref": "#/components/schemas/GraduatedListPriceResponse" }, { "$ref": "#/components/schemas/VolumeListPriceResponse" } ] }, "examples": { "GraduatedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "VolumeListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "SeatBasedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "PackageListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "LinearListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "FixedListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } }, "OneTimeListPriceResponse": { "summary": "", "value": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/tax-rates": { "get": { "tags": [ "Tax Rates" ], "summary": "List all Tax Rates", "description": "List all Tax Rates", "operationId": "getTaxRates", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse", "example": { "items": [ { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListResponse": { "summary": "", "value": { "items": [ { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Tax Rates" ], "summary": "Create a new TaxRate", "description": "Create a new TaxRate", "operationId": "postTaxRates", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTaxRateRequest", "example": { "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6" } }, "examples": { "CreateTaxRateRequest": { "summary": "", "value": { "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaxRateResponse", "example": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } }, "examples": { "TaxRateResponse": { "summary": "", "value": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/tax-rates/{id}": { "get": { "tags": [ "Tax Rates" ], "summary": "Get a Tax Rate by ID", "description": "Get a Tax Rate by ID", "operationId": "getTaxRatesById", "parameters": [ { "name": "id", "in": "path", "description": "Tax Rate ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaxRateResponse", "example": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } }, "examples": { "TaxRateResponse": { "summary": "", "value": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Tax Rates" ], "summary": "Update a TaxRate", "description": "Update a TaxRate", "operationId": "putTaxRatesById", "parameters": [ { "name": "id", "in": "path", "description": "TaxRate ID", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTaxRateRequest", "example": { "id": "0373904e-0f24-4c19-bb0d-9b855f1ec3ca", "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6" } }, "examples": { "UpdateTaxRateRequest": { "summary": "", "value": { "id": "0373904e-0f24-4c19-bb0d-9b855f1ec3ca", "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaxRateResponse", "example": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } }, "examples": { "TaxRateResponse": { "summary": "", "value": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Tax Rates" ], "summary": "Delete a Tax Rate", "description": "Delete a Tax Rate", "operationId": "deleteTaxRatesById", "parameters": [ { "name": "id", "in": "path", "description": "Tax Rate ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaxRateResponse", "example": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } }, "examples": { "TaxRateResponse": { "summary": "", "value": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/tax-rates/{id}/archive": { "post": { "tags": [ "Tax Rates" ], "summary": "Archive a tax rate", "description": "Archive a tax rate", "operationId": "postTaxRatesByIdArchive", "parameters": [ { "name": "id", "in": "path", "description": "TaxRate ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ArchiveTaxRateEndpointProductArchiveTaxRateResponseModel", "example": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "subRates": [], "isArchived": true } }, "examples": { "ArchiveTaxRateEndpointProductArchiveTaxRateResponseModel": { "summary": "", "value": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "subRates": [], "isArchived": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/tax-registrations": { "get": { "tags": [ "Tax Registrations" ], "summary": "List all Tax Registrations", "description": "List all Tax Registrations", "operationId": "getTaxRegistrations", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListTaxRegistrationEndpointProductListTaxRegistrationPaginatedResponseModel", "example": { "items": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListTaxRegistrationEndpointProductListTaxRegistrationPaginatedResponseModel": { "summary": "", "value": { "items": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Tax Registrations" ], "summary": "Create a new Tax Registration", "description": "Create a new Tax Registration", "operationId": "postTaxRegistrations", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTaxRegistrationEndpointCreateTaxRegistrationRequestModel", "example": { "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } }, "examples": { "CreateTaxRegistrationEndpointCreateTaxRegistrationRequestModel": { "summary": "", "value": { "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTaxRegistrationEndpointProductCreateTaxRegistrationResponseModel", "example": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } }, "examples": { "CreateTaxRegistrationEndpointProductCreateTaxRegistrationResponseModel": { "summary": "", "value": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/tax-registrations/for-merchant/{id}": { "get": { "tags": [ "Tax Registrations" ], "summary": "Get all tax registrations for a merchant by merchant ID", "description": "Get all tax registrations for a merchant by merchant ID", "operationId": "getTaxRegistrationsForMerchantById", "parameters": [ { "name": "id", "in": "path", "description": "Merchant ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetTaxRegistrationForMerchantProductResponse", "example": { "items": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "42020696-da25-44d0-ab79-9ecbf8fc5307", "taxIdentifier": "CA123456789", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "pagination": { "after": "nextOffset", "before": "previousOffset", "totalResultSize": 100 } } }, "examples": { "GetTaxRegistrationForMerchantProductResponse": { "summary": "", "value": { "items": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "42020696-da25-44d0-ab79-9ecbf8fc5307", "taxIdentifier": "CA123456789", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "pagination": { "after": "nextOffset", "before": "previousOffset", "totalResultSize": 100 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/tax-registrations/for-customer/{id}": { "get": { "tags": [ "Tax Registrations" ], "summary": "Get all tax registrations for a customer by customer ID", "description": "Get all tax registrations for a customer by customer ID", "operationId": "getTaxRegistrationsForCustomerById", "parameters": [ { "name": "id", "in": "path", "description": "Customer ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetTaxRegistrationForCustomerProductResponse", "example": { "items": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "42020696-da25-44d0-ab79-9ecbf8fc5307", "taxIdentifier": "CA123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "pagination": { "after": "nextOffset", "before": "previousOffset", "totalResultSize": 100 } } }, "examples": { "GetTaxRegistrationForCustomerProductResponse": { "summary": "", "value": { "items": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "42020696-da25-44d0-ab79-9ecbf8fc5307", "taxIdentifier": "CA123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "pagination": { "after": "nextOffset", "before": "previousOffset", "totalResultSize": 100 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/tax-registrations/{id}": { "get": { "tags": [ "Tax Registrations" ], "summary": "Get a Tax Registration by ID", "description": "Get a Tax Registration by ID", "operationId": "getTaxRegistrationsById", "parameters": [ { "name": "id", "in": "path", "description": "Tax registration ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetTaxRegistrationEndpointProductGetTaxRegistrationResponseModel", "example": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } }, "examples": { "GetTaxRegistrationEndpointProductGetTaxRegistrationResponseModel": { "summary": "", "value": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Tax Registrations" ], "summary": "Update a Tax Registration", "description": "Update a Tax Registration", "operationId": "putTaxRegistrationsById", "parameters": [ { "name": "id", "in": "path", "description": "Tax registration ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTaxRegistrationEndpointUpdateTaxRegistrationRequestModel", "example": { "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } }, "examples": { "UpdateTaxRegistrationEndpointUpdateTaxRegistrationRequestModel": { "summary": "", "value": { "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTaxRegistrationEndpointProductUpdateTaxRegistrationResponseModel", "example": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } }, "examples": { "UpdateTaxRegistrationEndpointProductUpdateTaxRegistrationResponseModel": { "summary": "", "value": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Tax Registrations" ], "summary": "Delete a Tax Registration", "description": "Delete a Tax Registration", "operationId": "deleteTaxRegistrationsById", "parameters": [ { "name": "id", "in": "path", "description": "Tax registration ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteTaxRegistrationEndpointProductDeleteTaxRegistrationResponseModel", "example": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } }, "examples": { "DeleteTaxRegistrationEndpointProductDeleteTaxRegistrationResponseModel": { "summary": "", "value": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/payments/settings": { "get": { "tags": [ "Account Settings" ], "summary": "Payment settings for Sequence account", "description": "Retrieves payment settings for the current Sequence accounts. If no settings exist, default settings will be returned.", "operationId": "getPaymentsSettings", "parameters": [ { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountPaymentSettings", "example": { "id": "e095e00f-36af-44c9-8c53-3e25677ce8ce", "failureNotifications": { "merchantNotifications": "SEND_NOTIFICATIONS", "customerNotifications": "SEND_NOTIFICATIONS" } } }, "examples": { "AccountPaymentSettings": { "summary": "", "value": { "id": "e095e00f-36af-44c9-8c53-3e25677ce8ce", "failureNotifications": { "merchantNotifications": "SEND_NOTIFICATIONS", "customerNotifications": "SEND_NOTIFICATIONS" } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/payments/settings/{id}": { "put": { "tags": [ "Account Settings" ], "summary": "Update payment settings for Sequence account", "description": "Updates payment settings for the current Sequence accounts.", "operationId": "putPaymentsSettingsById", "parameters": [ { "name": "id", "in": "path", "description": "Account Payment Settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAccountPaymentSettingsEndpointUpdateAccountPaymentSettingsRequest", "example": { "failureNotifications": { "merchantNotifications": "DO_NOT_SEND_NOTIFICATIONS", "customerNotifications": "DO_NOT_SEND_NOTIFICATIONS" } } }, "examples": { "UpdateAccountPaymentSettingsEndpointUpdateAccountPaymentSettingsRequest": { "summary": "", "value": { "failureNotifications": { "merchantNotifications": "DO_NOT_SEND_NOTIFICATIONS", "customerNotifications": "DO_NOT_SEND_NOTIFICATIONS" } } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountPaymentSettings", "example": { "id": "e095e00f-36af-44c9-8c53-3e25677ce8ce", "failureNotifications": { "merchantNotifications": "SEND_NOTIFICATIONS", "customerNotifications": "SEND_NOTIFICATIONS" } } }, "examples": { "AccountPaymentSettings": { "summary": "", "value": { "id": "e095e00f-36af-44c9-8c53-3e25677ce8ce", "failureNotifications": { "merchantNotifications": "SEND_NOTIFICATIONS", "customerNotifications": "SEND_NOTIFICATIONS" } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/payments/settings/billing-schedules": { "post": { "tags": [ "Billing Schedules" ], "summary": "Create billing schedule payment settings", "description": "Create payment settings for billing schedules. Invoices for billing schedules with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. Billing schedule payment settings override customer payment settings. You can also override billing schedule payment settings with invoice payment settings.", "operationId": "postPaymentsSettingsBillingSchedules", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBillingScheduleSettingsEndpointCreateBillingScheduleSettingsRequestModel", "example": { "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "CreateBillingScheduleSettingsEndpointCreateBillingScheduleSettingsRequestModel": { "summary": "", "value": { "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingScheduleSettings", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "BillingScheduleSettings": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/payments/settings/billing-schedules/{id}": { "get": { "tags": [ "Billing Schedules" ], "summary": "Get billing schedule payment settings", "description": "Get payment settings for billing schedules. Invoices for billing schedules with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. Billing schedule payment settings override customer payment settings. You can also override billing schedule payment settings with invoice payment settings.", "operationId": "getPaymentsSettingsBillingSchedulesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingScheduleSettings", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "BillingScheduleSettings": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Billing Schedules" ], "summary": "Update billing schedule payment settings", "description": "Update payment settings for billing schedules. Invoices for billing schedules with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. Billing schedule payment settings override customer payment settings. You can also override billing schedule payment settings with invoice payment settings.", "operationId": "putPaymentsSettingsBillingSchedulesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBillingScheduleSettingsEndpointUpdateBillingScheduleSettingsRequestModel", "example": { "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "UpdateBillingScheduleSettingsEndpointUpdateBillingScheduleSettingsRequestModel": { "summary": "", "value": { "paymentProvider": "STRIPE", "autoCharge": true } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingScheduleSettings", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "BillingScheduleSettings": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Billing Schedules" ], "summary": "Delete billing schedule payment settings", "description": "Delete payment settings for billing schedules. Invoices for billing schedules with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. Billing schedule payment settings override customer payment settings. You can also override billing schedule payment settings with invoice payment settings.", "operationId": "deletePaymentsSettingsBillingSchedulesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingScheduleSettings", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "BillingScheduleSettings": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/payments/settings/billing-schedules/for-billing-schedule/{id}": { "get": { "tags": [ "Billing Schedules" ], "summary": "Get billing schedule payment settings by billing schedule ID", "description": "Get payment settings for billing schedules by billing schedule ID. Invoices for billing schedules with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. Billing schedule payment settings override customer payment settings. You can also override billing schedule payment settings with invoice payment settings.", "operationId": "getPaymentsSettingsBillingSchedulesForBillingScheduleById", "parameters": [ { "name": "id", "in": "path", "description": "Unique billing schedule ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingScheduleSettings", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "BillingScheduleSettings": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/payments/settings/invoices": { "post": { "tags": [ "Invoices" ], "summary": "Create invoice payment settings", "description": "Create payment settings for invoices. Invoices with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. Invoice payment settings override billing schedule payment settings and customer payment settings.", "operationId": "postPaymentsSettingsInvoices", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoiceSettingsEndpointCreateInvoiceSettingsRequestModel", "example": { "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } }, "examples": { "CreateInvoiceSettingsEndpointCreateInvoiceSettingsRequestModel": { "summary": "", "value": { "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoiceSettingsEndpointProductCreateInvoiceSettingsResponseModel", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } }, "examples": { "CreateInvoiceSettingsEndpointProductCreateInvoiceSettingsResponseModel": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/payments/settings/invoices/for-invoice/{id}": { "get": { "tags": [ "Invoices" ], "summary": "Get invoice payment settings by invoice ID", "description": "Get payment settings for invoices by invoice ID. Invoices with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. Invoice payment settings override billing schedule payment settings and customer payment settings.", "operationId": "getPaymentsSettingsInvoicesForInvoiceById", "parameters": [ { "name": "id", "in": "path", "description": "Unique invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetByInvoiceIdProductGetInvoiceSettingsResponseModel", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } }, "examples": { "GetByInvoiceIdProductGetInvoiceSettingsResponseModel": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/payments/settings/invoices/{id}": { "get": { "tags": [ "Invoices" ], "summary": "Get invoice payment settings", "description": "Get payment settings for invoices. Invoices with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. Invoice payment settings override billing schedule payment settings and customer payment settings.", "operationId": "getPaymentsSettingsInvoicesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetInvoiceSettingsEndpointProductGetInvoiceSettingsResponseModel", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } }, "examples": { "GetInvoiceSettingsEndpointProductGetInvoiceSettingsResponseModel": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Invoices" ], "summary": "Update invoice payment settings", "description": "Update payment settings for invoices. Invoices with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. Invoice payment settings override billing schedule payment settings and customer payment settings.", "operationId": "putPaymentsSettingsInvoicesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceSettingsEndpointUpdateInvoiceSettingsRequestModel", "example": { "paymentProvider": "STRIPE" } }, "examples": { "UpdateInvoiceSettingsEndpointUpdateInvoiceSettingsRequestModel": { "summary": "", "value": { "paymentProvider": "STRIPE" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceSettingsEndpointProductUpdateInvoiceSettingsResponseModel", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } }, "examples": { "UpdateInvoiceSettingsEndpointProductUpdateInvoiceSettingsResponseModel": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Invoices" ], "summary": "Delete invoice payment settings", "description": "Delete payment settings for invoices. Invoices with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. Invoice payment settings override billing schedule payment settings and customer payment settings.", "operationId": "deletePaymentsSettingsInvoicesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteInvoiceSettingsEndpointProductDeleteInvoiceSettingsResponseModel", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } }, "examples": { "DeleteInvoiceSettingsEndpointProductDeleteInvoiceSettingsResponseModel": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/payments/settings/customers": { "post": { "tags": [ "Customers" ], "summary": "Create customer payment settings", "description": "Create payment settings for customers. Invoices for customers with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. You can override customer payment settings with billing schedule payment settings and invoice payment settings.", "operationId": "postPaymentsSettingsCustomers", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCustomerSettingsEndpointCreateCustomerSettingsRequestModel", "example": { "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } }, "examples": { "CreateCustomerSettingsEndpointCreateCustomerSettingsRequestModel": { "summary": "", "value": { "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCustomerSettingsEndpointProductCreateCustomerSettingsResponseModel", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } }, "examples": { "CreateCustomerSettingsEndpointProductCreateCustomerSettingsResponseModel": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/payments/settings/customers/{id}": { "get": { "tags": [ "Customers" ], "summary": "Get customer payment settings", "description": "Get payment settings for customers. Invoices for customers with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. You can override customer payment settings with billing schedule payment settings and invoice payment settings.", "operationId": "getPaymentsSettingsCustomersById", "parameters": [ { "name": "id", "in": "path", "description": "Unique settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCustomerSettingsEndpointProductGetCustomerSettingsResponseModel", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } }, "examples": { "GetCustomerSettingsEndpointProductGetCustomerSettingsResponseModel": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Customers" ], "summary": "Update customer payment settings", "description": "Update payment settings for customers. Invoices for customers with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. You can override customer payment settings with billing schedule payment settings and invoice payment settings.", "operationId": "putPaymentsSettingsCustomersById", "parameters": [ { "name": "id", "in": "path", "description": "Unique settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCustomerSettingsEndpointUpdateCustomerSettingsRequestModel", "example": { "paymentProvider": "STRIPE" } }, "examples": { "UpdateCustomerSettingsEndpointUpdateCustomerSettingsRequestModel": { "summary": "", "value": { "paymentProvider": "STRIPE" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCustomerSettingsEndpointProductUpdateCustomerSettingsResponseModel", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } }, "examples": { "UpdateCustomerSettingsEndpointProductUpdateCustomerSettingsResponseModel": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Customers" ], "summary": "Delete customer payment settings", "description": "Delete payment settings for customers. Invoices for customers with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. You can override customer payment settings with billing schedule payment settings and invoice payment settings.", "operationId": "deletePaymentsSettingsCustomersById", "parameters": [ { "name": "id", "in": "path", "description": "Unique settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteCustomerSettingsEndpointProductDeleteCustomerSettingsResponseModel", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } }, "examples": { "DeleteCustomerSettingsEndpointProductDeleteCustomerSettingsResponseModel": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/stripe/collections/settings": { "get": { "tags": [ "Stripe Collection Settings" ], "summary": "Stripe collection settings for Sequence account", "description": "Retrieves Stripe collection settings for the current Sequence accounts. If no settings exist, default settings will be returned.", "operationId": "getStripeCollectionsSettings", "parameters": [ { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StripeCollectionSettings", "example": { "id": "018f6b0c-7e89-7b4a-8e47-1b2e2d5a4f6c", "sequenceAccountId": "683fe518-60c8-429f-9320-8aa7efc20bcc", "enableAutomaticPayments": true, "autoEnableStripePayments": false, "retryOffsetDays": [] } }, "examples": { "StripeCollectionSettings": { "summary": "", "value": { "id": "018f6b0c-7e89-7b4a-8e47-1b2e2d5a4f6c", "sequenceAccountId": "683fe518-60c8-429f-9320-8aa7efc20bcc", "enableAutomaticPayments": true, "autoEnableStripePayments": false, "retryOffsetDays": [] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/stripe/collections/settings/{id}": { "put": { "tags": [ "Stripe Collection Settings" ], "summary": "Update Stripe collection settings for Sequence account", "description": "Updates Stripe collection settings for the current Sequence accounts.", "operationId": "putStripeCollectionsSettingsById", "parameters": [ { "name": "id", "in": "path", "description": "Stripe Collection Settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStripeCollectionSettingsEndpointUpdateStripeCollectionSettingsRequest", "example": { "enableAutomaticPayments": false, "autoEnableStripePayments": true, "retryAnchor": "DUE_DATE", "retryOffsetDays": [ 0, 7, 14 ] } }, "examples": { "UpdateStripeCollectionSettingsEndpointUpdateStripeCollectionSettingsRequest": { "summary": "", "value": { "enableAutomaticPayments": false, "autoEnableStripePayments": true, "retryAnchor": "DUE_DATE", "retryOffsetDays": [ 0, 7, 14 ] } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StripeCollectionSettings", "example": { "id": "018f6b0c-7e89-7b4a-8e47-1b2e2d5a4f6c", "sequenceAccountId": "683fe518-60c8-429f-9320-8aa7efc20bcc", "enableAutomaticPayments": true, "autoEnableStripePayments": false, "retryOffsetDays": [] } }, "examples": { "StripeCollectionSettings": { "summary": "", "value": { "id": "018f6b0c-7e89-7b4a-8e47-1b2e2d5a4f6c", "sequenceAccountId": "683fe518-60c8-429f-9320-8aa7efc20bcc", "enableAutomaticPayments": true, "autoEnableStripePayments": false, "retryOffsetDays": [] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customer-organizations": { "post": { "tags": [ "Organizations" ], "summary": "Create a customer organization", "description": "Create a customer organization to manage parent-child relationships for your [customers](/customers/overview).", "operationId": "postCustomerOrganizations", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerOrganizationRequest", "example": { "ownerId": "50af5191-05a3-42a5-802a-6b59091157af", "memberIds": [ "e309e948-088e-4d77-b654-cd85498f1555", "50af5191-05a3-42a5-802a-6b59091157af" ] } }, "examples": { "CustomerOrganizationRequest": { "summary": "", "value": { "ownerId": "50af5191-05a3-42a5-802a-6b59091157af", "memberIds": [ "e309e948-088e-4d77-b654-cd85498f1555", "50af5191-05a3-42a5-802a-6b59091157af" ] } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerOrganization", "example": { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } }, "examples": { "CustomerOrganization": { "summary": "", "value": { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customers/{id}": { "get": { "tags": [ "Customers" ], "summary": "Get customer", "description": "Retrieve the details of one of your [Customers](/customers/overview).", "operationId": "getCustomersById", "parameters": [ { "name": "id", "in": "path", "description": "Customer ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Customer", "example": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2025-08-28T12:00:00Z", "taxStatus": "TAXED", "contacts": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ], "status": "ACTIVE", "customProperties": { "region": "EU", "tier": "gold" } } }, "examples": { "Customer": { "summary": "", "value": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2025-08-28T12:00:00Z", "taxStatus": "TAXED", "contacts": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ], "status": "ACTIVE", "customProperties": { "region": "EU", "tier": "gold" } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Customers" ], "summary": "Update customer", "description": "Update the details of one of your [customers](/customers/overview).", "operationId": "putCustomersById", "parameters": [ { "name": "id", "in": "path", "description": "Customer ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOrUpdateCustomerRequest", "example": { "legalName": "John Doe", "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "url": "https://example.com/", "label": "Example customer", "taxStatus": "TAXED", "customerAliases": [ "b1c87177-088a-40ec-8917-9809343f3f9c" ], "integrationIds": [ { "service": "Xero", "id": "123456789" }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9" }, { "service": "HubSpot", "id": "123456789" } ], "parentId": "50af5191-05a3-42a5-802a-6b59091157af", "contacts": [ { "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "PRIMARY" }, { "name": "Anna Smith", "email": "anna.smith@example.com", "billingPreference": "STANDARD" }, { "name": "Penny Smith", "email": "penny.smith@example.com", "billingPreference": "NONE" } ], "pushToIntegrations": [ "Xero" ], "status": "ACTIVE" } }, "examples": { "CreateOrUpdateCustomerRequest": { "summary": "", "value": { "legalName": "John Doe", "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "url": "https://example.com/", "label": "Example customer", "taxStatus": "TAXED", "customerAliases": [ "b1c87177-088a-40ec-8917-9809343f3f9c" ], "integrationIds": [ { "service": "Xero", "id": "123456789" }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9" }, { "service": "HubSpot", "id": "123456789" } ], "parentId": "50af5191-05a3-42a5-802a-6b59091157af", "contacts": [ { "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "PRIMARY" }, { "name": "Anna Smith", "email": "anna.smith@example.com", "billingPreference": "STANDARD" }, { "name": "Penny Smith", "email": "penny.smith@example.com", "billingPreference": "NONE" } ], "pushToIntegrations": [ "Xero" ], "status": "ACTIVE" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Customer", "example": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2025-08-28T12:00:00Z", "taxStatus": "TAXED", "contacts": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ], "status": "ACTIVE", "customProperties": { "region": "EU", "tier": "gold" } } }, "examples": { "Customer": { "summary": "", "value": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2025-08-28T12:00:00Z", "taxStatus": "TAXED", "contacts": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ], "status": "ACTIVE", "customProperties": { "region": "EU", "tier": "gold" } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customers/{customer}/contacts/{id}/archive": { "post": { "tags": [ "Contacts" ], "summary": "Archive a contact", "description": "Mark a contact as archived", "operationId": "postCustomersByCustomerContactsByIdArchive", "parameters": [ { "name": "customer", "in": "path", "description": "The Customer ID", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "Unique ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Contact", "example": { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } }, "examples": { "Contact": { "summary": "", "value": { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customers/{customer}/contacts/{id}": { "put": { "tags": [ "Contacts" ], "summary": "Update a contact", "description": "Update a contact", "operationId": "putCustomersByCustomerContactsById", "parameters": [ { "name": "customer", "in": "path", "description": "The Customer ID", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "Unique ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactRequestModel", "example": { "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "PRIMARY" } }, "examples": { "ContactRequestModel": { "summary": "", "value": { "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "PRIMARY" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Contact", "example": { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } }, "examples": { "Contact": { "summary": "", "value": { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customer-aliases": { "get": { "tags": [ "Customer Aliases" ], "summary": "List all Customer Aliases", "description": "List all Customer Aliases", "operationId": "getCustomerAliases", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "value", "in": "query", "description": "Filter customer aliases by value", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCustomerAliasPaginatedResponseModel", "example": { "items": [ { "id": "01849e70-0a0f-72ca-ba07-5557dd734d43", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "createdAt": "2022-10-01T00:00:00Z", "deletedAt": "2022-10-01T00:00:00Z", "label": "CRM ID", "archivedAt": "2022-10-01T00:00:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListCustomerAliasPaginatedResponseModel": { "summary": "", "value": { "items": [ { "id": "01849e70-0a0f-72ca-ba07-5557dd734d43", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "createdAt": "2022-10-01T00:00:00Z", "deletedAt": "2022-10-01T00:00:00Z", "label": "CRM ID", "archivedAt": "2022-10-01T00:00:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Customer Aliases" ], "summary": "Create a new Customer Alias", "description": "Create a new Customer Alias", "operationId": "postCustomerAliases", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } }, { "name": "Idempotency-Key", "in": "header", "description": "A unique key that makes this request safe to retry (maximum 255 characters). Retrying with the same key returns the original response, and the operation runs at most once. Keys are retained for 24 hours; after that, a request with the same key is treated as new.", "required": false, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCustomerAliasRequestModel", "example": { "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "label": "CRM ID" } }, "examples": { "CreateCustomerAliasRequestModel": { "summary": "", "value": { "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "label": "CRM ID" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerAliasResponseModel", "example": { "id": "01849e70-0a0f-72ca-ba07-5557dd734d43", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "createdAt": "2022-10-01T00:00:00Z", "deletedAt": "2022-10-01T00:00:00Z", "label": "CRM ID", "archivedAt": "2022-10-01T00:00:00Z" } }, "examples": { "CustomerAliasResponseModel": { "summary": "", "value": { "id": "01849e70-0a0f-72ca-ba07-5557dd734d43", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "createdAt": "2022-10-01T00:00:00Z", "deletedAt": "2022-10-01T00:00:00Z", "label": "CRM ID", "archivedAt": "2022-10-01T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customer-custom-property-keys": { "get": { "tags": [ "Customers" ], "summary": "List customer custom property keys", "description": "List all distinct custom property keys across customers for the current account.", "operationId": "getCustomerCustomPropertyKeys", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerCustomPropertyKeysControllerListCustomerCustomPropertyKeysResponse", "example": { "items": [ "region", "tier" ] } }, "examples": { "CustomerCustomPropertyKeysControllerListCustomerCustomPropertyKeysResponse": { "summary": "", "value": { "items": [ "region", "tier" ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customers/{id}/archive": { "post": { "tags": [ "Customers" ], "summary": "Archive customer", "description": "Archive a [customer](/customers/overview).", "operationId": "postCustomersByIdArchive", "parameters": [ { "name": "id", "in": "path", "description": "Customer ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Customer", "example": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2025-08-28T12:00:00Z", "taxStatus": "TAXED", "contacts": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ], "status": "ACTIVE", "customProperties": { "region": "EU", "tier": "gold" } } }, "examples": { "Customer": { "summary": "", "value": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2025-08-28T12:00:00Z", "taxStatus": "TAXED", "contacts": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ], "status": "ACTIVE", "customProperties": { "region": "EU", "tier": "gold" } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customer-organizations/{id}/members": { "put": { "tags": [ "Organizations" ], "summary": "Replace members of a customer organization", "description": "Replace all [customer](/customers/overview) in an existing customer organization. This action does not impact their membership in other organizations.", "operationId": "putCustomerOrganizationsByIdMembers", "parameters": [ { "name": "id", "in": "path", "description": "Customer organisation ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerOrganizationMembers", "example": { "customerIds": [ "e06f36e2-0a44-404d-bdbc-b66a292609b0" ] } }, "examples": { "CustomerOrganizationMembers": { "summary": "", "value": { "customerIds": [ "e06f36e2-0a44-404d-bdbc-b66a292609b0" ] } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerOrganization", "example": { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e06f36e2-0a44-404d-bdbc-b66a292609b0", "name": "FinTech Wealth Management" } ] } }, "examples": { "CustomerOrganization": { "summary": "", "value": { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e06f36e2-0a44-404d-bdbc-b66a292609b0", "name": "FinTech Wealth Management" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Organizations" ], "summary": "Add a customer to a customer organization", "description": "Add a [customer](/customers/overview) to an existing customer organization. This action does not impact their membership in other organizations.", "operationId": "postCustomerOrganizationsByIdMembers", "parameters": [ { "name": "id", "in": "path", "description": "Customer organisation ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerOrganizationMembers", "example": { "customerIds": [ "e06f36e2-0a44-404d-bdbc-b66a292609b0" ] } }, "examples": { "CustomerOrganizationMembers": { "summary": "", "value": { "customerIds": [ "e06f36e2-0a44-404d-bdbc-b66a292609b0" ] } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerOrganization", "example": { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" }, { "id": "e06f36e2-0a44-404d-bdbc-b66a292609b0", "name": "FinTech Wealth Management" } ] } }, "examples": { "CustomerOrganization": { "summary": "", "value": { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" }, { "id": "e06f36e2-0a44-404d-bdbc-b66a292609b0", "name": "FinTech Wealth Management" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customers/{customer}/contacts": { "get": { "tags": [ "Contacts" ], "summary": "List all contacts for a customer", "description": "List all contacts for a customer", "operationId": "getCustomersByCustomerContacts", "parameters": [ { "name": "customer", "in": "path", "description": "The Customer ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "includeArchived", "in": "query", "description": "Include archived contacts in results", "required": false, "schema": { "type": "boolean" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactResponseModel", "example": { "items": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ] } }, "examples": { "ContactResponseModel": { "summary": "", "value": { "items": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Contacts" ], "summary": "Create a new contact", "description": "Create a contact", "operationId": "postCustomersByCustomerContacts", "parameters": [ { "name": "customer", "in": "path", "description": "The Customer ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactRequestModel", "example": { "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "PRIMARY" } }, "examples": { "ContactRequestModel": { "summary": "", "value": { "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "PRIMARY" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Contact", "example": { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } }, "examples": { "Contact": { "summary": "", "value": { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customer-aliases/{id}": { "put": { "tags": [ "Customer Aliases" ], "summary": "Update a Customer Alias", "description": "Update a Customer Alias", "operationId": "putCustomerAliasesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCustomerAliasRequestModel", "example": { "label": "CRM ID" } }, "examples": { "UpdateCustomerAliasRequestModel": { "summary": "", "value": { "label": "CRM ID" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerAliasResponseModel", "example": { "id": "01849e70-0a0f-72ca-ba07-5557dd734d43", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "createdAt": "2022-10-01T00:00:00Z", "deletedAt": "2022-10-01T00:00:00Z", "label": "CRM ID", "archivedAt": "2022-10-01T00:00:00Z" } }, "examples": { "CustomerAliasResponseModel": { "summary": "", "value": { "id": "01849e70-0a0f-72ca-ba07-5557dd734d43", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "createdAt": "2022-10-01T00:00:00Z", "deletedAt": "2022-10-01T00:00:00Z", "label": "CRM ID", "archivedAt": "2022-10-01T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Customer Aliases" ], "summary": "Delete a Customer Alias", "description": "Delete a Customer Alias", "operationId": "deleteCustomerAliasesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerAliasResponseModel", "example": { "id": "01849e70-0a0f-72ca-ba07-5557dd734d43", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "createdAt": "2022-10-01T00:00:00Z", "deletedAt": "2022-10-01T00:00:00Z", "label": "CRM ID", "archivedAt": "2022-10-01T00:00:00Z" } }, "examples": { "CustomerAliasResponseModel": { "summary": "", "value": { "id": "01849e70-0a0f-72ca-ba07-5557dd734d43", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "createdAt": "2022-10-01T00:00:00Z", "deletedAt": "2022-10-01T00:00:00Z", "label": "CRM ID", "archivedAt": "2022-10-01T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customers/by-alias/{alias}": { "get": { "tags": [ "Customer Aliases" ], "summary": "Get customer by alias", "description": "Retrieve the details of one of your [customers](/customers/overview) using one of their aliases.", "operationId": "getCustomersByAliasByAlias", "parameters": [ { "name": "alias", "in": "path", "description": "Customer alias", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Customer20240509", "example": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2022-06-28T16:47:00Z", "legalName": "John Doe", "contactName": "John Doe", "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "email": "john@example.com", "telephone": "02010001000", "url": "https://example.com/", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "ID", "lastSynced": "2022-06-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2022-06-28T16:47:00Z", "isPending": false } ], "archivedAt": "2022-06-28T16:47:00Z", "billingEmails": [ "exampleCorpInvoices@example.com" ], "taxStatus": "TAXED" } }, "examples": { "Customer20240509": { "summary": "", "value": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2022-06-28T16:47:00Z", "legalName": "John Doe", "contactName": "John Doe", "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "email": "john@example.com", "telephone": "02010001000", "url": "https://example.com/", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "ID", "lastSynced": "2022-06-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2022-06-28T16:47:00Z", "isPending": false } ], "archivedAt": "2022-06-28T16:47:00Z", "billingEmails": [ "exampleCorpInvoices@example.com" ], "taxStatus": "TAXED" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customers": { "get": { "tags": [ "Customers" ], "summary": "List customers", "description": "List all [customers](/customers/overview).", "operationId": "getCustomers", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sortBy", "in": "query", "description": "Sort column. Default: creation time. Use customProperties. to sort by a custom property value.", "required": false, "schema": { "type": "string" } }, { "name": "legalName", "in": "query", "description": "Filter by legal name", "required": false, "schema": { "type": "string" } }, { "name": "email", "in": "query", "description": "Filter by email", "required": false, "schema": { "type": "string" } }, { "name": "alias", "in": "query", "description": "Filter by alias", "required": false, "schema": { "type": "string" } }, { "name": "label", "in": "query", "description": "Filter by label", "required": false, "schema": { "type": "string" } }, { "name": "includeArchived", "in": "query", "description": "Include archived customers", "required": false, "schema": { "type": "boolean" } }, { "name": "billingStatus", "in": "query", "description": "Filter by billing status, derived from active billing schedules. ACTIVE returns customers with a current billing schedule; INACTIVE returns customers without one. Invoices sent manually or via the API without a schedule do not count.", "required": false, "schema": { "type": "string", "enum": [ "ACTIVE", "INACTIVE" ] } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "name": "after", "in": "query", "description": "Pagination cursor.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor.", "required": false, "schema": { "type": "string" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC.", "required": false, "schema": { "type": "string", "enum": [ "ASC", "DESC" ] } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCustomerResponse", "example": { "items": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2011-08-28T01:00:00Z", "taxStatus": "TAXED", "customProperties": { "region": "EU", "tier": "gold" } } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListCustomerResponse": { "summary": "", "value": { "items": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2011-08-28T01:00:00Z", "taxStatus": "TAXED", "customProperties": { "region": "EU", "tier": "gold" } } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Customers" ], "summary": "Create customer", "description": "Create a new [customer](/customers/overview), who you can send money to and receive money from.", "operationId": "postCustomers", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOrUpdateCustomerRequest", "example": { "legalName": "John Doe", "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "url": "https://example.com/", "label": "Example customer", "taxStatus": "TAXED", "customerAliases": [ "b1c87177-088a-40ec-8917-9809343f3f9c" ], "integrationIds": [ { "service": "Xero", "id": "123456789" }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9" }, { "service": "HubSpot", "id": "123456789" } ], "parentId": "50af5191-05a3-42a5-802a-6b59091157af", "contacts": [ { "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "PRIMARY" }, { "name": "Anna Smith", "email": "anna.smith@example.com", "billingPreference": "STANDARD" }, { "name": "Penny Smith", "email": "penny.smith@example.com", "billingPreference": "NONE" } ], "pushToIntegrations": [ "Xero" ], "status": "ACTIVE" } }, "examples": { "CreateOrUpdateCustomerRequest": { "summary": "", "value": { "legalName": "John Doe", "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "url": "https://example.com/", "label": "Example customer", "taxStatus": "TAXED", "customerAliases": [ "b1c87177-088a-40ec-8917-9809343f3f9c" ], "integrationIds": [ { "service": "Xero", "id": "123456789" }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9" }, { "service": "HubSpot", "id": "123456789" } ], "parentId": "50af5191-05a3-42a5-802a-6b59091157af", "contacts": [ { "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "PRIMARY" }, { "name": "Anna Smith", "email": "anna.smith@example.com", "billingPreference": "STANDARD" }, { "name": "Penny Smith", "email": "penny.smith@example.com", "billingPreference": "NONE" } ], "pushToIntegrations": [ "Xero" ], "status": "ACTIVE" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Customer", "example": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2025-08-28T12:00:00Z", "taxStatus": "TAXED", "contacts": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ], "status": "ACTIVE", "customProperties": { "region": "EU", "tier": "gold" } } }, "examples": { "Customer": { "summary": "", "value": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2025-08-28T12:00:00Z", "taxStatus": "TAXED", "contacts": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ], "status": "ACTIVE", "customProperties": { "region": "EU", "tier": "gold" } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/customers/{id}/aliases": { "get": { "tags": [ "Customer Aliases" ], "summary": "Get Customer Aliases", "description": "Retrieve the details of one of your [Customer's](/customers/overview) aliases.", "operationId": "getCustomersByIdAliases", "parameters": [ { "name": "id", "in": "path", "description": "Customer ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCustomerAliasesResponse", "example": { "items": [ { "id": "0185a140-194a-7e9d-9fae-6a034fd4a725", "sequenceAccountId": "cd243b67-7d8c-42ee-b19f-b4e41f584415", "customerId": "0185a142-54ff-7ce5-846a-fc188432da6e", "value": "customer-alias-123", "createdAt": "2022-10-01T00:00:00Z" } ] } }, "examples": { "GetCustomerAliasesResponse": { "summary": "", "value": { "items": [ { "id": "0185a140-194a-7e9d-9fae-6a034fd4a725", "sequenceAccountId": "cd243b67-7d8c-42ee-b19f-b4e41f584415", "customerId": "0185a142-54ff-7ce5-846a-fc188432da6e", "value": "customer-alias-123", "createdAt": "2022-10-01T00:00:00Z" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/sequence-accounts/{id}": { "get": { "tags": [ "Accounts" ], "summary": "Get your account", "description": "Retrieve the details of your Sequence account.", "operationId": "getSequenceAccountsById", "parameters": [ { "name": "id", "in": "path", "description": "Sequence account ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SequenceAccount", "example": { "id": "13448448-ce43-4874-8acf-8ff2a8ca24c1", "createdAt": "2022-06-28T16:47:00Z", "sequenceOrganisationId": "02441bde-24e8-43d5-8e2d-f3e480778885", "companyName": "Acme Inc.", "companyNumber": "GB123987", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] } }, "examples": { "SequenceAccount": { "summary": "", "value": { "id": "13448448-ce43-4874-8acf-8ff2a8ca24c1", "createdAt": "2022-06-28T16:47:00Z", "sequenceOrganisationId": "02441bde-24e8-43d5-8e2d-f3e480778885", "companyName": "Acme Inc.", "companyNumber": "GB123987", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Accounts" ], "summary": "Update Account", "description": "Update Sequence account information", "operationId": "putSequenceAccountsById", "parameters": [ { "name": "id", "in": "path", "description": "Sequence Account ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSequenceAccountProductEndpointUpdateSequenceAccountRequest", "example": { "companyName": "Acme Inc.", "companyNumber": "GB123988", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] } }, "examples": { "UpdateSequenceAccountProductEndpointUpdateSequenceAccountRequest": { "summary": "", "value": { "companyName": "Acme Inc.", "companyNumber": "GB123988", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SequenceAccount", "example": { "id": "b6b0bb79-7b03-4cc0-9c70-2d3aec3aeb17", "createdAt": "2022-06-28T16:47:00Z", "sequenceOrganisationId": "e4f49f12-38cf-4fcf-ad2a-0ae7d83d6be4", "companyName": "Acme Inc.", "companyNumber": "GB123988", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] } }, "examples": { "SequenceAccount": { "summary": "", "value": { "id": "b6b0bb79-7b03-4cc0-9c70-2d3aec3aeb17", "createdAt": "2022-06-28T16:47:00Z", "sequenceOrganisationId": "e4f49f12-38cf-4fcf-ad2a-0ae7d83d6be4", "companyName": "Acme Inc.", "companyNumber": "GB123988", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/users": { "get": { "tags": [ "Users" ], "summary": "List all Users", "description": "List all users within your Sequence account.", "operationId": "getUsers", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListSequenceUsersResponse", "example": { "items": [ { "id": "7b1f28b9-a4ad-450b-a0ea-fd647d5109b2", "email": "john@example.xyz", "sequenceAccountIds": [ "83da2ca4-49c7-4d81-9c9a-ba5be11768b0", "c0901c87-e1a9-48e9-9e2f-9e05c402dcea" ], "state": "active", "roles": [ { "roleName": "financeUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "create", "read", "update", "delete", "archive", "start" ] }, { "resource": "org.product", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.quote", "actions": [ "read", "execute" ] }, { "resource": "org.invoice", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.creditNote", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] } ] } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } } }, "examples": { "ListSequenceUsersResponse": { "summary": "", "value": { "items": [ { "id": "7b1f28b9-a4ad-450b-a0ea-fd647d5109b2", "email": "john@example.xyz", "sequenceAccountIds": [ "83da2ca4-49c7-4d81-9c9a-ba5be11768b0", "c0901c87-e1a9-48e9-9e2f-9e05c402dcea" ], "state": "active", "roles": [ { "roleName": "financeUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "create", "read", "update", "delete", "archive", "start" ] }, { "resource": "org.product", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.quote", "actions": [ "read", "execute" ] }, { "resource": "org.invoice", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.creditNote", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] } ] } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/users/{id}": { "get": { "tags": [ "Users" ], "summary": "Get a user", "description": "Retrieve the details of one of your users.", "operationId": "getUsersById", "parameters": [ { "name": "id", "in": "path", "description": "Sequence User ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SequenceUserResponse", "example": { "id": "7b1f28b9-a4ad-450b-a0ea-fd647d5109b2", "email": "person@example.com", "sequenceAccountIds": [ "724c4f93-8606-4a38-bfbf-50a7045e4eaa" ], "state": "active", "roles": [ { "roleName": "salesUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "read" ] }, { "resource": "org.product", "actions": [ "read" ] }, { "resource": "org.quote", "actions": [ "create", "read", "update", "delete", "archive", "publish", "accept" ] }, { "resource": "org.invoice", "actions": [ "read" ] }, { "resource": "org.creditNote", "actions": [ "read" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "read" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "read" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] }, { "roleName": "financeUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "create", "read", "update", "delete", "archive", "start" ] }, { "resource": "org.product", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.quote", "actions": [ "read", "execute" ] }, { "resource": "org.invoice", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.creditNote", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] } ] } }, "examples": { "SequenceUserResponse": { "summary": "", "value": { "id": "7b1f28b9-a4ad-450b-a0ea-fd647d5109b2", "email": "person@example.com", "sequenceAccountIds": [ "724c4f93-8606-4a38-bfbf-50a7045e4eaa" ], "state": "active", "roles": [ { "roleName": "salesUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "read" ] }, { "resource": "org.product", "actions": [ "read" ] }, { "resource": "org.quote", "actions": [ "create", "read", "update", "delete", "archive", "publish", "accept" ] }, { "resource": "org.invoice", "actions": [ "read" ] }, { "resource": "org.creditNote", "actions": [ "read" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "read" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "read" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] }, { "roleName": "financeUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "create", "read", "update", "delete", "archive", "start" ] }, { "resource": "org.product", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.quote", "actions": [ "read", "execute" ] }, { "resource": "org.invoice", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.creditNote", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Users" ], "summary": "Delete User", "description": "Delete one of your Users.", "operationId": "deleteUsersById", "parameters": [ { "name": "id", "in": "path", "description": "Sequence User ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SequenceUserResponse", "example": { "id": "7b1f28b9-a4ad-450b-a0ea-fd647d5109b2", "email": "person@example.com", "sequenceAccountIds": [ "724c4f93-8606-4a38-bfbf-50a7045e4eaa" ], "state": "deleted", "roles": [ { "roleName": "salesUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "read" ] }, { "resource": "org.product", "actions": [ "read" ] }, { "resource": "org.quote", "actions": [ "create", "read", "update", "delete", "archive", "publish", "accept" ] }, { "resource": "org.invoice", "actions": [ "read" ] }, { "resource": "org.creditNote", "actions": [ "read" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "read" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "read" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] }, { "roleName": "financeUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "create", "read", "update", "delete", "archive", "start" ] }, { "resource": "org.product", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.quote", "actions": [ "read", "execute" ] }, { "resource": "org.invoice", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.creditNote", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] } ] } }, "examples": { "SequenceUserResponse": { "summary": "", "value": { "id": "7b1f28b9-a4ad-450b-a0ea-fd647d5109b2", "email": "person@example.com", "sequenceAccountIds": [ "724c4f93-8606-4a38-bfbf-50a7045e4eaa" ], "state": "deleted", "roles": [ { "roleName": "salesUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "read" ] }, { "resource": "org.product", "actions": [ "read" ] }, { "resource": "org.quote", "actions": [ "create", "read", "update", "delete", "archive", "publish", "accept" ] }, { "resource": "org.invoice", "actions": [ "read" ] }, { "resource": "org.creditNote", "actions": [ "read" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "read" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "read" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] }, { "roleName": "financeUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "create", "read", "update", "delete", "archive", "start" ] }, { "resource": "org.product", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.quote", "actions": [ "read", "execute" ] }, { "resource": "org.invoice", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.creditNote", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/sequence-accounts": { "get": { "tags": [ "Accounts" ], "summary": "List your accounts", "description": "List all of your Sequence accounts.", "operationId": "getSequenceAccounts", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "Sequence-Version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListSequenceAccountsResponse", "example": { "items": [ { "id": "7e330949-a175-496a-a060-27821656ce34", "createdAt": "2022-06-28T16:47:00Z", "sequenceOrganisationId": "13448448-ce43-4874-8acf-8ff2a8ca24c1", "companyName": "Acme Inc.", "companyNumber": "GB123987", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } } }, "examples": { "ListSequenceAccountsResponse": { "summary": "", "value": { "items": [ { "id": "7e330949-a175-496a-a060-27821656ce34", "createdAt": "2022-06-28T16:47:00Z", "sequenceOrganisationId": "13448448-ce43-4874-8acf-8ff2a8ca24c1", "companyName": "Acme Inc.", "companyNumber": "GB123987", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/discounts": { "get": { "tags": [ "Discounts" ], "summary": "List all discounts", "description": "List all discounts for Sequence account", "operationId": "getDiscounts", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListDiscountsResponse", "example": { "items": [ { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "seatDiscountType": "ALL_SEATS" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListDiscountsResponse": { "summary": "", "value": { "items": [ { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "seatDiscountType": "ALL_SEATS" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/billing-schedules/{billingScheduleId}": { "get": { "tags": [ "Billing Schedules" ], "summary": "Get Billing Schedule", "description": "Retrieve the details of one of your Billing Schedules.", "operationId": "getBillingSchedulesByBillingScheduleId", "parameters": [ { "name": "billingScheduleId", "in": "path", "description": "Billing Schedule ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingScheduleResponse", "example": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "BillingScheduleResponse": { "summary": "", "value": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Billing Schedules" ], "summary": "Update Billing Schedule", "description": "Update an existing [Billing Schedule](/billing/create-billing-schedules).", "operationId": "putBillingSchedulesByBillingScheduleId", "parameters": [ { "name": "billingScheduleId", "in": "path", "description": "Billing Schedule ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBillingScheduleRequest", "example": { "startDate": "2022-01-01", "endDate": "2022-12-01", "recurrenceDayOfMonth": 1, "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "autoIssueInvoices": true, "purchaseOrderNumber": "PO123", "rollUpBilling": false, "phases": [ { "priceIds": [ "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" ], "startDate": "2022-01-01", "endDate": "2022-12-01", "discounts": [], "minimums": [], "creditGrants": [ { "id": "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "listPriceIds": [ "b4d7e884-e007-4183-8355-4771865c5100" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "arrCalculation": "INCLUDE" } ] } ], "attachmentAssetIds": [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ], "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" } } }, "examples": { "UpdateBillingScheduleRequest": { "summary": "", "value": { "startDate": "2022-01-01", "endDate": "2022-12-01", "recurrenceDayOfMonth": 1, "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "autoIssueInvoices": true, "purchaseOrderNumber": "PO123", "rollUpBilling": false, "phases": [ { "priceIds": [ "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" ], "startDate": "2022-01-01", "endDate": "2022-12-01", "discounts": [], "minimums": [], "creditGrants": [ { "id": "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "listPriceIds": [ "b4d7e884-e007-4183-8355-4771865c5100" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "arrCalculation": "INCLUDE" } ] } ], "attachmentAssetIds": [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ], "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" } } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingScheduleResponse", "example": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "BillingScheduleResponse": { "summary": "", "value": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/discounts/{id}": { "get": { "tags": [ "Discounts" ], "summary": "Get a discount by ID", "description": "Get a discount by ID", "operationId": "getDiscountsById", "parameters": [ { "name": "id", "in": "path", "description": "Discount ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscountResponse", "example": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "seatDiscountType": "ALL_SEATS" } }, "examples": { "DiscountResponse": { "summary": "", "value": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "seatDiscountType": "ALL_SEATS" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Discounts" ], "summary": "Update a discount", "description": "Update a discount", "operationId": "putDiscountsById", "parameters": [ { "name": "id", "in": "path", "description": "Discount ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDiscountRequest", "example": { "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31" } }, "examples": { "UpdateDiscountRequest": { "summary": "", "value": { "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscountResponse", "example": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "seatDiscountType": "ALL_SEATS" } }, "examples": { "DiscountResponse": { "summary": "", "value": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "seatDiscountType": "ALL_SEATS" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Discounts" ], "summary": "Delete a discount", "description": "Delete a discount", "operationId": "deleteDiscountsById", "parameters": [ { "name": "id", "in": "path", "description": "Discount ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscountResponse", "example": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "seatDiscountType": "ALL_SEATS" } }, "examples": { "DiscountResponse": { "summary": "", "value": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "seatDiscountType": "ALL_SEATS" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/billing-products": { "get": { "tags": [ "Prices" ], "summary": "List all billing products", "description": "List all products with billing prices", "operationId": "getBillingProducts", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "name", "in": "query", "description": "Filter products by name (partial, case-insensitive match).", "required": false, "schema": { "type": "string" } }, { "name": "taxCategoryId", "in": "query", "description": "Filter products by tax category id (comma-separated).", "required": false, "schema": { "type": "string" } }, { "name": "recognitionMethod", "in": "query", "description": "Filter products by revenue recognition method (comma-separated). Options: STRAIGHT_LINE, USAGE, MILESTONE, POINT_IN_TIME", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListBillingProductsResponse", "example": { "items": [ { "id": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Fixed priced product", "label": "Fixed priced product - UK", "sequenceAccountId": "683fe518-60c8-429f-9320-8aa7efc20bcc", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "prices": [], "taxCategoryName": "SaaS", "recognitionMethod": "USAGE" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListBillingProductsResponse": { "summary": "", "value": { "items": [ { "id": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Fixed priced product", "label": "Fixed priced product - UK", "sequenceAccountId": "683fe518-60c8-429f-9320-8aa7efc20bcc", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "prices": [], "taxCategoryName": "SaaS", "recognitionMethod": "USAGE" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/billing-schedules/{billingScheduleId}/duplicate": { "post": { "tags": [ "Billing Schedules" ], "summary": "Duplicate a billing schedule", "description": "Duplicate a [billing schedule](/billing/create-billing-schedules).", "operationId": "postBillingSchedulesByBillingScheduleIdDuplicate", "parameters": [ { "name": "billingScheduleId", "in": "path", "description": "Billing Schedule ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DuplicateBillingScheduleRequest", "example": { "customerId": "cca32597-b6b0-4499-9669-128aef8702e4" } }, "examples": { "DuplicateBillingScheduleRequest": { "summary": "", "value": { "customerId": "cca32597-b6b0-4499-9669-128aef8702e4" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingScheduleResponse", "example": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "BillingScheduleResponse": { "summary": "", "value": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credits": { "get": { "tags": [ "Credits" ], "summary": "List credit grants", "description": "List all credit grants for this account", "operationId": "getCredits", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCreditGrantsResponse", "example": { "items": [ { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "On-boarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "creditNoteId": "73086198-8752-4ec9-a99b-16209a32dc6c", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListCreditGrantsResponse": { "summary": "", "value": { "items": [ { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "On-boarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "creditNoteId": "73086198-8752-4ec9-a99b-16209a32dc6c", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Credits" ], "summary": "Create a new credit grant", "description": "Create a new credit grant", "operationId": "postCredits", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCreditGrantRequest", "example": { "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "Onboarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createInvoice": true } }, "examples": { "CreateCreditGrantRequest": { "summary": "", "value": { "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "Onboarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createInvoice": true } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditGrantResponse", "example": { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "Onboarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] } }, "examples": { "CreditGrantResponse": { "summary": "", "value": { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "Onboarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credits/{customerId}/grants": { "get": { "tags": [ "Credits" ], "summary": "List Credit Grants for a customer", "description": "List all Credit Grants and their outstanding balances where the balance is non-zero", "operationId": "getCreditsByCustomerIdGrants", "parameters": [ { "name": "customerId", "in": "path", "description": "Customer ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditGrantsResponse", "example": { "items": [ { "id": "22efb229-c474-407c-bbf7-f5e113ee8b20", "name": "API Calls", "grantAmount": 1000, "balance": 324, "issueDate": "2022-02-22", "expiryDate": "2030-03-03" } ] } }, "examples": { "CreditGrantsResponse": { "summary": "", "value": { "items": [ { "id": "22efb229-c474-407c-bbf7-f5e113ee8b20", "name": "API Calls", "grantAmount": 1000, "balance": 324, "issueDate": "2022-02-22", "expiryDate": "2030-03-03" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/prices/{id}": { "get": { "tags": [ "Prices" ], "summary": "Get a Price by ID", "description": "Get a Price by ID", "operationId": "getPricesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique Price ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" }, "oneOf": [ { "$ref": "#/components/schemas/OneTimePriceResponse" }, { "$ref": "#/components/schemas/FixedPriceResponse" }, { "$ref": "#/components/schemas/LinearPriceResponse" }, { "$ref": "#/components/schemas/PackagePriceResponse" }, { "$ref": "#/components/schemas/SeatBasedPriceResponse" }, { "$ref": "#/components/schemas/GraduatedPriceResponse" }, { "$ref": "#/components/schemas/VolumePriceResponse" } ] }, "examples": { "GraduatedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } }, "VolumePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "SeatBasedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "PackagePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "LinearPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "FixedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "OneTimePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Prices" ], "summary": "Update a Price", "description": "Update a Price", "operationId": "putPricesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique Price ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePriceRequest", "example": { "name": "Demo Product", "status": "ACTIVE" } }, "examples": { "UpdatePriceRequest": { "summary": "", "value": { "name": "Demo Product", "status": "ACTIVE" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" }, "oneOf": [ { "$ref": "#/components/schemas/OneTimePriceResponse" }, { "$ref": "#/components/schemas/FixedPriceResponse" }, { "$ref": "#/components/schemas/LinearPriceResponse" }, { "$ref": "#/components/schemas/PackagePriceResponse" }, { "$ref": "#/components/schemas/SeatBasedPriceResponse" }, { "$ref": "#/components/schemas/GraduatedPriceResponse" }, { "$ref": "#/components/schemas/VolumePriceResponse" } ] }, "examples": { "GraduatedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } }, "VolumePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "SeatBasedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "PackagePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "LinearPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "FixedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "OneTimePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Prices" ], "summary": "Delete a Price", "description": "Delete a Price", "operationId": "deletePricesById", "parameters": [ { "name": "id", "in": "path", "description": "Unique Price ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" }, "oneOf": [ { "$ref": "#/components/schemas/OneTimePriceResponse" }, { "$ref": "#/components/schemas/FixedPriceResponse" }, { "$ref": "#/components/schemas/LinearPriceResponse" }, { "$ref": "#/components/schemas/PackagePriceResponse" }, { "$ref": "#/components/schemas/SeatBasedPriceResponse" }, { "$ref": "#/components/schemas/GraduatedPriceResponse" }, { "$ref": "#/components/schemas/VolumePriceResponse" } ] }, "examples": { "GraduatedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } }, "VolumePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "SeatBasedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "PackagePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "LinearPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "FixedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "OneTimePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/billing-schedules/{billingScheduleId}/activate": { "put": { "tags": [ "Billing Schedules" ], "summary": "Activate Billing Schedule", "description": "Activate an existing draft [Billing Schedule](/billing/create-billing-schedules).", "operationId": "putBillingSchedulesByBillingScheduleIdActivate", "parameters": [ { "name": "billingScheduleId", "in": "path", "description": "Billing Schedule ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingScheduleResponse", "example": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "BillingScheduleResponse": { "summary": "", "value": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/billing-schedules": { "get": { "tags": [ "Billing Schedules" ], "summary": "List all Billing Schedules", "description": "List all Billing Schedules.", "operationId": "getBillingSchedules", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "customerId", "in": "query", "description": "Filter by customer ID.", "required": false, "schema": { "type": "string" } }, { "name": "billingScheduleStatus", "in": "query", "description": "Filter by status.", "required": false, "schema": { "type": "string" } }, { "name": "autoSendInvoices", "in": "query", "description": "Filter by auto send invoices.", "required": false, "schema": { "type": "string" } }, { "name": "label", "in": "query", "description": "Filter by label.", "required": false, "schema": { "type": "string" } }, { "name": "includeArchivedSchedules", "in": "query", "description": "Include archived schedules.", "required": false, "schema": { "type": "string" } }, { "name": "startingBefore", "in": "query", "description": "Filter by schedule starting before. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "startingAfter", "in": "query", "description": "Filter by schedule starting after. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "endingBefore", "in": "query", "description": "Filter by schedule ending before. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "endingAfter", "in": "query", "description": "Filter by schedule ending after. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "includeOpenEndedSchedules", "in": "query", "description": "Include open-ended schedules.", "required": false, "schema": { "type": "string" } }, { "name": "recurrenceDayOfMonth", "in": "query", "description": "Filter by recurrence day of month (1-31). Comma-separated for multiple days.", "required": false, "schema": { "type": "string" } }, { "name": "sortBy", "in": "query", "description": "Sort column. Default: creation time. Use customFields. to sort by a custom field value.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListBillingSchedulesResponse", "example": { "items": [ { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListBillingSchedulesResponse": { "summary": "", "value": { "items": [ { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Billing Schedules" ], "summary": "Create Billing Schedule", "description": "Create a new [Billing Schedule](/billing/create-billing-schedules).", "operationId": "postBillingSchedules", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBillingScheduleRequest", "example": { "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "startDate": "2022-01-01", "endDate": "2022-12-31", "recurrenceDayOfMonth": 1, "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "Example reference", "label": "Example label", "paymentProvider": "STRIPE", "isDraft": true, "rollUpBilling": false, "phases": [ { "name": "Trial Period", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 8, "message": "8% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "creditGrants": [ { "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] }, { "priceIds": [], "startDate": "2022-07-01", "endDate": "2022-12-31", "discounts": [], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] } ], "attachmentAssetIds": [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ], "autoCharge": true, "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" } } }, "examples": { "CreateBillingScheduleRequest": { "summary": "", "value": { "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "startDate": "2022-01-01", "endDate": "2022-12-31", "recurrenceDayOfMonth": 1, "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "Example reference", "label": "Example label", "paymentProvider": "STRIPE", "isDraft": true, "rollUpBilling": false, "phases": [ { "name": "Trial Period", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 8, "message": "8% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "creditGrants": [ { "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] }, { "priceIds": [], "startDate": "2022-07-01", "endDate": "2022-12-31", "discounts": [], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] } ], "attachmentAssetIds": [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ], "autoCharge": true, "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" } } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingScheduleResponse", "example": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "BillingScheduleResponse": { "summary": "", "value": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/billing-schedules/validate-taxes": { "post": { "tags": [ "Billing Schedules" ], "summary": "Validate taxes on a billing schedule", "description": "Validate the tax strategy that will apply to the given billing schedule before it's created or updated.", "operationId": "postBillingSchedulesValidateTaxes", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBillingScheduleRequest", "example": { "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "startDate": "2022-01-01", "endDate": "2022-12-31", "recurrenceDayOfMonth": 1, "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "Example reference", "label": "Example label", "paymentProvider": "STRIPE", "isDraft": true, "rollUpBilling": false, "phases": [ { "name": "Trial Period", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 8, "message": "8% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "creditGrants": [ { "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] }, { "priceIds": [], "startDate": "2022-07-01", "endDate": "2022-12-31", "discounts": [], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] } ], "attachmentAssetIds": [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ], "autoCharge": true, "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" } } }, "examples": { "CreateBillingScheduleRequest": { "summary": "", "value": { "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "startDate": "2022-01-01", "endDate": "2022-12-31", "recurrenceDayOfMonth": 1, "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "Example reference", "label": "Example label", "paymentProvider": "STRIPE", "isDraft": true, "rollUpBilling": false, "phases": [ { "name": "Trial Period", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 8, "message": "8% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "creditGrants": [ { "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] }, { "priceIds": [], "startDate": "2022-07-01", "endDate": "2022-12-31", "discounts": [], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] } ], "attachmentAssetIds": [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ], "autoCharge": true, "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" } } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credits/{id}": { "get": { "tags": [ "Credits" ], "summary": "Get a credit grant", "description": "Get a credit grant by ID", "operationId": "getCreditsById", "parameters": [ { "name": "id", "in": "path", "description": "Credit grant ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditGrant", "example": { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "On-boarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "creditNoteId": "73086198-8752-4ec9-a99b-16209a32dc6c", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] } }, "examples": { "CreditGrant": { "summary": "", "value": { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "On-boarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "creditNoteId": "73086198-8752-4ec9-a99b-16209a32dc6c", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Credits" ], "summary": "Delete a credit grant", "description": "Delete a credit grant by ID", "operationId": "deleteCreditsById", "parameters": [ { "name": "id", "in": "path", "description": "Credit grant ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditGrantResponse2", "example": { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "Onboarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] } }, "examples": { "CreditGrantResponse2": { "summary": "", "value": { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "Onboarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credits/{customerId}/balances": { "get": { "tags": [ "Credits" ], "summary": "List Credit Balances for a customer", "description": "List all Credit Balances including their grants and transactions", "operationId": "getCreditsByCustomerIdBalances", "parameters": [ { "name": "customerId", "in": "path", "description": "Customer ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditBalancesReply", "example": { "items": [ { "id": "6587e308-ab0d-4a58-8cc1-1d168490de7b", "type": "CASH", "name": "Credits", "balance": "50", "grants": [ { "id": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "sequenceAccountId": "a507e782-d26b-4d34-92b9-aacd1667e1f0", "customerId": "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb", "type": "CASH", "currency": "GBP", "metricId": "b84f5290-fe95-4c6f-bedc-477700125265", "name": "GBP", "originalAmount": "10", "currentBalance": "1", "expiryDate": "2024-01-02", "costOfCredit": "10", "taxRateId": "b3c37ea3-96bb-44fb-baed-01eb38d3328e", "effectiveDate": "2024-01-01", "createdAt": "2024-01-01T12:00:00Z" } ], "transactions": [ { "id": "c770d296-ef09-459b-b8dd-42c334e00dab", "grantId": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "reason": "because", "invoiceId": "c6864c69-42a3-4966-8c22-1c56d7375a05", "billingRunId": "e95256be-08e7-4585-b3c7-fa9928aacd90", "type": "CREDIT", "amount": "10", "date": "2024-01-01" } ] } ] } }, "examples": { "CreditBalancesReply": { "summary": "", "value": { "items": [ { "id": "6587e308-ab0d-4a58-8cc1-1d168490de7b", "type": "CASH", "name": "Credits", "balance": "50", "grants": [ { "id": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "sequenceAccountId": "a507e782-d26b-4d34-92b9-aacd1667e1f0", "customerId": "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb", "type": "CASH", "currency": "GBP", "metricId": "b84f5290-fe95-4c6f-bedc-477700125265", "name": "GBP", "originalAmount": "10", "currentBalance": "1", "expiryDate": "2024-01-02", "costOfCredit": "10", "taxRateId": "b3c37ea3-96bb-44fb-baed-01eb38d3328e", "effectiveDate": "2024-01-01", "createdAt": "2024-01-01T12:00:00Z" } ], "transactions": [ { "id": "c770d296-ef09-459b-b8dd-42c334e00dab", "grantId": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "reason": "because", "invoiceId": "c6864c69-42a3-4966-8c22-1c56d7375a05", "billingRunId": "e95256be-08e7-4585-b3c7-fa9928aacd90", "type": "CREDIT", "amount": "10", "date": "2024-01-01" } ] } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/billing-schedule-custom-field-keys": { "get": { "tags": [ "Billing Schedules" ], "summary": "List Billing Schedule Custom Field Keys", "description": "List all distinct custom field keys across billing schedules for the current account.", "operationId": "getBillingScheduleCustomFieldKeys", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListBillingScheduleCustomFieldKeysResponse", "example": { "items": [ "department", "region" ] } }, "examples": { "ListBillingScheduleCustomFieldKeysResponse": { "summary": "", "value": { "items": [ "department", "region" ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/billing-schedules/{billingScheduleId}/archive": { "post": { "tags": [ "Billing Schedules" ], "summary": "Archive Billing Schedule", "description": "Archive a [Billing Schedule](/billing/create-billing-schedules).", "operationId": "postBillingSchedulesByBillingScheduleIdArchive", "parameters": [ { "name": "billingScheduleId", "in": "path", "description": "Billing Schedule ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingScheduleResponse", "example": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } }, "examples": { "BillingScheduleResponse": { "summary": "", "value": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/prices": { "get": { "tags": [ "Prices" ], "summary": "List all Prices", "description": "List all Prices", "operationId": "getPrices", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).", "required": false, "schema": { "type": "string" } }, { "name": "currency", "in": "query", "description": "Filter by currency.", "required": false, "schema": { "type": "string" } }, { "name": "name", "in": "query", "description": "Filter by name.", "required": false, "schema": { "type": "string" } }, { "name": "billingFrequency", "in": "query", "description": "Filter by billing frequency.", "required": false, "schema": { "type": "string" } }, { "name": "productId", "in": "query", "description": "Filter by product ID.", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "example": { "items": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "oneOf": [ { "$ref": "#/components/schemas/PriceResponsePaginatedPriceResponseModel" } ] }, "examples": { "PriceResponsePaginatedPriceResponseModel": { "summary": "", "value": { "items": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Prices" ], "summary": "Create a new Price", "description": "Create a new Price", "operationId": "postPrices", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" }, "oneOf": [ { "$ref": "#/components/schemas/OneTimePriceRequest" }, { "$ref": "#/components/schemas/FixedPriceRequest" }, { "$ref": "#/components/schemas/LinearPriceRequest" }, { "$ref": "#/components/schemas/PackagePriceRequest" }, { "$ref": "#/components/schemas/SeatBasedPriceRequest" }, { "$ref": "#/components/schemas/GraduatedPriceRequest" }, { "$ref": "#/components/schemas/VolumePriceRequest" } ] }, "examples": { "GraduatedPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } }, "VolumePriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "SeatBasedPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "PackagePriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "LinearPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "FixedPriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "OneTimePriceRequest": { "summary": "", "value": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" }, "oneOf": [ { "$ref": "#/components/schemas/OneTimePriceResponse" }, { "$ref": "#/components/schemas/FixedPriceResponse" }, { "$ref": "#/components/schemas/LinearPriceResponse" }, { "$ref": "#/components/schemas/PackagePriceResponse" }, { "$ref": "#/components/schemas/SeatBasedPriceResponse" }, { "$ref": "#/components/schemas/GraduatedPriceResponse" }, { "$ref": "#/components/schemas/VolumePriceResponse" } ] }, "examples": { "GraduatedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } }, "VolumePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "SeatBasedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "PackagePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "LinearPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "FixedPriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } }, "OneTimePriceResponse": { "summary": "", "value": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/quotes": { "get": { "tags": [ "Quotes" ], "summary": "List quotes", "description": "List all of your quotes", "operationId": "getQuotes", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "customerId", "in": "query", "description": "Filter by customer id.", "required": false, "schema": { "type": "string" } }, { "name": "includeArchived", "in": "query", "description": "Include archived quotes in results", "required": false, "schema": { "type": "boolean" } }, { "name": "status", "in": "query", "description": "Filter by quote status.", "required": false, "schema": { "type": "string" } }, { "name": "createdBy", "in": "query", "description": "Filter by quote owner. Accepts a comma-separated list of user ids.", "required": false, "schema": { "type": "string" } }, { "name": "title", "in": "query", "description": "Filter by quote title (case-insensitive partial match).", "required": false, "schema": { "type": "string" } }, { "name": "hasActiveApprovalWorkflow", "in": "query", "description": "Filter by whether the quote has an active approval workflow. True returns only quotes with active approvals, false returns only quotes without.", "required": false, "schema": { "type": "boolean" } }, { "name": "sortBy", "in": "query", "description": "Sort quotes by a field. Currently supports `acceptedAt` (signature date). Omit for the default newest-first order.", "required": false, "schema": { "type": "string" } }, { "name": "sortOrder", "in": "query", "description": "Sort direction, `ASC` or `DESC`. Defaults to `DESC`.", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListQuoteEndpointListQuotePaginatedResponseModel", "example": { "items": [ { "id": "678ca125-8bc3-478f-9a96-6ba73605cf1e", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "customerId": "377bf97b-ca1d-4538-be06-4022afa6bde3", "quoteNumber": "Q00001", "title": "My quote", "currency": "GBP", "status": "DRAFT", "dealType": "NEW_BUSINESS", "preliminaryBillingStartDate": "2022-10-01", "expiresAt": "2022-10-01", "publishedAt": "2022-06-28T16:47:00Z", "acceptedAt": "2022-06-28T16:47:00Z", "executedAt": "2022-06-28T16:47:00Z", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "expiryDays": 30, "archivedAt": "2022-06-28T16:47:00Z", "isExpired": true } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListQuoteEndpointListQuotePaginatedResponseModel": { "summary": "", "value": { "items": [ { "id": "678ca125-8bc3-478f-9a96-6ba73605cf1e", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "customerId": "377bf97b-ca1d-4538-be06-4022afa6bde3", "quoteNumber": "Q00001", "title": "My quote", "currency": "GBP", "status": "DRAFT", "dealType": "NEW_BUSINESS", "preliminaryBillingStartDate": "2022-10-01", "expiresAt": "2022-10-01", "publishedAt": "2022-06-28T16:47:00Z", "acceptedAt": "2022-06-28T16:47:00Z", "executedAt": "2022-06-28T16:47:00Z", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "expiryDays": 30, "archivedAt": "2022-06-28T16:47:00Z", "isExpired": true } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/quotes/{id}/download": { "get": { "tags": [ "Quotes" ], "summary": "Download quote PDF", "description": "Download the PDF for the latest published variant of a quote", "operationId": "getQuotesByIdDownload", "parameters": [ { "name": "id", "in": "path", "description": "Quote Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/quotes/{id}/analytics": { "get": { "tags": [ "Quotes" ], "summary": "Get quote analytics", "description": "Retrieve view tracking analytics for a quote", "operationId": "getQuotesByIdAnalytics", "parameters": [ { "name": "id", "in": "path", "description": "Quote ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetQuoteViewTrackingResponse", "example": { "totalViews": 42, "uniqueViewers": [ { "visitorIdentifier": "0190dae7-7228-7619-aad8-c51f56733b2b", "lastViewedAt": "2024-01-07T10:30:00Z", "loginType": "SEQUENCE_USER", "email": "johndoe@example.com" } ], "viewsByDay": [ { "date": "2024-01-07", "totalViews": 15 } ] } }, "examples": { "GetQuoteViewTrackingResponse": { "summary": "", "value": { "totalViews": 42, "uniqueViewers": [ { "visitorIdentifier": "0190dae7-7228-7619-aad8-c51f56733b2b", "lastViewedAt": "2024-01-07T10:30:00Z", "loginType": "SEQUENCE_USER", "email": "johndoe@example.com" } ], "viewsByDay": [ { "date": "2024-01-07", "totalViews": 15 } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}": { "get": { "tags": [ "Invoices" ], "summary": "Get an Invoice by ID", "description": "Get an Invoice by ID", "operationId": "getInvoicesById", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceResponse", "example": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingRunId": "9c5fdd27-1f7a-41e7-ab67-14f65272a853", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "updatedAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "attachmentAssets": [ { "id": "4b36a61e-425e-4640-aa26-6224c577b613", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "DOCUMENT", "format": "PDF", "fileName": "my-document.pdf", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf", "createdAt": "2022-06-28T16:47:00Z" } ], "balance": "1000.00", "balanceVersion": 0, "integrationPaymentStatuses": { "stripe": "IN_PROGRESS", "goCardless": "CANCELLED" }, "appliedCreditNotes": [ { "id": "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b", "creditNoteNumber": "CN00001", "netTotal": "41.67", "totalTax": "8.33", "grossTotal": "50.00", "lineItems": [ { "name": "Adjustment", "netTotal": "41.67", "grossTotal": "50.00", "invoiceLineItemIds": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ] } ] } ], "appliedCreditGrants": [ { "creditGrantId": "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13", "creditGrantName": "Q3 prepaid credit", "amount": "820.00", "taxAmount": "164.00", "status": "APPLIED" } ], "paymentAllocations": [ { "paymentId": "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e", "amount": "50.00", "allocatedAt": "2022-10-30T00:00:00Z", "paidAt": "2022-10-29T00:00:00Z", "origin": "MANUAL" } ], "paymentTermDays": 30, "dueDateSource": "CALCULATED" } }, "examples": { "InvoiceResponse": { "summary": "", "value": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingRunId": "9c5fdd27-1f7a-41e7-ab67-14f65272a853", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "updatedAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "attachmentAssets": [ { "id": "4b36a61e-425e-4640-aa26-6224c577b613", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "DOCUMENT", "format": "PDF", "fileName": "my-document.pdf", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf", "createdAt": "2022-06-28T16:47:00Z" } ], "balance": "1000.00", "balanceVersion": 0, "integrationPaymentStatuses": { "stripe": "IN_PROGRESS", "goCardless": "CANCELLED" }, "appliedCreditNotes": [ { "id": "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b", "creditNoteNumber": "CN00001", "netTotal": "41.67", "totalTax": "8.33", "grossTotal": "50.00", "lineItems": [ { "name": "Adjustment", "netTotal": "41.67", "grossTotal": "50.00", "invoiceLineItemIds": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ] } ] } ], "appliedCreditGrants": [ { "creditGrantId": "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13", "creditGrantName": "Q3 prepaid credit", "amount": "820.00", "taxAmount": "164.00", "status": "APPLIED" } ], "paymentAllocations": [ { "paymentId": "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e", "amount": "50.00", "allocatedAt": "2022-10-30T00:00:00Z", "paidAt": "2022-10-29T00:00:00Z", "origin": "MANUAL" } ], "paymentTermDays": 30, "dueDateSource": "CALCULATED" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Invoices" ], "summary": "Update an invoice", "description": "Update an invoice", "operationId": "putInvoicesById", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240101UpdateInvoiceRequest", "example": { "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "metadata": [ { "key": "example-label", "value": "label-value" } ], "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "billingRunId": "53ff21c8-4872-46c4-83bf-517d54876945", "accountingDate": "2022-09-30", "attachmentAssetIds": [ "99874519-25ce-46ff-8823-093115aa7222" ], "currency": "GBP" } }, "examples": { "Stable20240101UpdateInvoiceRequest": { "summary": "", "value": { "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "metadata": [ { "key": "example-label", "value": "label-value" } ], "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "billingRunId": "53ff21c8-4872-46c4-83bf-517d54876945", "accountingDate": "2022-09-30", "attachmentAssetIds": [ "99874519-25ce-46ff-8823-093115aa7222" ], "currency": "GBP" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceResponse", "example": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingRunId": "9c5fdd27-1f7a-41e7-ab67-14f65272a853", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "updatedAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "attachmentAssets": [ { "id": "4b36a61e-425e-4640-aa26-6224c577b613", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "DOCUMENT", "format": "PDF", "fileName": "my-document.pdf", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf", "createdAt": "2022-06-28T16:47:00Z" } ], "balance": "1000.00", "balanceVersion": 0, "integrationPaymentStatuses": { "stripe": "IN_PROGRESS", "goCardless": "CANCELLED" }, "appliedCreditNotes": [ { "id": "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b", "creditNoteNumber": "CN00001", "netTotal": "41.67", "totalTax": "8.33", "grossTotal": "50.00", "lineItems": [ { "name": "Adjustment", "netTotal": "41.67", "grossTotal": "50.00", "invoiceLineItemIds": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ] } ] } ], "appliedCreditGrants": [ { "creditGrantId": "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13", "creditGrantName": "Q3 prepaid credit", "amount": "820.00", "taxAmount": "164.00", "status": "APPLIED" } ], "paymentAllocations": [ { "paymentId": "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e", "amount": "50.00", "allocatedAt": "2022-10-30T00:00:00Z", "paidAt": "2022-10-29T00:00:00Z", "origin": "MANUAL" } ], "paymentTermDays": 30, "dueDateSource": "CALCULATED" } }, "examples": { "InvoiceResponse": { "summary": "", "value": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingRunId": "9c5fdd27-1f7a-41e7-ab67-14f65272a853", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "updatedAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "attachmentAssets": [ { "id": "4b36a61e-425e-4640-aa26-6224c577b613", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "DOCUMENT", "format": "PDF", "fileName": "my-document.pdf", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf", "createdAt": "2022-06-28T16:47:00Z" } ], "balance": "1000.00", "balanceVersion": 0, "integrationPaymentStatuses": { "stripe": "IN_PROGRESS", "goCardless": "CANCELLED" }, "appliedCreditNotes": [ { "id": "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b", "creditNoteNumber": "CN00001", "netTotal": "41.67", "totalTax": "8.33", "grossTotal": "50.00", "lineItems": [ { "name": "Adjustment", "netTotal": "41.67", "grossTotal": "50.00", "invoiceLineItemIds": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ] } ] } ], "appliedCreditGrants": [ { "creditGrantId": "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13", "creditGrantName": "Q3 prepaid credit", "amount": "820.00", "taxAmount": "164.00", "status": "APPLIED" } ], "paymentAllocations": [ { "paymentId": "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e", "amount": "50.00", "allocatedAt": "2022-10-30T00:00:00Z", "paidAt": "2022-10-29T00:00:00Z", "origin": "MANUAL" } ], "paymentTermDays": 30, "dueDateSource": "CALCULATED" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Invoices" ], "summary": "Delete an Invoice", "description": "Delete an Invoice. NB. You can only delete a draft or in-progress invoice. If you want to correct an invoice you have already finalised, you should void it instead. If you want to correct an invoice you have already sent, you should create a credit note. ", "operationId": "deleteInvoicesById", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteInvoiceEndpointProductDeleteInvoiceResponseModel", "example": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false } }, "examples": { "DeleteInvoiceEndpointProductDeleteInvoiceResponseModel": { "summary": "", "value": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "patch": { "tags": [ "Invoices" ], "summary": "Patch an invoice", "description": "Patch an invoice", "operationId": "patchInvoicesById", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240101PatchInvoiceRequest", "example": { "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "metadata": [ { "key": "example-label", "value": "label-value" } ], "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "billingRunId": "53ff21c8-4872-46c4-83bf-517d54876945", "accountingDate": "2022-09-30", "attachmentAssetIds": [ "99874519-25ce-46ff-8823-093115aa7222" ] } }, "examples": { "Stable20240101PatchInvoiceRequest": { "summary": "", "value": { "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "metadata": [ { "key": "example-label", "value": "label-value" } ], "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "billingRunId": "53ff21c8-4872-46c4-83bf-517d54876945", "accountingDate": "2022-09-30", "attachmentAssetIds": [ "99874519-25ce-46ff-8823-093115aa7222" ] } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice", "example": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-09-30T00:00:00Z" } }, "examples": { "Invoice": { "summary": "", "value": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-09-30T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-note-applications": { "post": { "tags": [ "Credit Notes" ], "summary": "Apply a Credit Note to an Invoice", "description": "Allocates an amount from a Credit Note's balance to an Invoice's balance.", "operationId": "postCreditNoteApplications", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCreditNoteApplicationEndpointCreateCreditNoteApplicationRequestModel", "example": { "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "amount": 50, "currency": "USD", "creditNoteBalanceVersion": 3, "invoiceBalanceVersion": 7 } }, "examples": { "CreateCreditNoteApplicationEndpointCreateCreditNoteApplicationRequestModel": { "summary": "", "value": { "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "amount": 50, "currency": "USD", "creditNoteBalanceVersion": 3, "invoiceBalanceVersion": 7 } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": {} }, "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditNoteApplicationResponse", "example": { "ledgerTransactionId": "0192c1b6-7f3a-7000-8000-000000000001", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "amount": 50, "currency": "USD", "appliedAt": "2026-05-28T12:34:56Z", "invoiceBalance": { "value": 150, "currency": "USD", "version": 8 }, "creditNoteBalance": { "value": 50, "currency": "USD", "version": 4 } } }, "examples": { "CreditNoteApplicationResponse": { "summary": "", "value": { "ledgerTransactionId": "0192c1b6-7f3a-7000-8000-000000000001", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "amount": 50, "currency": "USD", "appliedAt": "2026-05-28T12:34:56Z", "invoiceBalance": { "value": 150, "currency": "USD", "version": 8 }, "creditNoteBalance": { "value": 50, "currency": "USD", "version": 4 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VersionConflictResponse", "example": { "message": "Balance version mismatch. Re-read current versions and retry.", "currentInvoiceBalance": { "value": 150, "currency": "USD", "version": 8 }, "currentCreditNoteBalance": { "value": 50, "currency": "USD", "version": 4 } } }, "examples": { "VersionConflictResponse": { "summary": "", "value": { "message": "Balance version mismatch. Re-read current versions and retry.", "currentInvoiceBalance": { "value": 150, "currency": "USD", "version": 8 }, "currentCreditNoteBalance": { "value": 50, "currency": "USD", "version": 4 } } } } } } }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes/{creditnote}/line-items": { "get": { "tags": [ "Credit Note Line Items" ], "summary": "List all Credit Note Line Items", "description": "List all Credit Note Line Items", "operationId": "getCreditNotesByCreditnoteLineItems", "parameters": [ { "name": "creditnote", "in": "path", "description": "The CreditNote ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).", "required": false, "schema": { "type": "string", "enum": [ "ASC", "DESC" ] } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCreditNoteLineItemEndpointProductListCreditNoteLineItemPaginatedResponseModel", "example": { "items": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListCreditNoteLineItemEndpointProductListCreditNoteLineItemPaginatedResponseModel": { "summary": "", "value": { "items": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Credit Note Line Items" ], "summary": "Create a new Credit Note Line Item", "description": "Create a new Credit Note Line Item", "operationId": "postCreditNotesByCreditnoteLineItems", "parameters": [ { "name": "creditnote", "in": "path", "description": "The CreditNote ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240101CreateCreditNoteLineItemRequestModel", "example": { "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "POINT_IN_TIME", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "invoiceLineItemIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ] } }, "examples": { "Stable20240101CreateCreditNoteLineItemRequestModel": { "summary": "", "value": { "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "POINT_IN_TIME", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "invoiceLineItemIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ] } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240101ProductCreateCreditNoteLineItemResponseModel", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } }, "examples": { "Stable20240101ProductCreateCreditNoteLineItemResponseModel": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}/void": { "post": { "tags": [ "Invoices" ], "summary": "Void an Invoice", "description": "Void a DRAFT, FINAL, or SENT invoice. SENT invoices can only be voided if they are UNPAID or UNCOLLECTIBLE", "operationId": "postInvoicesByIdVoid", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice", "example": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } }, "examples": { "Invoice": { "summary": "", "value": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/render-settings": { "get": { "tags": [ "Invoice Settings" ], "summary": "Get or create Invoice Render Settings", "description": "Returns invoice render settings or creates new settings if they do not exist", "operationId": "getInvoicesRenderSettings", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetOrCreateInvoiceRenderSettingsEndpointProductCreateInvoiceRenderSettingsResponseModel", "example": { "id": "385f41ab-51f9-49c2-8f25-358545106b88", "paymentLinkDisplay": "SHOW_PAYMENT_LINK", "currencyConversionDisplay": "SHOW_CURRENCY_CONVERSION" } }, "examples": { "GetOrCreateInvoiceRenderSettingsEndpointProductCreateInvoiceRenderSettingsResponseModel": { "summary": "", "value": { "id": "385f41ab-51f9-49c2-8f25-358545106b88", "paymentLinkDisplay": "SHOW_PAYMENT_LINK", "currencyConversionDisplay": "SHOW_CURRENCY_CONVERSION" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes/{id}/download": { "get": { "tags": [ "Credit Notes" ], "summary": "Download credit note PDF", "description": "Download credit note PDF", "operationId": "getCreditNotesByIdDownload", "parameters": [ { "name": "id", "in": "path", "description": "Credit Note Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes/{id}": { "get": { "tags": [ "Credit Notes" ], "summary": "Get a Credit Note by ID", "description": "Get a Credit Note by ID", "operationId": "getCreditNotesById", "parameters": [ { "name": "id", "in": "path", "description": "Credit Note ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditNote", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "DRAFT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } }, "examples": { "CreditNote": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "DRAFT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "put": { "tags": [ "Credit Notes" ], "summary": "Update a Credit Note", "description": "Update a Credit Note", "operationId": "putCreditNotesById", "parameters": [ { "name": "id", "in": "path", "description": "Credit Note ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCreditNoteEndpointUpdateCreditNoteRequestModel", "example": { "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "purchaseOrderNumber": "PO123", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } }, "examples": { "UpdateCreditNoteEndpointUpdateCreditNoteRequestModel": { "summary": "", "value": { "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "purchaseOrderNumber": "PO123", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditNote", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "SENT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } }, "examples": { "CreditNote": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "SENT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Credit Notes" ], "summary": "Delete a Credit Note", "description": "Delete a Credit Note", "operationId": "deleteCreditNotesById", "parameters": [ { "name": "id", "in": "path", "description": "Credit Note ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditNote", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "DRAFT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } }, "examples": { "CreditNote": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "DRAFT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}/download": { "get": { "tags": [ "Invoices" ], "summary": "Download invoice PDF", "description": "Download invoice PDF", "operationId": "getInvoicesByIdDownload", "parameters": [ { "name": "id", "in": "path", "description": "Invoice Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes": { "get": { "tags": [ "Credit Notes" ], "summary": "List all Credit Notes", "description": "List all Credit Notes for this Sequence account", "operationId": "getCreditNotes", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).", "required": false, "schema": { "type": "string", "enum": [ "ASC", "DESC" ] } }, { "name": "sortBy", "in": "query", "description": "Sort column. Default: creation time. Options: GROSS_TOTAL, CREDIT_NOTE_NUMBER, STATUS", "required": false, "schema": { "type": "string" } }, { "name": "creditNoteStatus", "in": "query", "description": "Filter by credit note status. Options: DRAFT, FINAL, SENT, VOIDED", "required": false, "schema": { "type": "string" } }, { "name": "customerId", "in": "query", "description": "Filter by customer id.", "required": false, "schema": { "type": "string" } }, { "name": "sentBefore", "in": "query", "description": "Filter by sent date before. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "sentAfter", "in": "query", "description": "Filter by sent date after. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "searchCreditNoteNumber", "in": "query", "description": "Search credit notes by credit note number (partial, case-insensitive match)", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCreditNoteEndpointProductListCreditNotePaginatedResponseModel", "example": { "items": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "DRAFT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } } }, "examples": { "ListCreditNoteEndpointProductListCreditNotePaginatedResponseModel": { "summary": "", "value": { "items": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "DRAFT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Credit Notes" ], "summary": "Create a new Credit Note", "description": "Create a new Credit Note", "operationId": "postCreditNotes", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCreditNoteEndpointCreateCreditNoteRequestModel", "example": { "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "currency": "GBP", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "accountingDate": "2025-08-29" } }, "examples": { "CreateCreditNoteEndpointCreateCreditNoteRequestModel": { "summary": "", "value": { "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "currency": "GBP", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "accountingDate": "2025-08-29" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditNote", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "DRAFT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } }, "examples": { "CreditNote": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "DRAFT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}/payment-status": { "put": { "tags": [ "Invoices" ], "summary": "Update payment status for an invoice", "description": "Update payment status for an invoice", "operationId": "putInvoicesByIdPaymentStatus", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoicePaymentStatusEndpointRequestModel", "example": { "paymentStatus": "PAID" } }, "examples": { "UpdateInvoicePaymentStatusEndpointRequestModel": { "summary": "", "value": { "paymentStatus": "PAID" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice", "example": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } }, "examples": { "Invoice": { "summary": "", "value": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}/send": { "post": { "tags": [ "Invoices" ], "summary": "Send invoice", "description": "Updates to SENT status and sends to end-customer", "operationId": "postInvoicesByIdSend", "parameters": [ { "name": "id", "in": "path", "description": "Invoice Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice", "example": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } }, "examples": { "Invoice": { "summary": "", "value": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}/mark-as-sent": { "post": { "tags": [ "Invoices" ], "summary": "Finalize and mark invoice as sent without triggering actions except revenue recognition", "description": "Finalizes an invoice (if not already finalized) and sets its status to SENT. Emails or notifications are not sent. Integration syncs do not happen. Journal entries are created for the invoice.", "operationId": "postInvoicesByIdMarkAsSent", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice", "example": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "SENT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } }, "examples": { "Invoice": { "summary": "", "value": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "SENT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/list-summary": { "get": { "tags": [ "Invoices" ], "summary": "List Invoice summaries", "description": "List invoices with only the fields the summary table renders", "operationId": "getInvoicesListSummary", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "before", "required": false, "schema": { "type": "string" } }, { "name": "after", "in": "query", "description": "after", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "limit", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "name": "sortOrder", "in": "query", "description": "sortOrder", "required": false, "schema": { "type": "string", "enum": [ "ASC", "DESC" ] } }, { "name": "sortBy", "in": "query", "description": "sortBy", "required": false, "schema": { "type": "string" } }, { "name": "invoiceStatus", "in": "query", "description": "invoiceStatus", "required": false, "schema": { "type": "string" } }, { "name": "invoicePaymentStatus", "in": "query", "description": "invoicePaymentStatus", "required": false, "schema": { "type": "string" } }, { "name": "customerId", "in": "query", "description": "customerId", "required": false, "schema": { "type": "string" } }, { "name": "billingScheduleId", "in": "query", "description": "billingScheduleId", "required": false, "schema": { "type": "string" } }, { "name": "dueBefore", "in": "query", "description": "dueBefore", "required": false, "schema": { "type": "string" } }, { "name": "dueAfter", "in": "query", "description": "dueAfter", "required": false, "schema": { "type": "string" } }, { "name": "sentBefore", "in": "query", "description": "sentBefore", "required": false, "schema": { "type": "string" } }, { "name": "sentAfter", "in": "query", "description": "sentAfter", "required": false, "schema": { "type": "string" } }, { "name": "invoiceBefore", "in": "query", "description": "invoiceBefore", "required": false, "schema": { "type": "string" } }, { "name": "invoiceAfter", "in": "query", "description": "invoiceAfter", "required": false, "schema": { "type": "string" } }, { "name": "excludeZeroQuantity", "in": "query", "description": "excludeZeroQuantity", "required": false, "schema": { "type": "boolean" } }, { "name": "invoiceCurrency", "in": "query", "description": "invoiceCurrency", "required": false, "schema": { "type": "string" } }, { "name": "search", "in": "query", "description": "search", "required": false, "schema": { "type": "string" } }, { "name": "invoiceNumber", "in": "query", "description": "invoiceNumber", "required": false, "schema": { "type": "string" } }, { "name": "netTotal", "in": "query", "description": "netTotal", "required": false, "schema": { "type": "number" } }, { "name": "excludeInvoiceStatus", "in": "query", "description": "excludeInvoiceStatus", "required": false, "schema": { "type": "string" } }, { "name": "excludeInvoicePaymentStatus", "in": "query", "description": "excludeInvoicePaymentStatus", "required": false, "schema": { "type": "string" } }, { "name": "excludeCustomerId", "in": "query", "description": "excludeCustomerId", "required": false, "schema": { "type": "string" } }, { "name": "excludeBillingScheduleId", "in": "query", "description": "excludeBillingScheduleId", "required": false, "schema": { "type": "string" } }, { "name": "excludeInvoiceCurrency", "in": "query", "description": "excludeInvoiceCurrency", "required": false, "schema": { "type": "string" } }, { "name": "excludeInvoiceNumber", "in": "query", "description": "excludeInvoiceNumber", "required": false, "schema": { "type": "string" } }, { "name": "excludeNetTotal", "in": "query", "description": "excludeNetTotal", "required": false, "schema": { "type": "number" } }, { "name": "excludeSearch", "in": "query", "description": "excludeSearch", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceListSummaryResponse", "example": { "items": [ { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "invoiceNumber": "INV2", "status": "DRAFT", "paymentStatus": "UNPAID", "currency": "GBP", "grossTotal": "10", "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "customerLegalCompanyName": "Facebook", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "dueDate": "2022-11-05", "dueDateSource": "CALCULATED", "accountingDate": "2022-10-05", "links": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "InvoiceListSummaryResponse": { "summary": "", "value": { "items": [ { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "invoiceNumber": "INV2", "status": "DRAFT", "paymentStatus": "UNPAID", "currency": "GBP", "grossTotal": "10", "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "customerLegalCompanyName": "Facebook", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "dueDate": "2022-11-05", "dueDateSource": "CALCULATED", "accountingDate": "2022-10-05", "links": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/reconcile-with-integration": { "post": { "tags": [ "Invoices" ], "summary": "Reconcile invoices with external integration", "description": "Reconcile invoice properties between our system and integration", "operationId": "postInvoicesReconcileWithIntegration", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReconcileInvoicesWithIntegrationEndpointReconcileInvoicesWithIntegrationRequest", "example": { "integrationService": "Xero", "invoiceIds": [], "propertiesToCompare": [ "INVOICE_NUMBER", "STATUS" ] } }, "examples": { "ReconcileInvoicesWithIntegrationEndpointReconcileInvoicesWithIntegrationRequest": { "summary": "", "value": { "integrationService": "Xero", "invoiceIds": [], "propertiesToCompare": [ "INVOICE_NUMBER", "STATUS" ] } } } } }, "required": true }, "responses": { "202": { "description": "Accepted", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes/{id}/finalize-and-send": { "post": { "tags": [ "Credit Notes" ], "summary": "Finalize and send credit note", "description": "Updates to SENT status, generates credit note PDF and sends to end-customer", "operationId": "postCreditNotesByIdFinalizeAndSend", "parameters": [ { "name": "id", "in": "path", "description": "Credit Note Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditNote", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "SENT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } }, "examples": { "CreditNote": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "SENT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices": { "get": { "tags": [ "Invoices" ], "summary": "List all Invoices", "description": "List all Invoices", "operationId": "getInvoices", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).", "required": false, "schema": { "type": "string", "enum": [ "ASC", "DESC" ] } }, { "name": "sortBy", "in": "query", "description": "Sort column. Default: creation time. Options: CUSTOMER_LEGAL_COMPANY_NAME, GROSS_TOTAL, ACCOUNTING_DATE, DUE_DATE, ISSUE_DATE", "required": false, "schema": { "type": "string" } }, { "name": "invoiceStatus", "in": "query", "description": "Filter by invoice status. Options: IN_PROGRESS, DRAFT, FINAL, SENT, VOIDED", "required": false, "schema": { "type": "string" } }, { "name": "invoicePaymentStatus", "in": "query", "description": "Filter by payment status. Options: UNPAID, PARTIALLY_PAID, PAID, UNCOLLECTIBLE", "required": false, "schema": { "type": "string" } }, { "name": "customerId", "in": "query", "description": "Filter by customer id.", "required": false, "schema": { "type": "string" } }, { "name": "billingScheduleId", "in": "query", "description": "Filter by billing schedule id.", "required": false, "schema": { "type": "string" } }, { "name": "dueBefore", "in": "query", "description": "Filter by due date before. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "dueAfter", "in": "query", "description": "Filter by due date after. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "sentBefore", "in": "query", "description": "Filter by sent date before. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "sentAfter", "in": "query", "description": "Filter by sent date after. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "invoiceBefore", "in": "query", "description": "Filter by invoice date before. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "invoiceAfter", "in": "query", "description": "Filter by invoice date after. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "excludeZeroQuantity", "in": "query", "description": "Exclude invoices with zero quantity.", "required": false, "schema": { "type": "boolean" } }, { "name": "invoiceCurrency", "in": "query", "description": "Get invoices for a specific currency (provide a comma-separated list)", "required": false, "schema": { "type": "string" } }, { "name": "search", "in": "query", "description": "Search invoices by invoice number (partial, case-insensitive match)", "required": false, "schema": { "type": "string" } }, { "name": "invoiceNumber", "in": "query", "description": "Filter by invoice number", "required": false, "schema": { "type": "string" } }, { "name": "netTotal", "in": "query", "description": "Filter by net total amount", "required": false, "schema": { "type": "number" } }, { "name": "excludeInvoiceStatus", "in": "query", "description": "Exclude invoices with these statuses. Options: IN_PROGRESS, DRAFT, FINAL, SENT, VOIDED", "required": false, "schema": { "type": "string" } }, { "name": "excludeInvoicePaymentStatus", "in": "query", "description": "Exclude invoices with these payment statuses. Options: UNPAID, PARTIALLY_PAID, PAID, UNCOLLECTIBLE", "required": false, "schema": { "type": "string" } }, { "name": "excludeCustomerId", "in": "query", "description": "Exclude invoices for these customer ids.", "required": false, "schema": { "type": "string" } }, { "name": "excludeBillingScheduleId", "in": "query", "description": "Exclude invoices for these billing schedule ids.", "required": false, "schema": { "type": "string" } }, { "name": "excludeInvoiceCurrency", "in": "query", "description": "Exclude invoices for these currencies (provide a comma-separated list)", "required": false, "schema": { "type": "string" } }, { "name": "excludeInvoiceNumber", "in": "query", "description": "Exclude invoices with these invoice numbers", "required": false, "schema": { "type": "string" } }, { "name": "excludeNetTotal", "in": "query", "description": "Exclude invoices with this exact net total amount", "required": false, "schema": { "type": "number" } }, { "name": "excludeSearch", "in": "query", "description": "Exclude invoices whose invoice number contains this (partial, case-insensitive match)", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListInvoiceEndpointListInvoicePaginatedResponseModel", "example": { "items": [ { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListInvoiceEndpointListInvoicePaginatedResponseModel": { "summary": "", "value": { "items": [ { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Invoices" ], "summary": "Create an invoice", "description": "Create a new invoice", "operationId": "postInvoices", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240101CreateInvoiceRequest", "example": { "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "metadata": [ { "key": "example-label", "value": "label-value" } ], "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "billingRunId": "53ff21c8-4872-46c4-83bf-517d54876945", "accountingDate": "2022-09-30", "attachmentAssetIds": [ "99874519-25ce-46ff-8823-093115aa7222" ] } }, "examples": { "Stable20240101CreateInvoiceRequest": { "summary": "", "value": { "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "metadata": [ { "key": "example-label", "value": "label-value" } ], "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "billingRunId": "53ff21c8-4872-46c4-83bf-517d54876945", "accountingDate": "2022-09-30", "attachmentAssetIds": [ "99874519-25ce-46ff-8823-093115aa7222" ] } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceResponse", "example": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingRunId": "9c5fdd27-1f7a-41e7-ab67-14f65272a853", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "updatedAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "attachmentAssets": [ { "id": "4b36a61e-425e-4640-aa26-6224c577b613", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "DOCUMENT", "format": "PDF", "fileName": "my-document.pdf", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf", "createdAt": "2022-06-28T16:47:00Z" } ], "balance": "1000.00", "balanceVersion": 0, "integrationPaymentStatuses": { "stripe": "IN_PROGRESS", "goCardless": "CANCELLED" }, "appliedCreditNotes": [ { "id": "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b", "creditNoteNumber": "CN00001", "netTotal": "41.67", "totalTax": "8.33", "grossTotal": "50.00", "lineItems": [ { "name": "Adjustment", "netTotal": "41.67", "grossTotal": "50.00", "invoiceLineItemIds": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ] } ] } ], "appliedCreditGrants": [ { "creditGrantId": "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13", "creditGrantName": "Q3 prepaid credit", "amount": "820.00", "taxAmount": "164.00", "status": "APPLIED" } ], "paymentAllocations": [ { "paymentId": "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e", "amount": "50.00", "allocatedAt": "2022-10-30T00:00:00Z", "paidAt": "2022-10-29T00:00:00Z", "origin": "MANUAL" } ], "paymentTermDays": 30, "dueDateSource": "CALCULATED" } }, "examples": { "InvoiceResponse": { "summary": "", "value": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingRunId": "9c5fdd27-1f7a-41e7-ab67-14f65272a853", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "updatedAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "attachmentAssets": [ { "id": "4b36a61e-425e-4640-aa26-6224c577b613", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "DOCUMENT", "format": "PDF", "fileName": "my-document.pdf", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf", "createdAt": "2022-06-28T16:47:00Z" } ], "balance": "1000.00", "balanceVersion": 0, "integrationPaymentStatuses": { "stripe": "IN_PROGRESS", "goCardless": "CANCELLED" }, "appliedCreditNotes": [ { "id": "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b", "creditNoteNumber": "CN00001", "netTotal": "41.67", "totalTax": "8.33", "grossTotal": "50.00", "lineItems": [ { "name": "Adjustment", "netTotal": "41.67", "grossTotal": "50.00", "invoiceLineItemIds": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ] } ] } ], "appliedCreditGrants": [ { "creditGrantId": "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13", "creditGrantName": "Q3 prepaid credit", "amount": "820.00", "taxAmount": "164.00", "status": "APPLIED" } ], "paymentAllocations": [ { "paymentId": "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e", "amount": "50.00", "allocatedAt": "2022-10-30T00:00:00Z", "paidAt": "2022-10-29T00:00:00Z", "origin": "MANUAL" } ], "paymentTermDays": 30, "dueDateSource": "CALCULATED" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes/{id}/void": { "post": { "tags": [ "Credit Notes" ], "summary": "Void a Credit Note", "description": "Void a Credit Note", "operationId": "postCreditNotesByIdVoid", "parameters": [ { "name": "id", "in": "path", "description": "Credit Note ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditNote", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "SENT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } }, "examples": { "CreditNote": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "SENT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes/{creditnote}/line-items/{id}": { "put": { "tags": [ "Credit Note Line Items" ], "summary": "Update a Credit Note Line Item", "description": "Update a Credit Note Line Item", "operationId": "putCreditNotesByCreditnoteLineItemsById", "parameters": [ { "name": "creditnote", "in": "path", "description": "The CreditNote ID", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "Credit Note Line Item ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCreditNoteLineItemEndpointUpdateCreditNoteLineItemRequestModel", "example": { "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } }, "examples": { "UpdateCreditNoteLineItemEndpointUpdateCreditNoteLineItemRequestModel": { "summary": "", "value": { "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCreditNoteLineItemEndpointProductUpdateCreditNoteLineItemResponseModel", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } }, "examples": { "UpdateCreditNoteLineItemEndpointProductUpdateCreditNoteLineItemResponseModel": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Credit Note Line Items" ], "summary": "Delete a Credit Note Line Item", "description": "Delete a Credit Note Line Item", "operationId": "deleteCreditNotesByCreditnoteLineItemsById", "parameters": [ { "name": "creditnote", "in": "path", "description": "The CreditNote ID", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "Credit Note Line Item ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteCreditNoteLineItemEndpointProductDeleteCreditNoteLineItemResponseModel", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ] } }, "examples": { "DeleteCreditNoteLineItemEndpointProductDeleteCreditNoteLineItemResponseModel": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}/send-payment-reminder": { "post": { "tags": [ "Invoices" ], "summary": "Send a payment reminder for an invoice", "description": "Send a payment reminder to the billing contacts for an invoice", "operationId": "postInvoicesByIdSendPaymentReminder", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice", "example": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } }, "examples": { "Invoice": { "summary": "", "value": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/render-settings/{id}": { "put": { "tags": [ "Invoice Settings" ], "summary": "Update an Invoice Render Settings", "description": "Update an Invoice Render Settings", "operationId": "putInvoicesRenderSettingsById", "parameters": [ { "name": "id", "in": "path", "description": "Invoice settings ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceRenderSettingsEndpointUpdateInvoiceRenderSettingsRequestModel", "example": { "paymentLinkDisplay": "SHOW_PAYMENT_LINK", "currencyConversionDisplay": "SHOW_CURRENCY_CONVERSION" } }, "examples": { "UpdateInvoiceRenderSettingsEndpointUpdateInvoiceRenderSettingsRequestModel": { "summary": "", "value": { "paymentLinkDisplay": "SHOW_PAYMENT_LINK", "currencyConversionDisplay": "SHOW_CURRENCY_CONVERSION" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceRenderSettingsEndpointProductUpdateInvoiceRenderSettingsResponseModel", "example": { "id": "385f41ab-51f9-49c2-8f25-358545106b88", "paymentLinkDisplay": "SHOW_PAYMENT_LINK", "currencyConversionDisplay": "SHOW_CURRENCY_CONVERSION" } }, "examples": { "UpdateInvoiceRenderSettingsEndpointProductUpdateInvoiceRenderSettingsResponseModel": { "summary": "", "value": { "id": "385f41ab-51f9-49c2-8f25-358545106b88", "paymentLinkDisplay": "SHOW_PAYMENT_LINK", "currencyConversionDisplay": "SHOW_CURRENCY_CONVERSION" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{invoice}/line-item-groups/{id}": { "put": { "tags": [ "Invoice Line Items" ], "summary": "Update a Line Item Group", "description": "Update a Line Item Group", "operationId": "putInvoicesByInvoiceLineItemGroupsById", "parameters": [ { "name": "invoice", "in": "path", "description": "The Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "Line Item Group ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateLineItemGroupRequestModel", "example": { "title": "Users", "description": "Charges for users", "taxCategoryId": "28227c88-6dba-455f-9b30-b9c76957e610", "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "servicePeriod": { "start": "2022-10-20", "endInclusive": "2022-10-24" }, "index": 10 } }, "examples": { "UpdateLineItemGroupRequestModel": { "summary": "", "value": { "title": "Users", "description": "Charges for users", "taxCategoryId": "28227c88-6dba-455f-9b30-b9c76957e610", "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "servicePeriod": { "start": "2022-10-20", "endInclusive": "2022-10-24" }, "index": 10 } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LineItemGroupResponseModel", "example": { "id": "941272d1-f840-4e16-b698-0cd455c81e0e", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Cars", "description": "Charges for cars", "index": 1, "netTotal": "200000", "totalTax": "10", "grossTotal": "22000", "taxCategory": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" } } }, "examples": { "LineItemGroupResponseModel": { "summary": "", "value": { "id": "941272d1-f840-4e16-b698-0cd455c81e0e", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Cars", "description": "Charges for cars", "index": 1, "netTotal": "200000", "totalTax": "10", "grossTotal": "22000", "taxCategory": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Invoice Line Items" ], "summary": "Delete a Line Item Group", "description": "Delete a Line Item Group", "operationId": "deleteInvoicesByInvoiceLineItemGroupsById", "parameters": [ { "name": "invoice", "in": "path", "description": "The Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "Line Item Group ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LineItemGroupResponseModel", "example": { "id": "941272d1-f840-4e16-b698-0cd455c81e0e", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Cars", "description": "Charges for cars", "index": 1, "netTotal": "200000", "totalTax": "10", "grossTotal": "22000", "taxCategory": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" } } }, "examples": { "LineItemGroupResponseModel": { "summary": "", "value": { "id": "941272d1-f840-4e16-b698-0cd455c81e0e", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Cars", "description": "Charges for cars", "index": 1, "netTotal": "200000", "totalTax": "10", "grossTotal": "22000", "taxCategory": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes/{creditnote}/line-item-groups/{id}": { "put": { "tags": [ "Credit Note Line Items" ], "summary": "Update a Credit Note Line Item Group", "description": "Update a Credit Note Line Item Group", "operationId": "putCreditNotesByCreditnoteLineItemGroupsById", "parameters": [ { "name": "creditnote", "in": "path", "description": "The CreditNote ID", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "Credit Note Line Item Group ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCreditNoteLineItemGroupEndpointUpdateCreditNoteLineItemGroupRequestModel", "example": { "title": "Users", "description": "Credit note for users" } }, "examples": { "UpdateCreditNoteLineItemGroupEndpointUpdateCreditNoteLineItemGroupRequestModel": { "summary": "", "value": { "title": "Users", "description": "Credit note for users" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCreditNoteLineItemGroupEndpointProductUpdateCreditNoteLineItemGroupResponseModel", "example": { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" } }, "examples": { "UpdateCreditNoteLineItemGroupEndpointProductUpdateCreditNoteLineItemGroupResponseModel": { "summary": "", "value": { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Credit Note Line Items" ], "summary": "Delete a Credit Note Line Item Group", "description": "Delete a Credit Note Line Item Group", "operationId": "deleteCreditNotesByCreditnoteLineItemGroupsById", "parameters": [ { "name": "creditnote", "in": "path", "description": "The CreditNote ID", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "Credit Note Line Item Group ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteCreditNoteLineItemGroupEndpointProductDeleteCreditNoteLineItemGroupResponseModel", "example": { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" } }, "examples": { "DeleteCreditNoteLineItemGroupEndpointProductDeleteCreditNoteLineItemGroupResponseModel": { "summary": "", "value": { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}/sent": { "patch": { "tags": [ "Invoices" ], "summary": "Patch a sent invoice", "description": "Patch fields on a SENT invoice. Supports updating the purchase order number, customer billing address, memo, reference, and due date. Setting a due date records it as manually chosen and clears the invoice's stored payment terms, so it will not be recomputed from them later. The due date can be moved but not cleared: sending an explicit null for it is rejected.", "operationId": "patchInvoicesByIdSent", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatchSentInvoiceEndpointPatchSentInvoiceRequest", "example": { "purchaseOrderNumber": "PO-12345", "dueDate": "2026-09-29" } }, "examples": { "PatchSentInvoiceEndpointPatchSentInvoiceRequest": { "summary": "", "value": { "purchaseOrderNumber": "PO-12345", "dueDate": "2026-09-29" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice", "example": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-09-30T00:00:00Z" } }, "examples": { "Invoice": { "summary": "", "value": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-09-30T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes/{creditnote}/line-item-groups": { "get": { "tags": [ "Credit Note Line Items" ], "summary": "List all Credit Note Line Item Groups", "description": "List all Credit Note Line Item Groups", "operationId": "getCreditNotesByCreditnoteLineItemGroups", "parameters": [ { "name": "creditnote", "in": "path", "description": "The CreditNote ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).", "required": false, "schema": { "type": "string", "enum": [ "ASC", "DESC" ] } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCreditNoteLineItemGroupEndpointProductListCreditNoteLineItemGroupPaginatedResponseModel", "example": { "items": [ { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListCreditNoteLineItemGroupEndpointProductListCreditNoteLineItemGroupPaginatedResponseModel": { "summary": "", "value": { "items": [ { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Credit Note Line Items" ], "summary": "Create a new Credit Note Line Item Group", "description": "Create a new Credit Note Line Item Group", "operationId": "postCreditNotesByCreditnoteLineItemGroups", "parameters": [ { "name": "creditnote", "in": "path", "description": "The CreditNote ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCreditNoteLineItemGroupEndpointCreateCreditNoteLineItemGroupRequestModel", "example": { "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users" } }, "examples": { "CreateCreditNoteLineItemGroupEndpointCreateCreditNoteLineItemGroupRequestModel": { "summary": "", "value": { "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCreditNoteLineItemGroupEndpointProductCreateCreditNoteLineItemGroupResponseModel", "example": { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" } }, "examples": { "CreateCreditNoteLineItemGroupEndpointProductCreateCreditNoteLineItemGroupResponseModel": { "summary": "", "value": { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{invoice}/line-items/{id}": { "put": { "tags": [ "Invoice Line Items" ], "summary": "Update a line item", "description": "Update a line item on an invoice", "operationId": "putInvoicesByInvoiceLineItemsById", "parameters": [ { "name": "invoice", "in": "path", "description": "The Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "Line Item ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240101CreateOrUpdateLineItem", "example": { "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "revenueRecognitionMethod": "STRAIGHT_LINE" } }, "examples": { "Stable20240101CreateOrUpdateLineItem": { "summary": "", "value": { "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "revenueRecognitionMethod": "STRAIGHT_LINE" } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240101LineItemResponse", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "index": 2, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110", "revenueRecognitionMethod": "USAGE" } }, "examples": { "Stable20240101LineItemResponse": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "index": 2, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110", "revenueRecognitionMethod": "USAGE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Invoice Line Items" ], "summary": "Deletes a Line Item", "description": "Deletes a Line Item", "operationId": "deleteInvoicesByInvoiceLineItemsById", "parameters": [ { "name": "invoice", "in": "path", "description": "The Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "Line Item ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240101LineItemResponse", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "index": 2, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110", "revenueRecognitionMethod": "USAGE" } }, "examples": { "Stable20240101LineItemResponse": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "index": 2, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110", "revenueRecognitionMethod": "USAGE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes/{id}/send": { "post": { "tags": [ "Credit Notes" ], "summary": "Send credit note", "description": "Updates to SENT status and sends to end-customer", "operationId": "postCreditNotesByIdSend", "parameters": [ { "name": "id", "in": "path", "description": "Credit Note Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditNote", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "SENT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } }, "examples": { "CreditNote": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "SENT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{invoice}/line-items": { "get": { "tags": [ "Invoice Line Items" ], "summary": "List all Line Items", "description": "List all Line Items", "operationId": "getInvoicesByInvoiceLineItems", "parameters": [ { "name": "invoice", "in": "path", "description": "The Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).", "required": false, "schema": { "type": "string", "enum": [ "ASC", "DESC" ] } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListLineItemEndpointPaginatedLineItemResponseModel", "example": { "items": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "index": 2, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110", "revenueRecognitionMethod": "USAGE" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListLineItemEndpointPaginatedLineItemResponseModel": { "summary": "", "value": { "items": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "index": 2, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110", "revenueRecognitionMethod": "USAGE" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Invoice Line Items" ], "summary": "Create a new Line Item", "description": "Create a new Line Item", "operationId": "postInvoicesByInvoiceLineItems", "parameters": [ { "name": "invoice", "in": "path", "description": "The Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240101CreateOrUpdateLineItem", "example": { "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "revenueRecognitionMethod": "STRAIGHT_LINE" } }, "examples": { "Stable20240101CreateOrUpdateLineItem": { "summary": "", "value": { "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "revenueRecognitionMethod": "STRAIGHT_LINE" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stable20240101LineItemResponse", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "index": 2, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110", "revenueRecognitionMethod": "USAGE" } }, "examples": { "Stable20240101LineItemResponse": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "index": 2, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110", "revenueRecognitionMethod": "USAGE" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}/finalize": { "post": { "tags": [ "Invoices" ], "summary": "Finalize invoice", "description": "Updates to FINAL status, generates invoice PDF and prevents further editing", "operationId": "postInvoicesByIdFinalize", "parameters": [ { "name": "id", "in": "path", "description": "Invoice Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice", "example": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } }, "examples": { "Invoice": { "summary": "", "value": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}/finalize-and-send": { "post": { "tags": [ "Invoices" ], "summary": "Finalize and send invoice", "description": "Updates to SENT status, generates invoice PDF and sends to end-customer", "operationId": "postInvoicesByIdFinalizeAndSend", "parameters": [ { "name": "id", "in": "path", "description": "Invoice Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice", "example": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } }, "examples": { "Invoice": { "summary": "", "value": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/merge": { "post": { "tags": [ "Invoices" ], "summary": "Merge invoices", "description": "Merge multiple draft invoices into one", "operationId": "postInvoicesMerge", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MergeInvoicesEndpointRequestBody", "example": { "invoiceIds": [ "bd39e664-a4a2-4515-bd7e-6bc91d484498", "6582c475-7e29-4ea4-b8f8-f071032573a0" ] } }, "examples": { "MergeInvoicesEndpointRequestBody": { "summary": "", "value": { "invoiceIds": [ "bd39e664-a4a2-4515-bd7e-6bc91d484498", "6582c475-7e29-4ea4-b8f8-f071032573a0" ] } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice", "example": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-09-30T00:00:00Z" } }, "examples": { "Invoice": { "summary": "", "value": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-09-30T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes/{id}/mark-as-sent": { "post": { "tags": [ "Credit Notes" ], "summary": "Mark credit note as sent without triggering actions except revenue recognition", "description": "Finalizes a credit note (if not already finalized) and sets its status to SENT. Emails or notifications are not sent. Integration syncs do not happen. Journal entries are created for the credit note.", "operationId": "postCreditNotesByIdMarkAsSent", "parameters": [ { "name": "id", "in": "path", "description": "Credit Note Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditNote", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "SENT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } }, "examples": { "CreditNote": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "SENT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}/draft": { "post": { "tags": [ "Invoices" ], "summary": "Convert upcoming invoice to draft", "description": "Updates to DRAFT status and recalculates invoice", "operationId": "postInvoicesByIdDraft", "parameters": [ { "name": "id", "in": "path", "description": "Invoice Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice", "example": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } }, "examples": { "Invoice": { "summary": "", "value": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/summary": { "get": { "tags": [ "Invoices" ], "summary": "Get an invoice summary", "description": "Returns aggregate invoice totals (count and gross total) grouped by currency for the invoices matching the supplied filters. Totals cover the whole matching set, so accurate figures can be retrieved in a single request without paginating.", "operationId": "getInvoicesSummary", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "invoiceStatus", "in": "query", "description": "Filter by invoice status. Options: IN_PROGRESS, DRAFT, FINAL, SENT, VOIDED", "required": false, "schema": { "type": "string" } }, { "name": "invoicePaymentStatus", "in": "query", "description": "Filter by payment status. Options: UNPAID, PARTIALLY_PAID, PAID, UNCOLLECTIBLE", "required": false, "schema": { "type": "string" } }, { "name": "customerId", "in": "query", "description": "Filter by customer id.", "required": false, "schema": { "type": "string" } }, { "name": "billingScheduleId", "in": "query", "description": "Filter by billing schedule id.", "required": false, "schema": { "type": "string" } }, { "name": "dueBefore", "in": "query", "description": "Filter by due date before. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "dueAfter", "in": "query", "description": "Filter by due date after. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "sentBefore", "in": "query", "description": "Filter by sent date before. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "sentAfter", "in": "query", "description": "Filter by sent date after. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "invoiceBefore", "in": "query", "description": "Filter by invoice date before. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "invoiceAfter", "in": "query", "description": "Filter by invoice date after. Format: yyyy-MM-dd", "required": false, "schema": { "type": "string" } }, { "name": "excludeZeroQuantity", "in": "query", "description": "Exclude invoices with zero quantity.", "required": false, "schema": { "type": "boolean" } }, { "name": "invoiceCurrency", "in": "query", "description": "Get invoices for a specific currency (provide a comma-separated list)", "required": false, "schema": { "type": "string" } }, { "name": "search", "in": "query", "description": "Search invoices by invoice number (partial, case-insensitive match)", "required": false, "schema": { "type": "string" } }, { "name": "invoiceNumber", "in": "query", "description": "Filter by invoice number", "required": false, "schema": { "type": "string" } }, { "name": "netTotal", "in": "query", "description": "Filter by net total amount", "required": false, "schema": { "type": "number" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceSummaryResponse", "example": { "totalsByCurrency": [ { "currency": "GBP", "invoiceCount": 12, "grossTotal": 15400 }, { "currency": "USD", "invoiceCount": 3, "grossTotal": 980.5 } ] } }, "examples": { "InvoiceSummaryResponse": { "summary": "", "value": { "totalsByCurrency": [ { "currency": "GBP", "invoiceCount": 12, "grossTotal": 15400 }, { "currency": "USD", "invoiceCount": 3, "grossTotal": 980.5 } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{id}/currency-conversions": { "get": { "tags": [ "Invoices" ], "summary": "List Currency Conversions for an Invoice", "description": "Lists all currency conversions for a specific invoice.\nCurrency conversions are automatically created for invoices that require regulatory\ncompliance (e.g., UK VAT requiring GBP conversion for foreign currency invoices).", "operationId": "getInvoicesByIdCurrencyConversions", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceCurrencyConversionsListResponse", "example": { "items": [ { "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d", "invoiceId": "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f", "currency": "GBP", "totalTax": "20.00", "netTotal": "100.00", "grossTotal": "120.00", "exchangeRate": "0.79", "updatedAt": "2024-01-15T10:30:00Z" } ] } }, "examples": { "InvoiceCurrencyConversionsListResponse": { "summary": "", "value": { "items": [ { "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d", "invoiceId": "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f", "currency": "GBP", "totalTax": "20.00", "netTotal": "100.00", "grossTotal": "120.00", "exchangeRate": "0.79", "updatedAt": "2024-01-15T10:30:00Z" } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/{invoice}/line-item-groups": { "get": { "tags": [ "Invoice Line Items" ], "summary": "List all Line Item Groups", "description": "List all Line Item Groups", "operationId": "getInvoicesByInvoiceLineItemGroups", "parameters": [ { "name": "invoice", "in": "path", "description": "The Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).", "required": false, "schema": { "type": "string", "enum": [ "ASC", "DESC" ] } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListLineItemGroupEndpointProductListLineItemGroupPaginatedResponseModel", "example": { "items": [ { "id": "941272d1-f840-4e16-b698-0cd455c81e0e", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Cars", "description": "Charges for cars", "index": 1, "netTotal": "200000", "totalTax": "10", "grossTotal": "22000", "taxCategory": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" } } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ListLineItemGroupEndpointProductListLineItemGroupPaginatedResponseModel": { "summary": "", "value": { "items": [ { "id": "941272d1-f840-4e16-b698-0cd455c81e0e", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Cars", "description": "Charges for cars", "index": 1, "netTotal": "200000", "totalTax": "10", "grossTotal": "22000", "taxCategory": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" } } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Invoice Line Items" ], "summary": "Create a new Line Item Group", "description": "Create a new Line Item Group", "operationId": "postInvoicesByInvoiceLineItemGroups", "parameters": [ { "name": "invoice", "in": "path", "description": "The Invoice ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateLineItemGroupRequestModel", "example": { "title": "Users", "description": "Charges for users", "taxCategoryId": "28227c88-6dba-455f-9b30-b9c76957e610", "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "servicePeriod": { "start": "2022-10-20", "endInclusive": "2022-10-24" } } }, "examples": { "CreateLineItemGroupRequestModel": { "summary": "", "value": { "title": "Users", "description": "Charges for users", "taxCategoryId": "28227c88-6dba-455f-9b30-b9c76957e610", "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "servicePeriod": { "start": "2022-10-20", "endInclusive": "2022-10-24" } } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LineItemGroupResponseModel", "example": { "id": "941272d1-f840-4e16-b698-0cd455c81e0e", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Cars", "description": "Charges for cars", "index": 1, "netTotal": "200000", "totalTax": "10", "grossTotal": "22000", "taxCategory": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" } } }, "examples": { "LineItemGroupResponseModel": { "summary": "", "value": { "id": "941272d1-f840-4e16-b698-0cd455c81e0e", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Cars", "description": "Charges for cars", "index": 1, "netTotal": "200000", "totalTax": "10", "grossTotal": "22000", "taxCategory": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/invoices/fix-billing-runs": { "post": { "tags": [ "Invoices" ], "summary": "Fix invoices billing runs", "description": "Fix invoices with missing billing runs", "operationId": "postInvoicesFixBillingRuns", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "202": { "description": "Accepted", "content": {} }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/credit-notes/{id}/finalize": { "post": { "tags": [ "Credit Notes" ], "summary": "Finalize credit note", "description": "Updates to FINAL status, generates credit note PDF and prevents further editing", "operationId": "postCreditNotesByIdFinalize", "parameters": [ { "name": "id", "in": "path", "description": "Credit Note Id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditNote", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "FINAL", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } }, "examples": { "CreditNote": { "summary": "", "value": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "FINAL", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/activity-logs": { "get": { "tags": [ "Activities" ], "summary": "List all Activity Logs", "description": "List all Activity Logs", "operationId": "getActivityLogs", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "after", "in": "query", "description": "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer" } }, { "name": "sortOrder", "in": "query", "description": "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).", "required": false, "schema": { "type": "string" } }, { "name": "activityLogObjectId", "in": "query", "description": "Filter by activity log object ID", "required": false, "schema": { "type": "string" } }, { "name": "activityLogObjectEntityId", "in": "query", "description": "Filter by activity log object entity ID", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActivityLogListResponse", "example": { "items": [ { "id": "aa0e8400-e29b-41d4-a716-446655440005", "sequenceAccountId": "bb0e8400-e29b-41d4-a716-446655440006", "activityType": "NOTIFICATION", "apiVersion": "V1", "origin": "API", "traceId": "f26ad30d3be41b2f64fa7dbfb22ba5fd", "createdAt": "2024-01-01T10:00:00Z", "activityLogItems": [ { "id": "880e8400-e29b-41d4-a716-446655440003", "activityLogId": "990e8400-e29b-41d4-a716-446655440004", "verb": "CREATED", "name": "Invoice Created", "summary": "A new invoice was created for customer", "reason": "New billing cycle started", "metadata": [], "activityLogActor": { "id": "550e8400-e29b-41d4-a716-446655440000", "entityType": "USER", "entityId": "550e8400-e29b-41d4-a716-446655440123", "email": "john.doe@sequencehq.com" }, "activityLogObject": { "id": "660e8400-e29b-41d4-a716-446655440001", "entityType": "INVOICE", "entityId": "550e8400-e29b-41d4-a716-446655440456" }, "activityLogTarget": { "id": "770e8400-e29b-41d4-a716-446655440002", "entityType": "SEQUENCE_USER", "entityId": "550e8400-e29b-41d4-a716-446655440789" } } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } }, "examples": { "ActivityLogListResponse": { "summary": "", "value": { "items": [ { "id": "aa0e8400-e29b-41d4-a716-446655440005", "sequenceAccountId": "bb0e8400-e29b-41d4-a716-446655440006", "activityType": "NOTIFICATION", "apiVersion": "V1", "origin": "API", "traceId": "f26ad30d3be41b2f64fa7dbfb22ba5fd", "createdAt": "2024-01-01T10:00:00Z", "activityLogItems": [ { "id": "880e8400-e29b-41d4-a716-446655440003", "activityLogId": "990e8400-e29b-41d4-a716-446655440004", "verb": "CREATED", "name": "Invoice Created", "summary": "A new invoice was created for customer", "reason": "New billing cycle started", "metadata": [], "activityLogActor": { "id": "550e8400-e29b-41d4-a716-446655440000", "entityType": "USER", "entityId": "550e8400-e29b-41d4-a716-446655440123", "email": "john.doe@sequencehq.com" }, "activityLogObject": { "id": "660e8400-e29b-41d4-a716-446655440001", "entityType": "INVOICE", "entityId": "550e8400-e29b-41d4-a716-446655440456" }, "activityLogTarget": { "id": "770e8400-e29b-41d4-a716-446655440002", "entityType": "SEQUENCE_USER", "entityId": "550e8400-e29b-41d4-a716-446655440789" } } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/activity-logs/{id}": { "get": { "tags": [ "Activities" ], "summary": "Get an Activity Log by ID", "description": "Get an Activity Log by ID", "operationId": "getActivityLogsById", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActivityLogResponse", "example": { "id": "aa0e8400-e29b-41d4-a716-446655440005", "sequenceAccountId": "bb0e8400-e29b-41d4-a716-446655440006", "activityType": "NOTIFICATION", "apiVersion": "V1", "origin": "API", "traceId": "f26ad30d3be41b2f64fa7dbfb22ba5fd", "createdAt": "2024-01-01T10:00:00Z", "activityLogItems": [ { "id": "880e8400-e29b-41d4-a716-446655440003", "activityLogId": "990e8400-e29b-41d4-a716-446655440004", "verb": "CREATED", "name": "Invoice Created", "summary": "A new invoice was created for customer", "reason": "New billing cycle started", "metadata": [], "activityLogActor": { "id": "550e8400-e29b-41d4-a716-446655440000", "entityType": "USER", "entityId": "550e8400-e29b-41d4-a716-446655440123", "email": "john.doe@sequencehq.com" }, "activityLogObject": { "id": "660e8400-e29b-41d4-a716-446655440001", "entityType": "INVOICE", "entityId": "550e8400-e29b-41d4-a716-446655440456" }, "activityLogTarget": { "id": "770e8400-e29b-41d4-a716-446655440002", "entityType": "SEQUENCE_USER", "entityId": "550e8400-e29b-41d4-a716-446655440789" } } ] } }, "examples": { "ActivityLogResponse": { "summary": "", "value": { "id": "aa0e8400-e29b-41d4-a716-446655440005", "sequenceAccountId": "bb0e8400-e29b-41d4-a716-446655440006", "activityType": "NOTIFICATION", "apiVersion": "V1", "origin": "API", "traceId": "f26ad30d3be41b2f64fa7dbfb22ba5fd", "createdAt": "2024-01-01T10:00:00Z", "activityLogItems": [ { "id": "880e8400-e29b-41d4-a716-446655440003", "activityLogId": "990e8400-e29b-41d4-a716-446655440004", "verb": "CREATED", "name": "Invoice Created", "summary": "A new invoice was created for customer", "reason": "New billing cycle started", "metadata": [], "activityLogActor": { "id": "550e8400-e29b-41d4-a716-446655440000", "entityType": "USER", "entityId": "550e8400-e29b-41d4-a716-446655440123", "email": "john.doe@sequencehq.com" }, "activityLogObject": { "id": "660e8400-e29b-41d4-a716-446655440001", "entityType": "INVOICE", "entityId": "550e8400-e29b-41d4-a716-446655440456" }, "activityLogTarget": { "id": "770e8400-e29b-41d4-a716-446655440002", "entityType": "SEQUENCE_USER", "entityId": "550e8400-e29b-41d4-a716-446655440789" } } ] } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/notifications/policies/{id}/notification-types/{type}": { "delete": { "tags": [ "Notification Policies" ], "summary": "Remove a notification type from a policy", "description": "Remove a notification type from an existing Notification Policy.", "operationId": "deleteNotificationsPoliciesByIdNotificationTypesByType", "parameters": [ { "name": "id", "in": "path", "description": "Notification policy ID", "required": true, "schema": { "type": "string" } }, { "name": "type", "in": "path", "description": "The notification type to remove from this policy", "required": true, "schema": { "type": "string", "enum": [ "CUSTOMER_CREATED", "CUSTOMER_UPDATED", "CUSTOMER_ARCHIVED", "INVOICE_CREATED", "INVOICE_ISSUED", "INVOICE_UPDATED", "INTEGRATION_SYNC_COMPLETED", "INTEGRATION_WEBHOOK_HANDLED", "MERCHANT_UPDATED", "BILLING_SCHEDULE_CREATED", "BILLING_SCHEDULE_UPDATED", "BILLING_SCHEDULE_ARCHIVED", "CREDIT_NOTE_CREATED", "CREDIT_NOTE_UPDATED", "CREDIT_NOTE_ISSUED", "QUOTE_PUBLISHED", "QUOTE_ACCEPTED", "QUOTE_SIGNED", "INVOICE_REMINDER_SENT", "WATCHTOWER_TASK_ASSIGNED" ] } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPolicy", "example": { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com" ], "channel": "EMAIL" } }, "examples": { "NotificationPolicy": { "summary": "", "value": { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com" ], "channel": "EMAIL" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseErrors", "example": { "errors": [] } }, "examples": { "DatabaseErrors": { "summary": "", "value": { "errors": [] } } } } } }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/notifications/policies/{id}": { "get": { "tags": [ "Notification Policies" ], "summary": "Get notification policy", "description": "Retrieve the details of a Notification Policy.", "operationId": "getNotificationsPoliciesById", "parameters": [ { "name": "id", "in": "path", "description": "Notification policy ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPolicy", "example": { "id": "75da306e-8e25-47ac-8079-b695c369e2ef", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Dev team integration webhooks", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "https://api.company.com/webhooks" ], "channel": "WEBHOOK", "webhookSecret": "whsec_AutoGeneratedSecret01234567890ab" } }, "examples": { "NotificationPolicy": { "summary": "", "value": { "id": "75da306e-8e25-47ac-8079-b695c369e2ef", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Dev team integration webhooks", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "https://api.company.com/webhooks" ], "channel": "WEBHOOK", "webhookSecret": "whsec_AutoGeneratedSecret01234567890ab" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "delete": { "tags": [ "Notification Policies" ], "summary": "Delete notification policy", "description": "Delete one of your Notification Policies, to stop sending matching notifications to its recipients.", "operationId": "deleteNotificationsPoliciesById", "parameters": [ { "name": "id", "in": "path", "description": "Notification policy ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPolicy", "example": { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com" ], "channel": "EMAIL" } }, "examples": { "NotificationPolicy": { "summary": "", "value": { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com" ], "channel": "EMAIL" } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/notifications/policies/{id}/notification-types": { "post": { "tags": [ "Notification Policies" ], "summary": "Add notification types to a policy", "description": "Add new notification types to an existing Notification Policy.", "operationId": "postNotificationsPoliciesByIdNotificationTypes", "parameters": [ { "name": "id", "in": "path", "description": "Notification policy ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddNotificationTypesToPolicyRequest", "example": { "notificationTypes": [ "CUSTOMER_CREATED" ] } }, "examples": { "AddNotificationTypesToPolicyRequest": { "summary": "", "value": { "notificationTypes": [ "CUSTOMER_CREATED" ] } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPolicy", "example": { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com" ], "channel": "EMAIL" } }, "examples": { "NotificationPolicy": { "summary": "", "value": { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com" ], "channel": "EMAIL" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseErrors", "example": { "errors": [] } }, "examples": { "DatabaseErrors": { "summary": "", "value": { "errors": [] } } } } } }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/notifications/policies": { "get": { "tags": [ "Notification Policies" ], "summary": "List All Notification Policies", "description": "List All Notification Policies", "operationId": "getNotificationsPolicies", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "notificationType", "in": "query", "description": "Filter policies by notification type", "required": false, "schema": { "type": "string", "enum": [ "CUSTOMER_CREATED", "CUSTOMER_UPDATED", "CUSTOMER_ARCHIVED", "INVOICE_CREATED", "INVOICE_ISSUED", "INVOICE_UPDATED", "INTEGRATION_SYNC_COMPLETED", "INTEGRATION_WEBHOOK_HANDLED", "MERCHANT_UPDATED", "BILLING_SCHEDULE_CREATED", "BILLING_SCHEDULE_UPDATED", "BILLING_SCHEDULE_ARCHIVED", "CREDIT_NOTE_CREATED", "CREDIT_NOTE_UPDATED", "CREDIT_NOTE_ISSUED", "QUOTE_PUBLISHED", "QUOTE_ACCEPTED", "QUOTE_SIGNED", "INVOICE_REMINDER_SENT", "WATCHTOWER_TASK_ASSIGNED" ] } }, { "name": "limit", "in": "query", "description": "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "name": "after", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "before", "in": "query", "description": "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.", "required": false, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPolicies", "example": { "items": [ { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com" ], "channel": "EMAIL" } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } } }, "examples": { "NotificationPolicies": { "summary": "", "value": { "items": [ { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com" ], "channel": "EMAIL" } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } } } } } } }, "400": { "description": "Bad Request", "content": {} }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "404": { "description": "Not Found", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "post": { "tags": [ "Notification Policies" ], "summary": "Create Notification policy", "description": "Create a new Notification Policy, which will send matching notifications to the recipients you specify.", "operationId": "postNotificationsPolicies", "parameters": [ { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateNotificationPolicyRequest", "example": { "name": "Dev team integration webhooks", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "https://api.company.com/webhooks" ], "channel": "WEBHOOK", "webhookSecret": "whsec_UserSubmittedSecret1234567890abc" } }, "examples": { "CreateNotificationPolicyRequest": { "summary": "", "value": { "name": "Dev team integration webhooks", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "https://api.company.com/webhooks" ], "channel": "WEBHOOK", "webhookSecret": "whsec_UserSubmittedSecret1234567890abc" } } } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPolicy", "example": { "id": "75da306e-8e25-47ac-8079-b695c369e2ef", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Dev team integration webhooks", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "https://api.company.com/webhooks" ], "channel": "WEBHOOK", "webhookSecret": "whsec_AutoGeneratedSecret01234567890ab" } }, "examples": { "NotificationPolicy": { "summary": "", "value": { "id": "75da306e-8e25-47ac-8079-b695c369e2ef", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Dev team integration webhooks", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "https://api.company.com/webhooks" ], "channel": "WEBHOOK", "webhookSecret": "whsec_AutoGeneratedSecret01234567890ab" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseErrors", "example": { "errors": [] } }, "examples": { "DatabaseErrors": { "summary": "", "value": { "errors": [] } } } } } }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/notifications/policies/{id}/recipients/{recipient}": { "delete": { "tags": [ "Notification Policies" ], "summary": "Remove a recipient from a policy", "description": "Delete a recipient from an existing Notification Policy.", "operationId": "deleteNotificationsPoliciesByIdRecipientsByRecipient", "parameters": [ { "name": "id", "in": "path", "description": "Notification policy ID", "required": true, "schema": { "type": "string" } }, { "name": "recipient", "in": "path", "description": "The webhook URL or email address to remove from the policy", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPolicy", "example": { "id": "75da306e-8e25-47ac-8079-b695c369e2ef", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Dev team integration webhooks", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "https://api.company.com/webhooks" ], "channel": "WEBHOOK", "webhookSecret": "whsec_AutoGeneratedSecret01234567890ab" } }, "examples": { "NotificationPolicy": { "summary": "", "value": { "id": "75da306e-8e25-47ac-8079-b695c369e2ef", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Dev team integration webhooks", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "https://api.company.com/webhooks" ], "channel": "WEBHOOK", "webhookSecret": "whsec_AutoGeneratedSecret01234567890ab" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseErrors", "example": { "errors": [] } }, "examples": { "DatabaseErrors": { "summary": "", "value": { "errors": [] } } } } } }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] }, "/notifications/policies/{id}/recipients": { "post": { "tags": [ "Notification Policies" ], "summary": "Add recipients to a policy", "description": "Add new recipients to an existing Notification Policy.", "operationId": "postNotificationsPoliciesByIdRecipients", "parameters": [ { "name": "id", "in": "path", "description": "Notification policy ID", "required": true, "schema": { "type": "string" } }, { "name": "Authorization", "in": "header", "description": "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.", "required": true, "schema": { "type": "string" } }, { "name": "sequence-version", "in": "header", "description": "Use this header to select an API version", "required": false, "schema": { "type": "string", "enum": [ "2024-07-30" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddRecipientsToPolicyRequest", "example": { "recipients": [ "operations@example.com" ] } }, "examples": { "AddRecipientsToPolicyRequest": { "summary": "", "value": { "recipients": [ "operations@example.com" ] } } } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPolicy", "example": { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com", "operations@example.com" ], "channel": "EMAIL" } }, "examples": { "NotificationPolicy": { "summary": "", "value": { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com", "operations@example.com" ], "channel": "EMAIL" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseErrors", "example": { "errors": [] } }, "examples": { "DatabaseErrors": { "summary": "", "value": { "errors": [] } } } } } }, "401": { "description": "Unauthorized", "content": {} }, "403": { "description": "Forbidden", "content": {} }, "500": { "description": "Internal Server Error", "content": {} } } }, "servers": [], "parameters": [] } }, "components": { "schemas": { "CreateUsageMetricEndpointCreateUsageMetricRequestModel": { "required": [ "aggregationType", "eventType", "metricType", "name" ], "type": "object", "example": { "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ] }, "properties": { "name": { "type": "string", "description": "Human-readable name for this metric, which should be unique", "example": "Total length of sent messages." }, "description": { "type": "string", "description": "Description for this metric", "nullable": true, "example": "Total length of sent messages." }, "metricType": { "description": "Type of metric (simple or grouped)", "$ref": "#/components/schemas/MetricType" }, "eventType": { "type": "string", "description": "The `eventType` of the Usage Event to be aggregated", "example": "message_sent" }, "aggregationType": { "description": "Type of aggregation to perform", "$ref": "#/components/schemas/AggregationType" }, "aggregationProperty": { "type": "string", "description": "Property within the event to aggregate", "nullable": true, "example": "message_length" }, "groupingProperty": { "type": "string", "description": "Property within the event to group results by", "nullable": true, "example": "channel" }, "unit": { "type": "string", "description": "Human-readable unit of the aggregated metric, eg. API calls)", "nullable": true, "example": "bytes" }, "deletedAt": { "type": "string", "description": "Created at", "nullable": true, "example": "2022-06-28T16:47:00Z" }, "propertyFilters": { "type": "object", "description": "propertyFilters", "additionalProperties": { "type": "object" } }, "caseSensitive": { "type": "boolean", "description": "caseSensitive", "nullable": true, "example": true }, "propertiesToNegate": { "type": "array", "description": "propertiesToNegate", "nullable": true, "example": [ "channels" ], "items": { "type": "string" } } } }, "MetricType": { "type": "string", "example": "GROUPED", "enum": [ "SIMPLE", "GROUPED" ] }, "AggregationType": { "type": "string", "example": "COUNT", "enum": [ "COUNT", "UNIQUE", "SUM", "CUSTOM" ] }, "CreateUsageMetricEndpointProductCreateUsageMetricResponseModel": { "required": [ "aggregationType", "eventType", "id", "metricType", "name", "parameters", "propertyFilters", "sequenceAccountId" ], "type": "object", "example": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "f092246c-6b90-4106-bcca-304ccf06bf45" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "ec1479a2-6ba1-421f-a7de-0853a20d17a1" }, "name": { "type": "string", "description": "Human-readable name for this metric, which should be unique", "example": "Total length of sent messages." }, "description": { "type": "string", "description": "Description for this metric", "nullable": true, "example": "Total length of sent messages." }, "metricType": { "description": "Type of metric (simple or grouped)", "$ref": "#/components/schemas/MetricType" }, "eventType": { "type": "string", "description": "The `eventType` of the Usage Event to be aggregated", "example": "message_sent" }, "aggregationType": { "description": "Type of aggregation to perform", "$ref": "#/components/schemas/AggregationType" }, "aggregationProperty": { "type": "string", "description": "Property within the event to aggregate", "nullable": true, "example": "message_length" }, "groupingProperty": { "type": "string", "description": "Property within the event to group results by", "nullable": true, "example": "channel" }, "unit": { "type": "string", "description": "Human-readable unit of the aggregated metric, eg. API calls)", "nullable": true, "example": "bytes" }, "createdAt": { "type": "string", "description": "Created at", "nullable": true, "example": "2022-06-28T16:47:00Z" }, "deletedAt": { "type": "string", "description": "Created at", "nullable": true, "example": "2022-06-28T16:47:00Z" }, "propertyFilters": { "type": "object", "description": "propertyFilters", "additionalProperties": { "type": "object" } }, "caseSensitive": { "type": "boolean", "description": "caseSensitive", "nullable": true, "example": true }, "propertiesToNegate": { "type": "array", "description": "propertiesToNegate", "nullable": true, "example": [ "channels" ], "items": { "type": "string" } }, "parameters": { "type": "array", "description": "Required parameters", "example": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ], "items": { "$ref": "#/components/schemas/CustomMetricParameter" } } } }, "CustomMetricParameter": { "required": [ "defaultValue", "description", "id", "name", "type", "usageMetricId" ], "type": "object", "example": { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" }, "properties": { "id": { "type": "string", "example": "2963e49a-c8e0-4673-89f5-7a805c0faf14" }, "usageMetricId": { "type": "string", "example": "f092246c-6b90-4106-bcca-304ccf06bf45" }, "name": { "type": "string", "example": "myParam" }, "type": { "$ref": "#/components/schemas/CustomParameterType" }, "description": { "type": "string", "example": "My parameter" }, "defaultValue": { "type": "string", "example": "10" } } }, "CustomParameterType": { "type": "string", "example": "INTEGER", "enum": [ "INTEGER", "POSITIVE_INTEGER", "NUMBER", "POSITIVE_NUMBER" ] }, "GetUsageMetricEndpointProductGetUsageMetricResponseModel": { "required": [ "aggregationType", "eventType", "id", "metricType", "name", "parameters", "propertyFilters", "sequenceAccountId" ], "type": "object", "example": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "f092246c-6b90-4106-bcca-304ccf06bf45" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "ec1479a2-6ba1-421f-a7de-0853a20d17a1" }, "name": { "type": "string", "description": "Human-readable name for this metric, which should be unique", "example": "Total length of sent messages." }, "description": { "type": "string", "description": "Description for this metric", "nullable": true, "example": "Total length of sent messages." }, "metricType": { "description": "Type of metric (simple or grouped)", "$ref": "#/components/schemas/MetricType" }, "eventType": { "type": "string", "description": "The `eventType` of the Usage Event to be aggregated", "example": "message_sent" }, "aggregationType": { "description": "Type of aggregation to perform", "$ref": "#/components/schemas/AggregationType" }, "aggregationProperty": { "type": "string", "description": "Property within the event to aggregate", "nullable": true, "example": "message_length" }, "groupingProperty": { "type": "string", "description": "Property within the event to group results by", "nullable": true, "example": "channel" }, "unit": { "type": "string", "description": "Human-readable unit of the aggregated metric, eg. API calls)", "nullable": true, "example": "bytes" }, "createdAt": { "type": "string", "description": "Created at", "nullable": true, "example": "2022-06-28T16:47:00Z" }, "deletedAt": { "type": "string", "description": "Created at", "nullable": true, "example": "2022-06-28T16:47:00Z" }, "propertyFilters": { "type": "object", "description": "propertyFilters", "additionalProperties": { "type": "object" } }, "caseSensitive": { "type": "boolean", "description": "caseSensitive", "nullable": true, "example": true }, "propertiesToNegate": { "type": "array", "description": "propertiesToNegate", "nullable": true, "example": [ "channels" ], "items": { "type": "string" } }, "parameters": { "type": "array", "description": "Required parameters", "example": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ], "items": { "$ref": "#/components/schemas/CustomMetricParameter" } } } }, "UpdateUsageMetricEndpointUpdateUsageMetricRequestModel": { "required": [ "aggregationType", "eventType", "metricType", "name" ], "type": "object", "example": { "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ] }, "properties": { "name": { "type": "string", "description": "Human-readable name for this metric, which should be unique", "example": "Total length of sent messages." }, "description": { "type": "string", "description": "Description for this metric", "nullable": true, "example": "Total length of sent messages." }, "metricType": { "description": "Type of metric (simple or grouped)", "$ref": "#/components/schemas/MetricType" }, "eventType": { "type": "string", "description": "The `eventType` of the Usage Event to be aggregated", "example": "message_sent" }, "aggregationType": { "description": "Type of aggregation to perform", "$ref": "#/components/schemas/AggregationType" }, "aggregationProperty": { "type": "string", "description": "Property within the event to aggregate", "nullable": true, "example": "message_length" }, "groupingProperty": { "type": "string", "description": "Property within the event to group results by", "nullable": true, "example": "channel" }, "unit": { "type": "string", "description": "Human-readable unit of the aggregated metric, eg. API calls)", "nullable": true, "example": "bytes" }, "propertyFilters": { "type": "object", "description": "propertyFilters", "additionalProperties": { "type": "object" } }, "caseSensitive": { "type": "boolean", "description": "caseSensitive", "nullable": true, "example": true }, "propertiesToNegate": { "type": "array", "description": "propertiesToNegate", "nullable": true, "example": [ "channels" ], "items": { "type": "string" } } } }, "UpdateUsageMetricEndpointProductUpdateUsageMetricResponseModel": { "required": [ "aggregationType", "eventType", "id", "metricType", "name", "parameters", "propertyFilters", "sequenceAccountId" ], "type": "object", "example": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "f092246c-6b90-4106-bcca-304ccf06bf45" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "ec1479a2-6ba1-421f-a7de-0853a20d17a1" }, "name": { "type": "string", "description": "Human-readable name for this metric, which should be unique", "example": "Total length of sent messages." }, "description": { "type": "string", "description": "Description for this metric", "nullable": true, "example": "Total length of sent messages." }, "metricType": { "description": "Type of metric (simple or grouped)", "$ref": "#/components/schemas/MetricType" }, "eventType": { "type": "string", "description": "The `eventType` of the Usage Event to be aggregated", "example": "message_sent" }, "aggregationType": { "description": "Type of aggregation to perform", "$ref": "#/components/schemas/AggregationType" }, "aggregationProperty": { "type": "string", "description": "Property within the event to aggregate", "nullable": true, "example": "message_length" }, "groupingProperty": { "type": "string", "description": "Property within the event to group results by", "nullable": true, "example": "channel" }, "unit": { "type": "string", "description": "Human-readable unit of the aggregated metric, eg. API calls)", "nullable": true, "example": "bytes" }, "createdAt": { "type": "string", "description": "Created at", "nullable": true, "example": "2022-06-28T16:47:00Z" }, "deletedAt": { "type": "string", "description": "Created at", "nullable": true, "example": "2022-06-28T16:47:00Z" }, "propertyFilters": { "type": "object", "description": "propertyFilters", "additionalProperties": { "type": "object" } }, "caseSensitive": { "type": "boolean", "description": "caseSensitive", "nullable": true, "example": true }, "propertiesToNegate": { "type": "array", "description": "propertiesToNegate", "nullable": true, "example": [ "channels" ], "items": { "type": "string" } }, "parameters": { "type": "array", "description": "Required parameters", "example": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ], "items": { "$ref": "#/components/schemas/CustomMetricParameter" } } } }, "DeleteUsageMetricEndpointProductDeleteUsageMetricResponseModel": { "required": [ "aggregationType", "eventType", "id", "metricType", "name", "parameters", "propertyFilters", "sequenceAccountId" ], "type": "object", "example": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "f092246c-6b90-4106-bcca-304ccf06bf45" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "ec1479a2-6ba1-421f-a7de-0853a20d17a1" }, "name": { "type": "string", "description": "Human-readable name for this metric, which should be unique", "example": "Total length of sent messages." }, "description": { "type": "string", "description": "Description for this metric", "nullable": true, "example": "Total length of sent messages." }, "metricType": { "description": "Type of metric (simple or grouped)", "$ref": "#/components/schemas/MetricType" }, "eventType": { "type": "string", "description": "The `eventType` of the Usage Event to be aggregated", "example": "message_sent" }, "aggregationType": { "description": "Type of aggregation to perform", "$ref": "#/components/schemas/AggregationType" }, "aggregationProperty": { "type": "string", "description": "Property within the event to aggregate", "nullable": true, "example": "message_length" }, "groupingProperty": { "type": "string", "description": "Property within the event to group results by", "nullable": true, "example": "channel" }, "unit": { "type": "string", "description": "Human-readable unit of the aggregated metric, eg. API calls)", "nullable": true, "example": "bytes" }, "createdAt": { "type": "string", "description": "Created at", "nullable": true, "example": "2022-06-28T16:47:00Z" }, "deletedAt": { "type": "string", "description": "Created at", "nullable": true, "example": "2022-06-28T16:47:00Z" }, "propertyFilters": { "type": "object", "description": "propertyFilters", "additionalProperties": { "type": "object" } }, "caseSensitive": { "type": "boolean", "description": "caseSensitive", "nullable": true, "example": true }, "propertiesToNegate": { "type": "array", "description": "propertiesToNegate", "nullable": true, "example": [ "channels" ], "items": { "type": "string" } }, "parameters": { "type": "array", "description": "Required parameters", "example": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ], "items": { "$ref": "#/components/schemas/CustomMetricParameter" } } } }, "CreateUsageEventEndpointCreateUsageEventRequestModel": { "required": [ "customerAlias", "eventType" ], "type": "object", "example": { "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "eventType": "message-sent", "eventTimestamp": "2022-10-01T00:00:00Z", "eventProperties": { "length": 500, "type": "text_message" } }, "properties": { "customerEventId": { "type": "string", "description": "ID provided by customer. Another event with the same customer event ID will supersede this one.", "nullable": true, "example": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ" }, "customerAlias": { "type": "string", "description": "End-customer alias or ID", "example": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW" }, "eventType": { "type": "string", "description": "Event type. This can be referenced from a usage metric.", "example": "message-sent" }, "eventTimestamp": { "type": "string", "description": "Event timestamp, in ISO 8601 format.", "nullable": true, "example": "2022-10-01T00:00:00Z" }, "eventProperties": { "type": "object", "description": "Event properties. These can be referenced by a usage metric.", "additionalProperties": {} } } }, "CreateUsageEventEndpointProductCreateUsageEventResponseModel": { "required": [ "customerAlias", "customerEventId", "eventProperties", "eventTimestamp", "eventType", "id", "sequenceAccountId" ], "type": "object", "example": { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "eventType": "message-sent", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "eventProperties": { "length": 500, "type": "text_message" } }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "0184421a-8202-70ea-a729-30308a40bbf7" }, "customerEventId": { "type": "string", "description": "ID provided by customer. Another event with the same customer event ID will supersede this one.", "example": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ" }, "customerAlias": { "type": "string", "description": "End-customer alias or ID", "example": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW" }, "eventType": { "type": "string", "description": "Event type. This can be referenced from a usage metric.", "example": "message-sent" }, "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "0184421e-a9cc-711b-af93-bf0511d4d833" }, "eventTimestamp": { "type": "string", "description": "Event timestamp, in ISO 8601 format.", "example": "2022-10-01T00:00:00Z" }, "eventProperties": { "type": "object", "description": "Event properties. These can be referenced by a usage metric.", "additionalProperties": {} } } }, "ListUsageMetricEndpointProductResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Usage metrics", "example": [ { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] } ], "items": { "$ref": "#/components/schemas/UsageMetric" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" } } }, "UsageMetric": { "required": [ "aggregationType", "eventType", "id", "metricType", "name", "parameters", "propertyFilters", "sequenceAccountId" ], "type": "object", "example": { "id": "f092246c-6b90-4106-bcca-304ccf06bf45", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "name": "Total length of sent messages.", "description": "Total length of sent messages.", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "COUNT", "aggregationProperty": "message_length", "groupingProperty": "channel", "unit": "bytes", "createdAt": "2022-06-28T16:47:00Z", "deletedAt": "2022-06-28T16:47:00Z", "propertyFilters": { "channels": [ "text", "email" ] }, "caseSensitive": true, "propertiesToNegate": [ "channels" ], "parameters": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "f092246c-6b90-4106-bcca-304ccf06bf45" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "ec1479a2-6ba1-421f-a7de-0853a20d17a1" }, "name": { "type": "string", "description": "Human-readable name for this metric, which should be unique", "example": "Total length of sent messages." }, "description": { "type": "string", "description": "Description for this metric", "nullable": true, "example": "Total length of sent messages." }, "metricType": { "description": "Type of metric (simple or grouped)", "$ref": "#/components/schemas/MetricType" }, "eventType": { "type": "string", "description": "The `eventType` of the Usage Event to be aggregated", "example": "message_sent" }, "aggregationType": { "description": "Type of aggregation to perform", "$ref": "#/components/schemas/AggregationType" }, "aggregationProperty": { "type": "string", "description": "Property within the event to aggregate", "nullable": true, "example": "message_length" }, "groupingProperty": { "type": "string", "description": "Property within the event to group results by", "nullable": true, "example": "channel" }, "unit": { "type": "string", "description": "Human-readable unit of the aggregated metric, eg. API calls)", "nullable": true, "example": "bytes" }, "createdAt": { "type": "string", "description": "Created at", "nullable": true, "example": "2022-06-28T16:47:00Z" }, "deletedAt": { "type": "string", "description": "Created at", "nullable": true, "example": "2022-06-28T16:47:00Z" }, "propertyFilters": { "type": "object", "additionalProperties": {} }, "caseSensitive": { "type": "boolean", "nullable": true, "example": true }, "propertiesToNegate": { "type": "array", "nullable": true, "example": [ "channels" ], "items": { "type": "string" } }, "parameters": { "type": "array", "description": "Required parameters", "example": [ { "id": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "name": "myParam", "type": "INTEGER", "description": "My parameter", "defaultValue": "10" } ], "items": { "$ref": "#/components/schemas/CustomMetricParameter" } } } }, "PaginationMeta": { "type": "object", "description": "Results pagination", "example": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 }, "properties": { "after": { "type": "string", "description": "Cursor for the page after this (if it exists)", "nullable": true, "example": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3" }, "before": { "type": "string", "description": "Cursor for the page before this (if it exists)", "nullable": true, "example": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz" }, "totalResultSize": { "type": "integer", "description": "Total number of entries across all pages", "format": "int64", "nullable": true, "example": 10 } } }, "ListUsageEventEndpointEndpointResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "eventType": "message-sent", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "eventTimestamp": "2022-10-01T00:00:00Z", "eventProperties": { "length": 500, "type": "text_message" } } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Usage events", "example": [ { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "eventType": "message-sent", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "eventTimestamp": "2022-10-01T00:00:00Z", "eventProperties": { "length": 500, "type": "text_message" } } ], "items": { "$ref": "#/components/schemas/CreateUsageEventEndpointProductCreateUsageEventResponseModel" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" } } }, "UsageMetricCalculationResponse": { "required": [ "aggregationType", "eventCount", "eventType", "metricType", "name", "value" ], "type": "object", "example": { "name": "total_messages_sent", "metricType": "GROUPED", "eventType": "message_sent", "aggregationType": "SUM", "eventCount": 5, "value": 150.035, "unit": "bytes", "minEventId": "0183d0f1-6b5a-74d4-9129-1f4b90191666", "maxEventId": "0183ea03-aca0-7019-b80d-6aacce344e92" }, "properties": { "name": { "type": "string", "example": "total_messages_sent" }, "metricType": { "$ref": "#/components/schemas/MetricType" }, "eventType": { "type": "string", "example": "message_sent" }, "aggregationType": { "$ref": "#/components/schemas/AggregationType" }, "eventCount": { "type": "integer", "example": 5 }, "value": { "type": "number", "example": 150.035 }, "unit": { "type": "string", "nullable": true, "example": "bytes" }, "minEventId": { "type": "string", "nullable": true, "example": "0183d0f1-6b5a-74d4-9129-1f4b90191666" }, "maxEventId": { "type": "string", "nullable": true, "example": "0183ea03-aca0-7019-b80d-6aacce344e92" } } }, "CreateSeatMetricRequest": { "required": [ "label", "seatType" ], "type": "object", "example": { "seatType": "admin", "description": "Allows user to make admin changes over whole account", "label": "Administrator" }, "properties": { "seatType": { "type": "string", "description": "E.g. `admin_user`. An immutable, unique value used to identify and refer to this seat type. It should be lower snakecase", "example": "admin" }, "description": { "type": "string", "description": "Optional description for this seat metric.", "nullable": true, "example": "Allows user to make admin changes over whole account" }, "label": { "type": "string", "description": "Friendly, customer-facing name for this seat metric.", "example": "Administrator" } } }, "SeatMetric": { "required": [ "createdAt", "id", "label", "seatType", "updatedAt" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" }, "properties": { "id": { "type": "string", "description": "Unique ID for this seat metric.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "seatType": { "type": "string", "description": "Immutable, unique value used to identify and refer to this seat type when submitting events.", "example": "admin" }, "createdBy": { "type": "string", "description": "The ID of the Sequence user who created this seat metric.", "nullable": true, "example": "4ffd439e-32e5-4046-bb40-3cb81f40e5da" }, "label": { "type": "string", "description": "Friendly, customer-facing name for this seat metric.", "example": "Administrator" }, "description": { "type": "string", "description": "Optional description for this seat metric.", "nullable": true, "example": "Allows user to make admin changes over whole account" }, "createdAt": { "type": "string", "description": "The time at which this seat metric was created. Formatted as an ISO 8601 timestamp.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "The time at which this seat metric was updated. Formatted as an ISO 8601 timestamp.", "example": "2022-06-28T16:47:00Z" } } }, "GetSeatMetricEndpointProductGetSeatMetricResponseModel": { "required": [ "createdAt", "id", "label", "seatType", "updatedAt" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" }, "properties": { "id": { "type": "string", "description": "Unique ID for this seat metric.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "seatType": { "type": "string", "description": "Immutable, unique value used to identify and refer to this seat type when submitting events.", "example": "admin" }, "createdBy": { "type": "string", "description": "The ID of the Sequence user who created this seat metric.", "nullable": true, "example": "4ffd439e-32e5-4046-bb40-3cb81f40e5da" }, "label": { "type": "string", "description": "Friendly, customer-facing name for this seat metric.", "example": "Administrator" }, "description": { "type": "string", "description": "Optional description for this seat metric.", "nullable": true, "example": "Allows user to make admin changes over whole account" }, "createdAt": { "type": "string", "description": "The time at which this seat metric was created. Formatted as an ISO 8601 timestamp.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "The time at which this seat metric was updated. Formatted as an ISO 8601 timestamp.", "example": "2022-06-28T16:47:00Z" } } }, "UpdateSeatMetricRequest": { "required": [ "label" ], "type": "object", "example": { "description": "Allows user to make admin changes over whole account", "label": "Administrator" }, "properties": { "description": { "type": "string", "description": "Optional description", "nullable": true, "example": "Allows user to make admin changes over whole account" }, "label": { "type": "string", "description": "Friendly, customer-facing name for this seat metric.", "example": "Administrator" } } }, "ListSeatMetricEndpointProductListSeatMetricPaginatedResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "SeatMetrics", "example": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "items": { "$ref": "#/components/schemas/ListSeatMetricEndpointProductListSeatMetricResponseModel" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" } } }, "ListSeatMetricEndpointProductListSeatMetricResponseModel": { "required": [ "createdAt", "id", "label", "seatType", "updatedAt" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "seatType": "admin", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "label": "Administrator", "description": "Allows user to make admin changes over whole account", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" }, "properties": { "id": { "type": "string", "description": "Unique ID for this seat metric.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "seatType": { "type": "string", "description": "Immutable, unique value used to identify and refer to this seat type when submitting events.", "example": "admin" }, "createdBy": { "type": "string", "description": "The ID of the Sequence user who created this seat metric.", "nullable": true, "example": "4ffd439e-32e5-4046-bb40-3cb81f40e5da" }, "label": { "type": "string", "description": "Friendly, customer-facing name for this seat metric.", "example": "Administrator" }, "description": { "type": "string", "description": "Optional description for this seat metric.", "nullable": true, "example": "Allows user to make admin changes over whole account" }, "createdAt": { "type": "string", "description": "The time at which this seat metric was created. Formatted as an ISO 8601 timestamp.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "The time at which this seat metric was updated. Formatted as an ISO 8601 timestamp.", "example": "2022-06-28T16:47:00Z" } } }, "CreateSeatEventEndpointCreateSeatEventRequestModel": { "required": [ "customerAlias", "eventTimestamp", "seatType", "total" ], "type": "object", "example": { "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 }, "properties": { "customerEventId": { "type": "string", "description": "Unique ID provided by customer. Another event with the same customer event ID will supersede this one.", "nullable": true, "example": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ" }, "customerAlias": { "type": "string", "description": "End-customer alias or ID.", "example": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW" }, "seatType": { "type": "string", "description": "Seat type. This can be referenced from a seat metric.", "example": "admin" }, "eventTimestamp": { "type": "string", "description": "Event timestamp, in ISO 8601 format.", "example": "2022-10-01T00:00:00Z" }, "total": { "type": "integer", "description": "Total seats consumed for this seat type.", "example": 1 } } }, "CreateSeatEventEndpointProductCreateSeatEventResponseModel": { "required": [ "customerAlias", "customerEventId", "eventTimestamp", "id", "seatType", "sequenceAccountId", "total" ], "type": "object", "example": { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 }, "properties": { "id": { "type": "string", "description": "Unique ID for this seat event.", "example": "0184421a-8202-70ea-a729-30308a40bbf7" }, "customerEventId": { "type": "string", "description": "Unique ID provided by customer. Another event with the same customer event ID will supersede this one.", "example": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ" }, "customerAlias": { "type": "string", "description": "End-customer alias or ID.", "example": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW" }, "seatType": { "type": "string", "description": "Seat type. This can be referenced from a seat metric.", "example": "admin" }, "sequenceAccountId": { "type": "string", "description": "Unique Sequence account ID.", "example": "0184421e-a9cc-711b-af93-bf0511d4d833" }, "eventTimestamp": { "type": "string", "description": "Event timestamp, in ISO 8601 format.", "example": "2022-10-01T00:00:00Z" }, "total": { "type": "integer", "description": "Total seats consumed for this seat type.", "example": 1 } } }, "ListSeatEventsEndpointEndpointResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Seat events", "example": [ { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 } ], "items": { "$ref": "#/components/schemas/SeatEvent" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" } } }, "SeatEvent": { "required": [ "customerAlias", "customerEventId", "eventTimestamp", "id", "seatType", "sequenceAccountId", "total" ], "type": "object", "example": { "id": "0184421a-8202-70ea-a729-30308a40bbf7", "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ", "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW", "seatType": "admin", "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833", "eventTimestamp": "2022-10-01T00:00:00Z", "total": 1 }, "properties": { "id": { "type": "string", "description": "Unique ID for this seat event.", "example": "0184421a-8202-70ea-a729-30308a40bbf7" }, "customerEventId": { "type": "string", "description": "Unique ID provided by you. Another event with the same customer event ID will supersede this one. This ID usually corresponds to the event ID you use internally.", "example": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ" }, "customerAlias": { "type": "string", "description": "End-customer alias or ID. This is a unique value provided by you and is an identifier to your customer who consumed the seats.", "example": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW" }, "seatType": { "type": "string", "description": "Seat type. This can be referenced from a seat metric.", "example": "admin" }, "sequenceAccountId": { "type": "string", "description": "Unique Sequence account ID.", "example": "0184421e-a9cc-711b-af93-bf0511d4d833" }, "eventTimestamp": { "type": "string", "description": "Event timestamp, in ISO 8601 format.", "example": "2022-10-01T00:00:00Z" }, "total": { "type": "integer", "description": "Total seats consumed for this seat type.", "example": 1 } } }, "ListCustomerSeatBalancesEndpointListCustomerSeatBalancesPaginatedResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "d82010a6-6835-41f8-9dd3-6f858f617f35", "sequenceAccountId": "806460ce-050d-45e4-8d22-b403a523b866", "legalName": "Acme Corp", "customerAliases": [ "acme" ], "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z", "balances": [ { "seatType": "admin", "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Seat balances", "example": [ { "id": "d82010a6-6835-41f8-9dd3-6f858f617f35", "sequenceAccountId": "806460ce-050d-45e4-8d22-b403a523b866", "legalName": "Acme Corp", "customerAliases": [ "acme" ], "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z", "balances": [ { "seatType": "admin", "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z" } ] } ], "items": { "$ref": "#/components/schemas/CustomerSeatBalances" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" } } }, "CustomerSeatBalances": { "required": [ "balances", "changeTimestamp", "customerAliases", "id", "legalName", "sequenceAccountId", "total" ], "type": "object", "example": { "id": "d82010a6-6835-41f8-9dd3-6f858f617f35", "sequenceAccountId": "806460ce-050d-45e4-8d22-b403a523b866", "legalName": "Acme Corp", "customerAliases": [ "acme" ], "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z", "balances": [ { "seatType": "admin", "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z" } ] }, "properties": { "id": { "type": "string", "description": "Customer ID", "example": "d82010a6-6835-41f8-9dd3-6f858f617f35" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "806460ce-050d-45e4-8d22-b403a523b866" }, "legalName": { "type": "string", "description": "Legal name", "example": "Acme Corp" }, "customerAliases": { "type": "array", "example": [ "acme" ], "items": { "type": "string" } }, "total": { "type": "integer", "description": "Total seats balance", "example": 10 }, "changeTimestamp": { "type": "string", "description": "Timestamp of when the customer seats last changed", "example": "2022-06-28T16:47:00Z" }, "balances": { "type": "array", "description": "Seat balance per seat type", "example": [ { "seatType": "admin", "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z" } ], "items": { "$ref": "#/components/schemas/SeatBalance" } } } }, "SeatBalance": { "required": [ "changeTimestamp", "seatType", "total" ], "type": "object", "example": { "seatType": "admin", "total": 10, "changeTimestamp": "2022-06-28T16:47:00Z" }, "properties": { "seatType": { "type": "string", "description": "Seat type", "example": "admin" }, "total": { "type": "integer", "description": "Total seats for this seat type", "example": 10 }, "changeTimestamp": { "type": "string", "description": "Timestamp of change", "example": "2022-06-28T16:47:00Z" } } }, "Stable20240730ProductResponse": { "required": [ "createdAt", "id", "name", "updatedAt" ], "type": "object", "example": { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" }, "properties": { "id": { "type": "string", "description": "Product ID", "example": "994d23f7-47b6-43ee-af6b-cd27181196b6" }, "name": { "type": "string", "description": "Name of the Product, this appears within Sequence's dashboard.", "example": "Fixed priced product" }, "label": { "type": "string", "description": "The internal description of the product. This can be used to maintain some explanation or comments regarding the product.", "example": "Fixed priced product - UK" }, "taxCategoryId": { "type": "string", "description": "The internal ID of the tax category associated with this product.", "example": "3271ca41-d538-404f-a15f-25856a37fb88" }, "createdAt": { "type": "string", "description": "Time at which the Product was first created, in ISO 8601 format (UTC). This is set by the server and cannot be changed. Expect millisecond precision.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time at which the Product was last updated, in ISO 8601 format (UTC). Expect millisecond precision.", "example": "2022-06-28T16:47:00Z" } } }, "ListListPricesEndpointResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "List prices", "example": [ { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] } ], "items": { "$ref": "#/components/schemas/ListPrice" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta1" } } }, "ListPrice": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "structure", "updatedAt" ], "type": "object", "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "productId": { "type": "string", "description": "The related product ID", "example": "f409d651-c475-4142-aafd-a5d2bd74d4f9" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "oneOf": [ { "$ref": "#/components/schemas/GraduatedPricingStructure" }, { "$ref": "#/components/schemas/VolumePricingStructure" }, { "$ref": "#/components/schemas/SeatBasedPricingStructure" }, { "$ref": "#/components/schemas/PackagePricingStructure" }, { "$ref": "#/components/schemas/LinearPricingStructure" }, { "$ref": "#/components/schemas/FixedPricingStructure" }, { "$ref": "#/components/schemas/OneTimePricingStructure" } ] }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "usageCalculationPeriod": { "$ref": "#/components/schemas/UsageCalculationPeriod" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Creation timestamp. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "updatedAt": { "type": "string", "description": "Timestamp when price was last updated. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "Currency": { "type": "string", "example": "GBP", "enum": [ "AED", "ARS", "AUD", "BRL", "BGN", "CAD", "CHF", "CLP", "CNY", "COP", "CZK", "DKK", "EGP", "EUR", "GBP", "HKD", "ILS", "INR", "ISK", "JPY", "KRW", "MXN", "NOK", "NZD", "PLN", "SAR", "SEK", "SGD", "THB", "USD", "UYU", "ZAR" ] }, "GraduatedPricingStructure": { "required": [ "pricingType", "tiers", "usageCalculationMode", "usageMetricId" ], "type": "object", "description": "The pricing structure", "example": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "properties": { "tiers": { "type": "array", "description": "A list of contiguous pricing tiers", "example": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "items": { "$ref": "#/components/schemas/GraduatedUsageTier" } }, "usageMetricId": { "type": "string", "description": "The usage metric associated to this pricing structure", "example": "04c62961-04ba-48e6-b985-758bb7d3e712" }, "usageCalculationMode": { "description": "Indicates the scope of usage calculation", "$ref": "#/components/schemas/UsageCalculationMode" }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/GraduatedPricingType" } } }, "GraduatedUsageTier": { "required": [ "isPricePercentage", "price" ], "type": "object", "example": { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, "properties": { "upperBound": { "type": "string", "description": "The upper bound of usage for this tier. Set to null to if this is a final tier and is unbounded. The lower bound is set by the previous tier or 0 if it's the first one.", "example": "200" }, "price": { "type": "string", "description": "The rate to apply to usage for this product in this tier. In the case of percentage pricing where `isPricePercentage` is set to `true`, a value of 1 represents 100%.", "example": "1.00" }, "fee": { "type": "string", "description": "The nominal fee associated with usage at this tier", "example": "50.00" }, "isPricePercentage": { "type": "boolean", "description": "Indicate whether the price attribute is to be considered as a percentage or an absolute value.", "example": false } } }, "UsageCalculationMode": { "type": "string", "example": "BILLING_PERIOD", "enum": [ "BILLING_PERIOD", "CUMULATIVE", "PERIODIC" ] }, "PricingType": { "type": "string", "example": "GRADUATED", "enum": [ "ONE_TIME", "FIXED", "LINEAR", "PACKAGE", "GRADUATED", "VOLUME", "SEAT_BASED" ] }, "BillingFrequency": { "type": "string", "example": "MONTHLY", "enum": [ "ON_DEMAND", "ONE_TIME", "MONTHLY", "QUARTERLY", "HALF_YEARLY", "YEARLY", "PER_EVENT" ] }, "UsageCalculationPeriod": { "required": [ "frequency", "interval" ], "type": "object", "description": "The period over which usage is aggregated. This value is only taken into consideration and required with graduated pricing structures with a usage calculation mode of 'PERIOD'. It will be ignored for all non-graduated prices.", "example": { "frequency": "QUARTERLY", "interval": 1 }, "properties": { "frequency": { "description": "Frequency determines the time period over which usage is aggregated.", "$ref": "#/components/schemas/UsageCalculationFrequency" }, "interval": { "type": "integer", "description": "Interval determines the time period over which usage is aggregated. For example, if the frequency is MONTHLY and the interval is 3, the usage is aggregated over 3 months before starting at 0 again.", "format": "int32", "example": 1 } } }, "UsageCalculationFrequency": { "type": "string", "example": "QUARTERLY", "enum": [ "MONTHLY", "QUARTERLY", "HALF_YEARLY", "YEARLY" ] }, "BillingType": { "type": "string", "example": "IN_ARREARS", "enum": [ "IN_ARREARS", "IN_ADVANCE" ] }, "IntegrationId": { "required": [ "id", "isPending", "service" ], "type": "object", "example": { "service": "Xero", "id": "123", "isPending": false }, "properties": { "service": { "$ref": "#/components/schemas/IntegrationService" }, "id": { "type": "string", "example": "123" }, "isPending": { "type": "boolean", "example": false } } }, "IntegrationService": { "type": "string", "example": "Xero", "enum": [ "Amazon_Redshift", "GoCardless", "Google_BigQuery", "Google_Sheets", "HubSpot", "NetSuite", "QuickBooks_Online", "Salesforce", "Slack", "Snowflake", "Stripe", "Xero", "Avalara", "Anrok", "Attio", "Numeral", "Rillet", "Sphere" ] }, "PriceParameter": { "required": [ "parameterId", "value" ], "type": "object", "example": { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" }, "properties": { "parameterId": { "type": "string", "description": "Custom metric parameter ID", "example": "2963e49a-c8e0-4673-89f5-7a805c0faf14" }, "value": { "type": "string", "description": "Parameter value", "example": "10" } } }, "PaginationMeta1": { "type": "object", "description": "Results pagination", "example": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 }, "properties": { "after": { "type": "string", "description": "Cursor for the page after this (if it exists)", "example": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3" }, "before": { "type": "string", "description": "Cursor for the page before this (if it exists)", "example": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz" }, "totalResultSize": { "type": "integer", "description": "Total number of entries across all pages", "format": "int64", "example": 10 } } }, "VolumePricingStructure": { "required": [ "pricingType", "tiers", "usageMetricId" ], "type": "object", "description": "The pricing structure", "example": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "properties": { "tiers": { "type": "array", "description": "A list of contiguous pricing tiers", "example": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "items": { "$ref": "#/components/schemas/VolumeUsageTier" } }, "usageMetricId": { "type": "string", "description": "The usage metric associated to this tier", "example": "04c62961-04ba-48e6-b985-758bb7d3e712" }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/VolumePricingType" } } }, "VolumeUsageTier": { "required": [ "isPricePercentage", "price" ], "type": "object", "example": { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, "properties": { "upperBound": { "type": "string", "description": "The upper bound of usage for this tier. Set to null to if this is a final tier and is unbounded. The lower bound is set by the previous tier or 0 if it's the first one.", "example": "100" }, "price": { "type": "string", "description": "The rate to apply to usage for this product in this tier. In the case of percentage pricing where `isPricePercentage` is set to `true`, a value of 1 represents 100%.", "example": "1.00" }, "fee": { "type": "string", "description": "The nominal fee associated with usage at this tier", "example": "50.00" }, "isPricePercentage": { "type": "boolean", "description": "Indicate whether the price attribute is to be considered as a percentage or an absolute value.", "example": true }, "maxPrice": { "type": "string", "description": "Maximum Price to Charge for each Unit if Price is Percentage Based", "example": "10" }, "minPrice": { "type": "string", "description": "Minimum Price to Charge for each Unit if Price is Percentage Based", "example": "5" } } }, "SeatBasedPricingStructure": { "required": [ "contractedMinimumSeats", "pricePerSeat", "pricingType", "prorationStrategy", "seatMetricId", "tiers" ], "type": "object", "description": "The pricing structure", "example": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "properties": { "seatMetricId": { "type": "string", "description": "Seat metric associated to this pricing structure", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "pricePerSeat": { "type": "string", "description": "Price charged per seat per full billing period", "example": "0.25" }, "prorationStrategy": { "description": "The proration strategy to use when calculating the price for a seat. A `USE_MAXIMUM` will not prorate and charge the highest seat balance for the entire billing period, while a PRORATE_INCREMENTS will charge incremental seats from the day they're added", "$ref": "#/components/schemas/SeatProrationStrategy" }, "contractedMinimumSeats": { "type": "integer", "description": "The number of contractually agreed minimum seats", "example": 10 }, "overagesBillingFrequency": { "description": "The frequency with which to charge overages", "$ref": "#/components/schemas/OveragesFrequency" }, "tiers": { "type": "array", "description": "A list of contiguous pricing tiers", "example": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "items": { "$ref": "#/components/schemas/SeatUsageTier" } }, "prorateFlatFees": { "type": "boolean", "description": "If set any flat fees will be pro-rated if the invoice service period length does not match the billing frequency", "example": false }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/SeatBasedPricingType" } } }, "SeatProrationStrategy": { "type": "string", "example": "USE_MAXIMUM", "enum": [ "USE_MAXIMUM", "PRORATE_INCREMENTS", "PRORATE_ALL_CHANGES" ] }, "OveragesFrequency": { "type": "string", "example": "YEARLY", "enum": [ "NONE", "MONTHLY", "QUARTERLY", "HALF_YEARLY", "YEARLY" ] }, "SeatUsageTier": { "required": [ "price" ], "type": "object", "example": { "upperBound": "100", "price": "1.00", "fee": "50.00" }, "properties": { "upperBound": { "type": "string", "description": "The upper bound of usage for this tier. Set to null to if this is a final tier and is unbounded. The lower bound is set by the previous tier or 0 if it's the first one.", "example": "100" }, "price": { "type": "string", "description": "The rate to apply to usage for this product in this tier. In the case of percentage pricing where `isPricePercentage` is set to `true`, a value of 1 represents 100%.", "example": "1.00" }, "fee": { "type": "string", "description": "The nominal fee associated with usage at this tier", "example": "50.00" } } }, "PackagePricingStructure": { "required": [ "packageSize", "pricePerPackage", "pricingType", "usageMetricId" ], "type": "object", "description": "The pricing structure", "example": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "properties": { "packageSize": { "type": "string", "description": "The amount of usage allowed for the price in this structure", "example": "50" }, "pricePerPackage": { "type": "string", "description": "The price charged for each package", "example": "2.00" }, "usageMetricId": { "type": "string", "description": "The usage metric associated to this tier", "example": "04c62961-04ba-48e6-b985-758bb7d3e712" }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/PackagePricingType" } } }, "LinearPricingStructure": { "required": [ "isPricePercentage", "pricePerUnit", "pricingType", "usageMetricId" ], "type": "object", "description": "The pricing structure", "example": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "properties": { "pricePerUnit": { "type": "string", "description": "The per unit rate to apply to usage for this product. In the case of percentage pricing where `isPricePercentage` is set to `true`, a value of 1 represents 100%.", "example": "0.25" }, "usageMetricId": { "type": "string", "description": "Usage metric associated to this pricing structure", "example": "04c62961-04ba-48e6-b985-758bb7d3e712" }, "isPricePercentage": { "type": "boolean", "description": "Indicate whether the price attribute is to be considered as a percentage or an absolute value.", "example": false }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/LinearPricingType" } } }, "FixedPricingStructure": { "required": [ "price", "pricingType" ], "type": "object", "description": "The pricing structure", "example": { "price": "20.00", "pricingType": "FIXED" }, "properties": { "price": { "type": "string", "description": "A fixed amount that is charged once every billing period.", "example": "20.00" }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/FixedPricingType" } } }, "OneTimePricingStructure": { "required": [ "price", "pricingType" ], "type": "object", "description": "The pricing structure", "example": { "price": "150.00", "pricingType": "ONE_TIME" }, "properties": { "price": { "type": "string", "description": "A fixed amount that is charged once.", "example": "150.00" }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/OneTimePricingType" } } }, "Stable20240730ListResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Products", "example": [ { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "items": { "$ref": "#/components/schemas/Stable20240730ProductResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta1" } } }, "GenerateIntegrationIdRequest": { "required": [ "id", "service" ], "type": "object", "example": { "service": "Xero", "id": "123" }, "properties": { "service": { "$ref": "#/components/schemas/IntegrationService" }, "id": { "type": "string", "example": "123" } } }, "GraduatedListPriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "customMetricParameters", "integrationIds", "name", "productId", "structure" ], "type": "object", "title": "GraduatedListPriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 } }, "properties": { "productId": { "type": "string", "description": "The related product ID", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/GraduatedPricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } }, "usageCalculationPeriod": { "$ref": "#/components/schemas/UsageCalculationPeriod" } } }, "VolumeListPriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "customMetricParameters", "integrationIds", "name", "productId", "structure" ], "type": "object", "title": "VolumeListPriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] }, "properties": { "productId": { "type": "string", "description": "The related product ID", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/VolumePricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "SeatBasedListPriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "customMetricParameters", "integrationIds", "name", "productId", "structure" ], "type": "object", "title": "SeatBasedListPriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] }, "properties": { "productId": { "type": "string", "description": "The related product ID", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/SeatBasedPricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "PackageListPriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "customMetricParameters", "integrationIds", "name", "productId", "structure" ], "type": "object", "title": "PackageListPriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] }, "properties": { "productId": { "type": "string", "description": "The related product ID", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/PackagePricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "LinearListPriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "customMetricParameters", "integrationIds", "name", "productId", "structure" ], "type": "object", "title": "LinearListPriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] }, "properties": { "productId": { "type": "string", "description": "The related product ID", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/LinearPricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "FixedListPriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "customMetricParameters", "integrationIds", "name", "productId", "structure" ], "type": "object", "title": "FixedListPriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] }, "properties": { "productId": { "type": "string", "description": "The related product ID", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/FixedPricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "OneTimeListPriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "customMetricParameters", "integrationIds", "name", "productId", "structure" ], "type": "object", "title": "OneTimeListPriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Sample product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ] }, "properties": { "productId": { "type": "string", "description": "The related product ID", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/OneTimePricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "GraduatedListPriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "structure", "updatedAt" ], "type": "object", "title": "GraduatedListPriceResponse", "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "usageCalculationPeriod": { "frequency": "QUARTERLY", "interval": 1 }, "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "productId": { "type": "string", "description": "The related product ID", "example": "f409d651-c475-4142-aafd-a5d2bd74d4f9" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/GraduatedPricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "usageCalculationPeriod": { "$ref": "#/components/schemas/UsageCalculationPeriod" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Creation timestamp. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "updatedAt": { "type": "string", "description": "Timestamp when price was last updated. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "VolumeListPriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "structure", "updatedAt" ], "type": "object", "title": "VolumeListPriceResponse", "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "productId": { "type": "string", "description": "The related product ID", "example": "f409d651-c475-4142-aafd-a5d2bd74d4f9" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/VolumePricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Creation timestamp. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "updatedAt": { "type": "string", "description": "Timestamp when price was last updated. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "SeatBasedListPriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "structure", "updatedAt" ], "type": "object", "title": "SeatBasedListPriceResponse", "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "productId": { "type": "string", "description": "The related product ID", "example": "f409d651-c475-4142-aafd-a5d2bd74d4f9" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/SeatBasedPricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Creation timestamp. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "updatedAt": { "type": "string", "description": "Timestamp when price was last updated. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "PackageListPriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "structure", "updatedAt" ], "type": "object", "title": "PackageListPriceResponse", "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "productId": { "type": "string", "description": "The related product ID", "example": "f409d651-c475-4142-aafd-a5d2bd74d4f9" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/PackagePricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Creation timestamp. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "updatedAt": { "type": "string", "description": "Timestamp when price was last updated. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "LinearListPriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "structure", "updatedAt" ], "type": "object", "title": "LinearListPriceResponse", "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "productId": { "type": "string", "description": "The related product ID", "example": "f409d651-c475-4142-aafd-a5d2bd74d4f9" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/LinearPricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Creation timestamp. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "updatedAt": { "type": "string", "description": "Timestamp when price was last updated. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "FixedListPriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "structure", "updatedAt" ], "type": "object", "title": "FixedListPriceResponse", "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "productId": { "type": "string", "description": "The related product ID", "example": "f409d651-c475-4142-aafd-a5d2bd74d4f9" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/FixedPricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Creation timestamp. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "updatedAt": { "type": "string", "description": "Timestamp when price was last updated. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "OneTimeListPriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "structure", "updatedAt" ], "type": "object", "title": "OneTimeListPriceResponse", "example": { "id": "b4d7e884-e007-4183-8355-4771865c5100", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Sample product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2021-08-25T12:00:00Z", "updatedAt": "2021-08-25T12:00:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ] }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "productId": { "type": "string", "description": "The related product ID", "example": "f409d651-c475-4142-aafd-a5d2bd74d4f9" }, "name": { "type": "string", "description": "The customer-facing name of this list price", "example": "Sample product" }, "currency": { "description": "The pricing currency", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/OneTimePricingStructure" }, "billingFrequency": { "description": "The recurrence of charging this price.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "How to bill this price: in-arrears or in-advance.", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Creation timestamp. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "updatedAt": { "type": "string", "description": "Timestamp when price was last updated. Formatted as an ISO 8601 timestamp.", "example": "2021-08-25T12:00:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this price, and are only required when using a custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter" } } } }, "Stable20240730ProductRequest": { "required": [ "name" ], "type": "object", "example": { "name": "Fixed priced product", "label": "Fixed priced product - UK", "taxCategoryId": "3271ca41-d538-404f-a15f-25856a37fb88" }, "properties": { "name": { "type": "string", "description": "Name of the Product, this appears within Sequence's dashboard.", "example": "Fixed priced product" }, "label": { "type": "string", "description": "The internal description of the product. This can be used to maintain some explanation or comments regarding the product.", "example": "Fixed priced product - UK" }, "taxCategoryId": { "type": "string", "description": "The internal ID of the tax category associated with this product.", "example": "3271ca41-d538-404f-a15f-25856a37fb88" } } }, "Stable20240509ProductResponse": { "required": [ "createdAt", "id", "name", "updatedAt" ], "type": "object", "example": { "id": "994d23f7-47b6-43ee-af6b-cd27181196b6", "name": "Fixed priced product", "label": "Fixed priced product - UK", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" }, "properties": { "id": { "type": "string", "description": "Product ID", "example": "994d23f7-47b6-43ee-af6b-cd27181196b6" }, "name": { "type": "string", "description": "Name of the Product, this appears within Sequence's dashboard.", "example": "Fixed priced product" }, "label": { "type": "string", "description": "The internal description of the product. This can be used to maintain some explanation or comments regarding the product.", "example": "Fixed priced product - UK" }, "createdAt": { "type": "string", "description": "Time at which the Product was first created, in ISO 8601 format (UTC). This is set by the server and cannot be changed. Expect millisecond precision.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time at which the Product was last updated, in ISO 8601 format (UTC). Expect millisecond precision.", "example": "2022-06-28T16:47:00Z" }, "archivedAt": { "type": "string", "description": "Time at which the Product was archived, in ISO 8601 format (UTC). Expect millisecond precision.", "example": "2023-06-28T16:47:00Z" } } }, "OneTimePricingType": { "type": "string", "example": "ONE_TIME", "enum": [ "ONE_TIME" ] }, "FixedPricingType": { "type": "string", "example": "FIXED", "enum": [ "FIXED" ] }, "LinearPricingType": { "type": "string", "example": "LINEAR", "enum": [ "LINEAR" ] }, "PackagePricingType": { "type": "string", "example": "PACKAGE", "enum": [ "PACKAGE" ] }, "GraduatedPricingType": { "type": "string", "example": "GRADUATED", "enum": [ "GRADUATED" ] }, "VolumePricingType": { "type": "string", "example": "VOLUME", "enum": [ "VOLUME" ] }, "SeatBasedPricingType": { "type": "string", "example": "SEAT_BASED", "enum": [ "SEAT_BASED" ] }, "CreateTaxRateRequest": { "required": [ "amount", "country", "invoiceName", "invoiceShortName", "isPublished", "name" ], "type": "object", "example": { "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6" }, "properties": { "isPublished": { "type": "boolean", "description": "Tax Rate status", "example": false }, "name": { "type": "string", "description": "The full name of the tax rate, e.g. \"Sales tax\"", "example": "UK Sales Tax" }, "invoiceName": { "type": "string", "description": "The long name used on the invoice, e.g. \"Value Added Tax\"", "example": "Value Added Tax" }, "invoiceShortName": { "type": "string", "description": "The short name used on the invoice, e.g. \"VAT\"", "example": "VAT" }, "description": { "type": "string", "description": "The description of the tax rate", "nullable": true, "example": "Value Added Tax applied to sales in the UK" }, "amount": { "type": "string", "description": "The tax rate. Must be between 0 and 100.", "example": "0.2" }, "country": { "description": "The country that this tax rate applies to", "$ref": "#/components/schemas/CountryCode" }, "region": { "type": "string", "description": "The region that this tax rate applies to", "nullable": true, "example": "London" }, "taxCategoryId": { "type": "string", "description": "The Tax Category Version ID that this Tax Rate is part of", "nullable": true, "example": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6" } } }, "CountryCode": { "type": "string", "example": "GB", "enum": [ "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "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", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW" ] }, "TaxRateResponse": { "required": [ "amount", "country", "id", "invoiceName", "invoiceShortName", "isArchived", "isPublished", "name", "version", "versionId" ], "type": "object", "example": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" }, "properties": { "id": { "type": "string", "description": "Tax Rate ID", "example": "d58bf2e3-7a5d-4900-8457-2521c6880f7d" }, "versionId": { "type": "string", "description": "Tax Rate Version ID", "example": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f" }, "version": { "type": "integer", "description": "Tax Rate version", "format": "int64", "example": 0 }, "isPublished": { "type": "boolean", "description": "Tax Rate status", "example": false }, "name": { "type": "string", "description": "The full name of the tax rate, e.g. \"Sales tax\"", "example": "UK Sales Tax" }, "invoiceName": { "type": "string", "description": "The long name used on the invoice, e.g. \"Value Added Tax\"", "example": "Value Added Tax" }, "invoiceShortName": { "type": "string", "description": "The short name used on the invoice, e.g. \"VAT\"", "example": "VAT" }, "description": { "type": "string", "description": "The description of the tax rate", "nullable": true, "example": "Value Added Tax applied to sales in the UK" }, "amount": { "type": "string", "description": "The tax rate. Must be between 0 and 100.", "example": "0.2" }, "country": { "description": "The country that this tax rate applies to", "$ref": "#/components/schemas/CountryCode" }, "region": { "type": "string", "description": "The region that this tax rate applies to", "nullable": true, "example": "London" }, "taxCategoryId": { "type": "string", "description": "The Tax Category ID that this Tax Rate is part of", "nullable": true, "example": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6" }, "isArchived": { "type": "boolean", "description": "Whether this tax rate is archived", "example": false }, "updatedAt": { "type": "string", "description": "The last time this tax rate was updated", "nullable": true, "example": "2024-05-09T00:00:00Z" } } }, "UpdateTaxRateRequest": { "required": [ "amount", "country", "id", "invoiceName", "invoiceShortName", "isPublished", "name" ], "type": "object", "example": { "id": "0373904e-0f24-4c19-bb0d-9b855f1ec3ca", "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6" }, "properties": { "id": { "type": "string", "description": "Tax Rate ID", "example": "0373904e-0f24-4c19-bb0d-9b855f1ec3ca" }, "isPublished": { "type": "boolean", "description": "Tax Rate status", "example": false }, "name": { "type": "string", "description": "The full name of the tax rate, e.g. \"Sales tax\"", "example": "UK Sales Tax" }, "invoiceName": { "type": "string", "description": "The long name used on the invoice, e.g. \"Value Added Tax\"", "example": "Value Added Tax" }, "invoiceShortName": { "type": "string", "description": "The short name used on the invoice, e.g. \"VAT\"", "example": "VAT" }, "description": { "type": "string", "description": "The description of the tax rate", "nullable": true, "example": "Value Added Tax applied to sales in the UK" }, "amount": { "type": "string", "description": "The tax rate. Must be between 0 and 100.", "example": "0.2" }, "country": { "description": "The country that this tax rate applies to", "$ref": "#/components/schemas/CountryCode" }, "region": { "type": "string", "description": "The region that this tax rate applies to", "nullable": true, "example": "London" }, "taxCategoryId": { "type": "string", "description": "The Tax Category Version ID that this Tax Rate is part of", "nullable": true, "example": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6" } } }, "ListResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "TaxRates", "example": [ { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "isArchived": false, "updatedAt": "2024-05-09T00:00:00Z" } ], "items": { "$ref": "#/components/schemas/TaxRateResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" } } }, "ArchiveTaxRateEndpointProductArchiveTaxRateResponseModel": { "required": [ "amount", "country", "id", "invoiceName", "invoiceShortName", "isArchived", "isPublished", "name", "sequenceAccountId", "version", "versionId" ], "type": "object", "example": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "versionId": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "version": 0, "isPublished": false, "name": "UK Sales Tax", "invoiceName": "Value Added Tax", "invoiceShortName": "VAT", "description": "Value Added Tax applied to sales in the UK", "amount": "0.2", "country": "GB", "region": "London", "taxCategoryId": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6", "subRates": [], "isArchived": true }, "properties": { "id": { "type": "string", "description": "Tax Rate ID", "example": "d58bf2e3-7a5d-4900-8457-2521c6880f7d" }, "versionId": { "type": "string", "description": "Tax Rate Version ID", "example": "82ef6f1a-afc2-4a8d-b868-6d9c72bf395f" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "dce9ae85-d8d0-42b4-bcad-f221a64363c6" }, "version": { "type": "integer", "description": "Tax Rate version", "format": "int64", "example": 0 }, "isPublished": { "type": "boolean", "description": "Tax Rate status", "example": false }, "name": { "type": "string", "description": "The full name of the tax rate, e.g. \"Sales tax\"", "example": "UK Sales Tax" }, "invoiceName": { "type": "string", "description": "The long name used on the invoice, e.g. \"Value Added Tax\"", "example": "Value Added Tax" }, "invoiceShortName": { "type": "string", "description": "The short name used on the invoice, e.g. \"VAT\"", "example": "VAT" }, "description": { "type": "string", "description": "The description of the tax rate", "nullable": true, "example": "Value Added Tax applied to sales in the UK" }, "amount": { "type": "string", "description": "The tax rate. Must be between 0 and 100. If this tax rate has any sub-rates, then all sub-rates must add up to this amount.", "example": "0.2" }, "country": { "description": "The country that this tax rate applies to", "$ref": "#/components/schemas/CountryCode" }, "region": { "type": "string", "description": "The region that this tax rate applies to", "nullable": true, "example": "London" }, "taxCategoryId": { "type": "string", "description": "The Tax Category Version ID that this Tax Rate is part of", "nullable": true, "example": "ce109c64-dcc0-487a-ac8c-e3237c60cdb6" }, "subRates": { "type": "array", "description": "The sub rates of this tax rate", "nullable": true, "example": [], "items": {} }, "isArchived": { "type": "boolean", "description": "Archived", "example": true } } }, "CreateTaxRegistrationEndpointCreateTaxRegistrationRequestModel": { "required": [ "country", "taxIdentifier" ], "type": "object", "example": { "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" }, "properties": { "taxIdentifier": { "type": "string", "description": "The unique identifier for this tax registration", "example": "GB123456789" }, "customerId": { "type": "string", "description": "The customer that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "merchantId": { "type": "string", "description": "The merchant that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "country": { "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))", "$ref": "#/components/schemas/CountryCode" }, "state": { "description": "The registration state", "nullable": true, "$ref": "#/components/schemas/State" } } }, "State": { "type": "string", "example": "CA", "enum": [ "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", "AB", "BC", "MB", "NB", "NL", "NS", "NT", "NU", "ON", "PE", "QC", "SK", "YT" ] }, "CreateTaxRegistrationEndpointProductCreateTaxRegistrationResponseModel": { "required": [ "country", "id", "sequenceAccountId", "taxIdentifier" ], "type": "object", "example": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" }, "properties": { "id": { "type": "string", "description": "Tax registration ID", "example": "3271ca41-d538-404f-a15f-25856a37fb88" }, "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1" }, "taxIdentifier": { "type": "string", "description": "The unique identifier for this tax registration", "example": "GB123456789" }, "customerId": { "type": "string", "description": "The customer that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "merchantId": { "type": "string", "description": "The merchant that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "country": { "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))", "$ref": "#/components/schemas/CountryCode" }, "state": { "description": "The registration state", "nullable": true, "$ref": "#/components/schemas/State" } } }, "GetTaxRegistrationForMerchantProductResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "42020696-da25-44d0-ab79-9ecbf8fc5307", "taxIdentifier": "CA123456789", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "pagination": { "after": "nextOffset", "before": "previousOffset", "totalResultSize": 100 } }, "properties": { "items": { "type": "array", "description": "List of tax registrations for merchant", "example": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "42020696-da25-44d0-ab79-9ecbf8fc5307", "taxIdentifier": "CA123456789", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "items": { "$ref": "#/components/schemas/GetTaxRegistrationForMerchantMerchantTaxRegistration" } }, "pagination": { "$ref": "#/components/schemas/PaginationResponse" } } }, "GetTaxRegistrationForMerchantMerchantTaxRegistration": { "required": [ "country", "id", "merchantId", "sequenceAccountId", "taxIdentifier" ], "type": "object", "example": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "42020696-da25-44d0-ab79-9ecbf8fc5307", "taxIdentifier": "CA123456789", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" }, "properties": { "id": { "type": "string", "description": "Tax registration ID", "example": "3271ca41-d538-404f-a15f-25856a37fb88" }, "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "42020696-da25-44d0-ab79-9ecbf8fc5307" }, "taxIdentifier": { "type": "string", "description": "The unique identifier for this tax registration", "example": "CA123456789" }, "merchantId": { "type": "string", "description": "The merchant that this tax registration belongs to", "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "country": { "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))", "$ref": "#/components/schemas/CountryCode" }, "state": { "description": "The registration state", "nullable": true, "$ref": "#/components/schemas/State" } } }, "PaginationResponse": { "type": "object", "description": "Results pagination", "example": { "after": "nextOffset", "before": "previousOffset", "totalResultSize": 100 }, "properties": { "after": { "type": "string", "description": "Copy this value to the `after` parameter of your next request to retrieve the next page of results", "nullable": true, "example": "nextOffset" }, "before": { "type": "string", "description": "Copy this value to the `before` parameter of your next request to retrieve the next page of results", "nullable": true, "example": "previousOffset" }, "totalResultSize": { "type": "integer", "description": "Total number of entries across all pages", "format": "int64", "nullable": true, "example": 100 } } }, "GetTaxRegistrationForCustomerProductResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "42020696-da25-44d0-ab79-9ecbf8fc5307", "taxIdentifier": "CA123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "pagination": { "after": "nextOffset", "before": "previousOffset", "totalResultSize": 100 } }, "properties": { "items": { "type": "array", "description": "List of tax registrations for customer", "example": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "42020696-da25-44d0-ab79-9ecbf8fc5307", "taxIdentifier": "CA123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "items": { "$ref": "#/components/schemas/GetTaxRegistrationForCustomerCustomerTaxRegistration" } }, "pagination": { "$ref": "#/components/schemas/PaginationResponse" } } }, "GetTaxRegistrationForCustomerCustomerTaxRegistration": { "required": [ "country", "customerId", "id", "sequenceAccountId", "taxIdentifier" ], "type": "object", "example": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "42020696-da25-44d0-ab79-9ecbf8fc5307", "taxIdentifier": "CA123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" }, "properties": { "id": { "type": "string", "description": "Tax registration ID", "example": "3271ca41-d538-404f-a15f-25856a37fb88" }, "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "42020696-da25-44d0-ab79-9ecbf8fc5307" }, "taxIdentifier": { "type": "string", "description": "The unique identifier for this tax registration", "example": "CA123456789" }, "customerId": { "type": "string", "description": "The customer that this tax registration belongs to", "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "country": { "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))", "$ref": "#/components/schemas/CountryCode" }, "state": { "description": "The registration state", "nullable": true, "$ref": "#/components/schemas/State" } } }, "GetTaxRegistrationEndpointProductGetTaxRegistrationResponseModel": { "required": [ "country", "id", "sequenceAccountId", "taxIdentifier" ], "type": "object", "example": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" }, "properties": { "id": { "type": "string", "description": "Tax registration ID", "example": "3271ca41-d538-404f-a15f-25856a37fb88" }, "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1" }, "taxIdentifier": { "type": "string", "description": "The unique identifier for this tax registration", "example": "GB123456789" }, "customerId": { "type": "string", "description": "The customer that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "merchantId": { "type": "string", "description": "The merchant that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "country": { "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))", "$ref": "#/components/schemas/CountryCode" }, "state": { "description": "The registration state", "nullable": true, "$ref": "#/components/schemas/State" } } }, "UpdateTaxRegistrationEndpointUpdateTaxRegistrationRequestModel": { "required": [ "country", "taxIdentifier" ], "type": "object", "example": { "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" }, "properties": { "taxIdentifier": { "type": "string", "description": "The unique identifier for this tax registration", "example": "GB123456789" }, "customerId": { "type": "string", "description": "The customer that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "merchantId": { "type": "string", "description": "The merchant that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "country": { "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))", "$ref": "#/components/schemas/CountryCode" }, "state": { "description": "The registration state", "nullable": true, "$ref": "#/components/schemas/State" } } }, "UpdateTaxRegistrationEndpointProductUpdateTaxRegistrationResponseModel": { "required": [ "country", "id", "sequenceAccountId", "taxIdentifier" ], "type": "object", "example": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" }, "properties": { "id": { "type": "string", "description": "Tax registration ID", "example": "3271ca41-d538-404f-a15f-25856a37fb88" }, "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1" }, "taxIdentifier": { "type": "string", "description": "The unique identifier for this tax registration", "example": "GB123456789" }, "customerId": { "type": "string", "description": "The customer that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "merchantId": { "type": "string", "description": "The merchant that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "country": { "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))", "$ref": "#/components/schemas/CountryCode" }, "state": { "description": "The registration state", "nullable": true, "$ref": "#/components/schemas/State" } } }, "ListTaxRegistrationEndpointProductListTaxRegistrationPaginatedResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "TaxRegistrations", "example": [ { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" } ], "items": { "$ref": "#/components/schemas/ListTaxRegistrationEndpointProductListTaxRegistrationResponseModel" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta" } } }, "ListTaxRegistrationEndpointProductListTaxRegistrationResponseModel": { "required": [ "country", "id", "sequenceAccountId", "taxIdentifier" ], "type": "object", "example": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" }, "properties": { "id": { "type": "string", "description": "Tax registration ID", "example": "3271ca41-d538-404f-a15f-25856a37fb88" }, "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1" }, "taxIdentifier": { "type": "string", "description": "The unique identifier for this tax registration", "example": "GB123456789" }, "customerId": { "type": "string", "description": "The customer that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "merchantId": { "type": "string", "description": "The merchant that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "country": { "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))", "$ref": "#/components/schemas/CountryCode" }, "state": { "description": "The registration state", "nullable": true, "$ref": "#/components/schemas/State" } } }, "DeleteTaxRegistrationEndpointProductDeleteTaxRegistrationResponseModel": { "required": [ "country", "id", "sequenceAccountId", "taxIdentifier" ], "type": "object", "example": { "id": "3271ca41-d538-404f-a15f-25856a37fb88", "sequenceAccountId": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1", "taxIdentifier": "GB123456789", "customerId": "06457f78-85cd-4140-9972-67c6cd8f6071", "merchantId": "06457f78-85cd-4140-9972-67c6cd8f6071", "country": "GB", "state": "CA" }, "properties": { "id": { "type": "string", "description": "Tax registration ID", "example": "3271ca41-d538-404f-a15f-25856a37fb88" }, "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "a2e7ec72-e3b1-4349-8d8b-c1ad3cea03a1" }, "taxIdentifier": { "type": "string", "description": "The unique identifier for this tax registration", "example": "GB123456789" }, "customerId": { "type": "string", "description": "The customer that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "merchantId": { "type": "string", "description": "The merchant that this tax registration belongs to", "nullable": true, "example": "06457f78-85cd-4140-9972-67c6cd8f6071" }, "country": { "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))", "$ref": "#/components/schemas/CountryCode" }, "state": { "description": "The registration state", "nullable": true, "$ref": "#/components/schemas/State" } } }, "AccountPaymentSettings": { "required": [ "failureNotifications", "id" ], "type": "object", "example": { "id": "e095e00f-36af-44c9-8c53-3e25677ce8ce", "failureNotifications": { "merchantNotifications": "SEND_NOTIFICATIONS", "customerNotifications": "SEND_NOTIFICATIONS" } }, "properties": { "id": { "type": "string", "description": "The ID of the account's payment settings", "example": "e095e00f-36af-44c9-8c53-3e25677ce8ce" }, "failureNotifications": { "$ref": "#/components/schemas/PaymentFailureNotifications" } } }, "PaymentFailureNotifications": { "required": [ "customerNotifications", "merchantNotifications" ], "type": "object", "description": "The failure notification settings for the account", "example": { "merchantNotifications": "SEND_NOTIFICATIONS", "customerNotifications": "SEND_NOTIFICATIONS" }, "properties": { "merchantNotifications": { "description": "The payment failure notification settings for the merchant account", "$ref": "#/components/schemas/PaymentFailureNotificationOptions" }, "customerNotifications": { "description": "The payment failure notification settings for the end-customers", "$ref": "#/components/schemas/PaymentFailureNotificationOptions" } } }, "PaymentFailureNotificationOptions": { "type": "string", "example": "SEND_NOTIFICATIONS", "enum": [ "SEND_NOTIFICATIONS", "DO_NOT_SEND_NOTIFICATIONS" ] }, "UpdateAccountPaymentSettingsEndpointUpdateAccountPaymentSettingsRequest": { "required": [ "failureNotifications" ], "type": "object", "example": { "failureNotifications": { "merchantNotifications": "DO_NOT_SEND_NOTIFICATIONS", "customerNotifications": "DO_NOT_SEND_NOTIFICATIONS" } }, "properties": { "failureNotifications": { "$ref": "#/components/schemas/PaymentFailureNotifications" } } }, "CreateBillingScheduleSettingsEndpointCreateBillingScheduleSettingsRequestModel": { "required": [ "billingScheduleId", "paymentProvider" ], "type": "object", "example": { "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true }, "properties": { "billingScheduleId": { "type": "string", "description": "Unique payment provider ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Payment provider", "$ref": "#/components/schemas/PaymentProvider" }, "autoCharge": { "type": "boolean", "description": "Automatically collect this payment if payment details are available", "nullable": true, "example": true } } }, "PaymentProvider": { "type": "string", "example": "STRIPE", "enum": [ "STRIPE", "GOCARDLESS", "NONE" ] }, "BillingScheduleSettings": { "required": [ "autoCharge", "billingScheduleId", "id", "paymentProvider", "sequenceAccountId" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "billingScheduleId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE", "autoCharge": true }, "properties": { "id": { "type": "string", "description": "Unique payment provider ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "sequenceAccountId": { "type": "string", "description": "Unique Sequence Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "billingScheduleId": { "type": "string", "description": "Unique payment provider ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Payment provider", "$ref": "#/components/schemas/PaymentProvider" }, "autoCharge": { "type": "boolean", "description": "Automatically collect payments if payment details are available", "example": true } } }, "UpdateBillingScheduleSettingsEndpointUpdateBillingScheduleSettingsRequestModel": { "required": [ "paymentProvider" ], "type": "object", "example": { "paymentProvider": "STRIPE", "autoCharge": true }, "properties": { "paymentProvider": { "description": "Payment provider", "$ref": "#/components/schemas/PaymentProvider" }, "autoCharge": { "type": "boolean", "description": "Automatically collect this payment if payment details are available", "nullable": true, "example": true } } }, "CreateInvoiceSettingsEndpointCreateInvoiceSettingsRequestModel": { "required": [ "invoiceId", "paymentProvider" ], "type": "object", "example": { "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" }, "properties": { "invoiceId": { "type": "string", "description": "Invoice ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "customerId": { "type": "string", "description": "Customer ID.", "nullable": true, "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "CreateInvoiceSettingsEndpointProductCreateInvoiceSettingsResponseModel": { "required": [ "customerId", "id", "invoiceId", "paymentProvider", "sequenceAccountId" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" }, "properties": { "id": { "type": "string", "description": "Unique payment provider id.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "invoiceId": { "type": "string", "description": "Invoice ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "customerId": { "type": "string", "description": "Customer ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "GetByInvoiceIdProductGetInvoiceSettingsResponseModel": { "required": [ "id", "invoiceId", "paymentProvider", "sequenceAccountId" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" }, "properties": { "id": { "type": "string", "description": "Unique payment provider id.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "invoiceId": { "type": "string", "description": "Invoice ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "GetInvoiceSettingsEndpointProductGetInvoiceSettingsResponseModel": { "required": [ "customerId", "id", "invoiceId", "paymentProvider", "sequenceAccountId" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" }, "properties": { "id": { "type": "string", "description": "Unique payment provider id.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "invoiceId": { "type": "string", "description": "Invoice ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "customerId": { "type": "string", "description": "Customer ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "UpdateInvoiceSettingsEndpointUpdateInvoiceSettingsRequestModel": { "required": [ "paymentProvider" ], "type": "object", "example": { "paymentProvider": "STRIPE" }, "properties": { "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "UpdateInvoiceSettingsEndpointProductUpdateInvoiceSettingsResponseModel": { "required": [ "customerId", "id", "invoiceId", "paymentProvider", "sequenceAccountId" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" }, "properties": { "id": { "type": "string", "description": "Unique payment provider id.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "invoiceId": { "type": "string", "description": "Invoice ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "customerId": { "type": "string", "description": "Customer ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "DeleteInvoiceSettingsEndpointProductDeleteInvoiceSettingsResponseModel": { "required": [ "customerId", "id", "invoiceId", "paymentProvider", "sequenceAccountId" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "invoiceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" }, "properties": { "id": { "type": "string", "description": "Unique payment provider id.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "invoiceId": { "type": "string", "description": "Invoice ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "customerId": { "type": "string", "description": "Customer ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "CreateCustomerSettingsEndpointCreateCustomerSettingsRequestModel": { "required": [ "customerId", "paymentProvider" ], "type": "object", "example": { "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" }, "properties": { "customerId": { "type": "string", "description": "Customer Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "CreateCustomerSettingsEndpointProductCreateCustomerSettingsResponseModel": { "required": [ "customerId", "id", "paymentProvider", "sequenceAccountId" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" }, "properties": { "id": { "type": "string", "description": "Unique payment provider id.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "customerId": { "type": "string", "description": "Customer Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "GetCustomerSettingsEndpointProductGetCustomerSettingsResponseModel": { "required": [ "customerId", "id", "paymentProvider", "sequenceAccountId" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" }, "properties": { "id": { "type": "string", "description": "Unique payment provider id.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "customerId": { "type": "string", "description": "Customer Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "UpdateCustomerSettingsEndpointUpdateCustomerSettingsRequestModel": { "required": [ "paymentProvider" ], "type": "object", "example": { "paymentProvider": "STRIPE" }, "properties": { "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "UpdateCustomerSettingsEndpointProductUpdateCustomerSettingsResponseModel": { "required": [ "customerId", "id", "paymentProvider", "sequenceAccountId" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" }, "properties": { "id": { "type": "string", "description": "Unique payment provider id.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "customerId": { "type": "string", "description": "Customer Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "DeleteCustomerSettingsEndpointProductDeleteCustomerSettingsResponseModel": { "required": [ "customerId", "id", "paymentProvider", "sequenceAccountId" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "sequenceAccountId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "customerId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "paymentProvider": "STRIPE" }, "properties": { "id": { "type": "string", "description": "Unique payment provider id.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "customerId": { "type": "string", "description": "Customer Account ID.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "paymentProvider": { "description": "Sequence Account ID.", "$ref": "#/components/schemas/PaymentProvider" } } }, "StripeCollectionSettings": { "required": [ "autoEnableStripePayments", "enableAutomaticPayments", "id", "retryOffsetDays", "sequenceAccountId" ], "type": "object", "example": { "id": "018f6b0c-7e89-7b4a-8e47-1b2e2d5a4f6c", "sequenceAccountId": "683fe518-60c8-429f-9320-8aa7efc20bcc", "enableAutomaticPayments": true, "autoEnableStripePayments": false, "retryOffsetDays": [] }, "properties": { "id": { "type": "string", "example": "018f6b0c-7e89-7b4a-8e47-1b2e2d5a4f6c" }, "sequenceAccountId": { "type": "string", "example": "683fe518-60c8-429f-9320-8aa7efc20bcc" }, "enableAutomaticPayments": { "type": "boolean", "description": "Whether to automatically collect payments by default if payment details are available", "example": true }, "autoEnableStripePayments": { "type": "boolean", "description": "Whether to automatically enable Stripe payments for new billing schedules", "example": false }, "retryOffsetDays": { "type": "array", "description": "Days after the anchor date on which to re-attempt collection, e.g. [0, 7, 14]", "example": [], "items": {} } } }, "UpdateStripeCollectionSettingsEndpointUpdateStripeCollectionSettingsRequest": { "type": "object", "example": { "enableAutomaticPayments": false, "autoEnableStripePayments": true, "retryAnchor": "DUE_DATE", "retryOffsetDays": [ 0, 7, 14 ] }, "properties": { "enableAutomaticPayments": { "type": "boolean", "description": "Whether to automatically collect payments by default if payment details are available", "nullable": true, "example": false }, "autoEnableStripePayments": { "type": "boolean", "description": "Whether to automatically enable Stripe payments for new billing schedules", "nullable": true, "example": true }, "retryAnchor": { "description": "The invoice date that retry offsets are counted from. Null disables automatic retries.", "nullable": true, "$ref": "#/components/schemas/RetryAnchor" }, "retryOffsetDays": { "type": "array", "description": "Days after the anchor date on which to re-attempt collection, e.g. [0, 7, 14]", "nullable": true, "example": [ 0, 7, 14 ], "items": { "type": "integer" } } } }, "RetryAnchor": { "type": "string", "example": "DUE_DATE", "enum": [ "SENT_DATE", "DUE_DATE" ] }, "CustomerOrganizationRequest": { "required": [ "memberIds", "ownerId" ], "type": "object", "example": { "ownerId": "50af5191-05a3-42a5-802a-6b59091157af", "memberIds": [ "e309e948-088e-4d77-b654-cd85498f1555", "50af5191-05a3-42a5-802a-6b59091157af" ] }, "properties": { "ownerId": { "type": "string", "description": "ID of the customer that will own the organization.", "example": "50af5191-05a3-42a5-802a-6b59091157af" }, "memberIds": { "type": "array", "description": "IDs of the customers who are members of this organization, excluding the owner. These are the children in a parent-child relationship. You can pass an empty array if they are not yet known.", "example": [ "e309e948-088e-4d77-b654-cd85498f1555", "50af5191-05a3-42a5-802a-6b59091157af" ], "items": { "type": "string" } } } }, "CustomerOrganization": { "required": [ "id", "members", "owner" ], "type": "object", "example": { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" }, { "id": "e06f36e2-0a44-404d-bdbc-b66a292609b0", "name": "FinTech Wealth Management" } ] }, "properties": { "id": { "type": "string", "description": "Organization ID", "example": "c0dc4e79-ec52-4811-8cf5-addb2527915c" }, "owner": { "$ref": "#/components/schemas/CustomerIdWithName" }, "members": { "type": "array", "description": "Members of the customer organization, excluding the owner. These are the children in a parent-child relationship.", "example": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" }, { "id": "e06f36e2-0a44-404d-bdbc-b66a292609b0", "name": "FinTech Wealth Management" } ], "items": { "$ref": "#/components/schemas/CustomerIdWithName" } } } }, "CustomerIdWithName": { "required": [ "id", "name" ], "type": "object", "description": "ID of the customer that will own the organization.", "example": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "properties": { "id": { "type": "string", "description": "Customer ID", "example": "50af5191-05a3-42a5-802a-6b59091157af" }, "name": { "type": "string", "description": "Customer legal name", "example": "FinTech Solutions Inc." } } }, "CreateOrUpdateCustomerRequest": { "required": [ "address", "contacts", "legalName", "taxStatus" ], "type": "object", "example": { "legalName": "John Doe", "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "url": "https://example.com/", "label": "Example customer", "taxStatus": "TAXED", "customerAliases": [ "b1c87177-088a-40ec-8917-9809343f3f9c" ], "integrationIds": [ { "service": "Xero", "id": "123456789" }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9" }, { "service": "HubSpot", "id": "123456789" } ], "parentId": "50af5191-05a3-42a5-802a-6b59091157af", "contacts": [ { "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "PRIMARY" }, { "name": "Anna Smith", "email": "anna.smith@example.com", "billingPreference": "STANDARD" }, { "name": "Penny Smith", "email": "penny.smith@example.com", "billingPreference": "NONE" } ], "pushToIntegrations": [ "Xero" ], "status": "ACTIVE" }, "properties": { "legalName": { "type": "string", "description": "Legal name", "example": "John Doe" }, "address": { "$ref": "#/components/schemas/Address" }, "url": { "type": "string", "description": "URL", "example": "https://example.com/" }, "label": { "type": "string", "description": "Label", "example": "Example customer" }, "taxStatus": { "description": "Tax status applicable to customer. Can be one of TAXED, TAX_EXEMPT or REVERSE_CHARGED. The default is TAXED.", "$ref": "#/components/schemas/TaxStatus" }, "customerAliases": { "type": "array", "description": "Customer aliases", "example": [ "b1c87177-088a-40ec-8917-9809343f3f9c" ], "items": { "type": "string" } }, "integrationIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "service": "Xero", "id": "123456789" }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9" }, { "service": "HubSpot", "id": "123456789" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest1" } }, "parentId": { "type": "string", "description": "ID of a parent customer. Populate this field to create a new customeras a child customer of another, existing customer.", "example": "50af5191-05a3-42a5-802a-6b59091157af" }, "contacts": { "type": "array", "description": "Contacts to create for this customer. This will replace all existing contacts for this customer. Needs atleast one Contact with a billing preference of 'PRIMARY'", "example": [ { "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "PRIMARY" }, { "name": "Anna Smith", "email": "anna.smith@example.com", "billingPreference": "STANDARD" }, { "name": "Penny Smith", "email": "penny.smith@example.com", "billingPreference": "NONE" } ], "items": { "$ref": "#/components/schemas/ContactRequestModel" } }, "pushToIntegrations": { "type": "array", "description": "Automatically create customer in these linked integrations", "example": [ "Xero" ], "items": { "$ref": "#/components/schemas/CreateOrUpdateCustomerRequestIntegration" } }, "status": { "description": "Customer status:\n- DRAFT means the customer has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a customer is created via API or dashboard.", "$ref": "#/components/schemas/CustomerStatus" } } }, "Address": { "required": [ "country", "line1", "postcode", "town" ], "type": "object", "description": "Address", "example": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "properties": { "line1": { "type": "string", "description": "Address line 1", "example": "Flat 1" }, "line2": { "type": "string", "description": "Address line 2", "example": "123 Fake Street" }, "town": { "type": "string", "description": "Town or city", "example": "New York" }, "state": { "description": "State or province (required for USA and Canada)", "$ref": "#/components/schemas/State1" }, "postcode": { "type": "string", "description": "Postal code", "example": "AB1 2EF" }, "country": { "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))", "$ref": "#/components/schemas/CountryCode1" } } }, "State1": { "type": "string", "example": "NY", "enum": [ "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", "AB", "BC", "MB", "NB", "NL", "NS", "NT", "NU", "ON", "PE", "QC", "SK", "YT" ] }, "CountryCode1": { "type": "string", "example": "US", "enum": [ "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "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", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW" ] }, "TaxStatus": { "type": "string", "example": "TAXED", "enum": [ "TAXED", "TAX_EXEMPT", "REVERSE_CHARGED" ] }, "GenerateIntegrationIdRequest1": { "required": [ "id", "service" ], "type": "object", "example": { "service": "Xero", "id": "123456789" }, "properties": { "service": { "$ref": "#/components/schemas/IntegrationService" }, "id": { "type": "string", "example": "123456789" } } }, "ContactRequestModel": { "required": [ "billingPreference", "email", "name" ], "type": "object", "example": { "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "PRIMARY" }, "properties": { "name": { "type": "string", "description": "Full name of this contact", "example": "John Smith" }, "email": { "type": "string", "description": "Email address of this contact", "example": "john.smith@example.com" }, "billingPreference": { "description": "Billing preference. Whether this contact receives billing communications. Options are NONE, STANDARD or PRIMARY. For a given customer, if any contacts receive billing communications then at least one contact must be designated PRIMARY for billing.", "$ref": "#/components/schemas/ContactBillingPreference" } } }, "ContactBillingPreference": { "type": "string", "example": "PRIMARY", "enum": [ "PRIMARY", "STANDARD", "NONE" ] }, "CreateOrUpdateCustomerRequestIntegration": { "type": "string", "example": "Xero", "enum": [ "Xero" ] }, "CustomerStatus": { "type": "string", "example": "ACTIVE", "enum": [ "DRAFT", "ACTIVE" ] }, "Customer": { "required": [ "address", "contacts", "createdAt", "customProperties", "id", "integrationIds", "legalName", "organizations", "status", "taxStatus" ], "type": "object", "example": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2025-08-28T12:00:00Z", "taxStatus": "TAXED", "contacts": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ], "status": "ACTIVE", "customProperties": { "region": "EU", "tier": "gold" } }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "e309e948-088e-4d77-b654-cd85498f1555" }, "createdAt": { "type": "string", "description": "Time at which the customer was initially created, in ISO 8601 format", "example": "2021-01-02T10:55:00Z" }, "organizations": { "type": "array", "description": "Organizations that this customer is a member of", "example": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "items": { "$ref": "#/components/schemas/CustomerOrganization" } }, "legalName": { "type": "string", "description": "Legal name", "example": "Fintech Payment Processing" }, "address": { "$ref": "#/components/schemas/Address" }, "url": { "type": "string", "description": "URL", "example": "https://example.com/" }, "domain": { "type": "string", "description": "Customer's primary domain name", "example": "example.com" }, "label": { "type": "string", "description": "Label", "example": "Example customer" }, "integrationIds": { "type": "array", "description": "External services which are linked to this customer", "example": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId1" } }, "archivedAt": { "type": "string", "description": "Time at which the customer was archived, in ISO 8601 format", "example": "2025-08-28T12:00:00Z" }, "taxStatus": { "description": "Tax status applicable to customer. Can be one of TAXED, TAX_EXEMPT or REVERSE_CHARGED. The default is TAXED.", "$ref": "#/components/schemas/TaxStatus" }, "contacts": { "type": "array", "description": "Contacts for this customer", "example": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ], "items": { "$ref": "#/components/schemas/Contact" } }, "status": { "description": "Customer status:\n- DRAFT means the customer has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a customer is created via API or dashboard.", "$ref": "#/components/schemas/CustomerStatus" }, "customProperties": { "type": "object", "description": "Custom key-value properties for this customer", "example": { "region": "EU", "tier": "gold" }, "additionalProperties": { "type": "string" } } } }, "IntegrationId1": { "required": [ "id", "isPending", "service" ], "type": "object", "example": { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, "properties": { "service": { "$ref": "#/components/schemas/IntegrationService" }, "id": { "type": "string", "example": "2aaff66f-ef30-4599-b192-c168fd4cd226" }, "lastSynced": { "type": "string", "example": "2024-03-28T16:47:00Z" }, "isPending": { "type": "boolean", "example": false } } }, "Contact": { "required": [ "billingPreference", "createdAt", "email", "id", "name", "updatedAt" ], "type": "object", "example": { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc" }, "name": { "type": "string", "description": "Full name of this contact", "example": "John Smith" }, "email": { "type": "string", "description": "Email address of this contact", "example": "john.smith@example.com" }, "billingPreference": { "description": "Billing preference. Whether this contact receives billing communications. Options are NONE, STANDARD or PRIMARY. For a given customer, if any contacts receive billing communications then at least one contact must be designated PRIMARY for billing.", "$ref": "#/components/schemas/ContactBillingPreference" }, "createdAt": { "type": "string", "description": "Time of creation. Formatted as an ISO 8601 timestamp.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time of last update. Formatted as an ISO 8601 timestamp.", "example": "2022-06-28T16:47:00Z" }, "archivedAt": { "type": "string", "description": "Time of archive. Formatted as an ISO 8601 timestamp.", "example": "2023-06-28T16:47:00Z" } } }, "CreateCustomerAliasRequestModel": { "required": [ "customerId", "value" ], "type": "object", "example": { "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "label": "CRM ID" }, "properties": { "customerId": { "type": "string", "description": "Customer ID", "example": "01849e70-703e-705a-b59a-d3fd575587e0" }, "value": { "type": "string", "description": "Alias value", "example": "external-customer-alias-123" }, "label": { "type": "string", "description": "Alias label", "example": "CRM ID" } } }, "CustomerAliasResponseModel": { "required": [ "createdAt", "customerId", "id", "sequenceAccountId", "value" ], "type": "object", "example": { "id": "01849e70-0a0f-72ca-ba07-5557dd734d43", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "createdAt": "2022-10-01T00:00:00Z", "deletedAt": "2022-10-01T00:00:00Z", "label": "CRM ID", "archivedAt": "2022-10-01T00:00:00Z" }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "01849e70-0a0f-72ca-ba07-5557dd734d43" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "ec1479a2-6ba1-421f-a7de-0853a20d17a1" }, "customerId": { "type": "string", "description": "Customer ID", "example": "01849e70-703e-705a-b59a-d3fd575587e0" }, "value": { "type": "string", "description": "Alias value", "example": "external-customer-alias-123" }, "createdAt": { "type": "string", "description": "Created At", "example": "2022-10-01T00:00:00Z" }, "deletedAt": { "type": "string", "description": "Deleted At", "example": "2022-10-01T00:00:00Z" }, "label": { "type": "string", "description": "Alias label", "example": "CRM ID" }, "archivedAt": { "type": "string", "description": "Archived At", "example": "2022-10-01T00:00:00Z" } } }, "CustomerCustomPropertyKeysControllerListCustomerCustomPropertyKeysResponse": { "required": [ "items" ], "type": "object", "example": { "items": [ "region", "tier" ] }, "properties": { "items": { "type": "array", "description": "Distinct custom property keys across all customers", "example": [ "region", "tier" ], "items": { "type": "string" } } } }, "ListCustomerAliasPaginatedResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "01849e70-0a0f-72ca-ba07-5557dd734d43", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "createdAt": "2022-10-01T00:00:00Z", "deletedAt": "2022-10-01T00:00:00Z", "label": "CRM ID", "archivedAt": "2022-10-01T00:00:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Customer Aliases", "example": [ { "id": "01849e70-0a0f-72ca-ba07-5557dd734d43", "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1", "customerId": "01849e70-703e-705a-b59a-d3fd575587e0", "value": "external-customer-alias-123", "createdAt": "2022-10-01T00:00:00Z", "deletedAt": "2022-10-01T00:00:00Z", "label": "CRM ID", "archivedAt": "2022-10-01T00:00:00Z" } ], "items": { "$ref": "#/components/schemas/CustomerAliasResponseModel" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta2" } } }, "PaginationMeta2": { "type": "object", "description": "Results pagination", "example": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 }, "properties": { "after": { "type": "string", "description": "Cursor for the page after this (if it exists)", "example": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3" }, "before": { "type": "string", "description": "Cursor for the page before this (if it exists)", "example": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz" }, "totalResultSize": { "type": "integer", "description": "Total number of entries across all pages", "format": "int64", "example": 10 } } }, "CustomerOrganizationMembers": { "required": [ "customerIds" ], "type": "object", "example": { "customerIds": [ "e06f36e2-0a44-404d-bdbc-b66a292609b0" ] }, "properties": { "customerIds": { "type": "array", "description": "IDs of customers to add to an existing organization.", "example": [ "e06f36e2-0a44-404d-bdbc-b66a292609b0" ], "items": { "type": "string" } } } }, "ContactResponseModel": { "required": [ "items" ], "type": "object", "example": { "items": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ] }, "properties": { "items": { "type": "array", "description": "Contacts", "example": [ { "id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc", "name": "John Smith", "email": "john.smith@example.com", "billingPreference": "NONE", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "archivedAt": "2023-06-28T16:47:00Z" } ], "items": { "$ref": "#/components/schemas/Contact" } } } }, "UpdateCustomerAliasRequestModel": { "type": "object", "example": { "label": "CRM ID" }, "properties": { "label": { "type": "string", "description": "Alias label", "example": "CRM ID" } } }, "Customer20240509": { "required": [ "address", "billingEmails", "createdAt", "email", "id", "integrationIds", "legalName", "taxStatus" ], "type": "object", "example": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2022-06-28T16:47:00Z", "legalName": "John Doe", "contactName": "John Doe", "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "email": "john@example.com", "telephone": "02010001000", "url": "https://example.com/", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "ID", "lastSynced": "2022-06-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2022-06-28T16:47:00Z", "isPending": false } ], "archivedAt": "2022-06-28T16:47:00Z", "billingEmails": [ "exampleCorpInvoices@example.com" ], "taxStatus": "TAXED" }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "e309e948-088e-4d77-b654-cd85498f1555" }, "createdAt": { "type": "string", "description": "Created at", "example": "2022-06-28T16:47:00Z" }, "legalName": { "type": "string", "description": "Legal name", "example": "John Doe" }, "contactName": { "type": "string", "description": "Contact Name", "example": "John Doe" }, "address": { "$ref": "#/components/schemas/Address" }, "email": { "type": "string", "description": "Main contact email address", "example": "john@example.com" }, "telephone": { "type": "string", "description": "Telephone", "example": "02010001000" }, "url": { "type": "string", "description": "URL", "example": "https://example.com/" }, "label": { "type": "string", "description": "Label", "example": "Example customer" }, "integrationIds": { "type": "array", "description": "External services which are linked to this customer", "example": [ { "service": "Xero", "id": "ID", "lastSynced": "2022-06-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2022-06-28T16:47:00Z", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId1" } }, "archivedAt": { "type": "string", "description": "Date and time the Customer was archived", "example": "2022-06-28T16:47:00Z" }, "billingEmails": { "type": "array", "description": "Billing email addresses", "example": [ "exampleCorpInvoices@example.com" ], "items": { "type": "string" } }, "taxStatus": { "description": "Tax status applicable to customer. Can be one of TAXED, TAX_EXEMPT or REVERSE_CHARGED. The default is TAXED.", "$ref": "#/components/schemas/TaxStatus" } } }, "ListCustomerResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2011-08-28T01:00:00Z", "taxStatus": "TAXED", "customProperties": { "region": "EU", "tier": "gold" } } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Customers", "example": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2011-08-28T01:00:00Z", "taxStatus": "TAXED", "customProperties": { "region": "EU", "tier": "gold" } } ], "items": { "$ref": "#/components/schemas/ListCustomerResponseModel" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta2" } } }, "ListCustomerResponseModel": { "required": [ "address", "createdAt", "customProperties", "id", "integrationIds", "legalName", "organizations", "taxStatus" ], "type": "object", "example": { "id": "e309e948-088e-4d77-b654-cd85498f1555", "createdAt": "2021-01-02T10:55:00Z", "organizations": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "legalName": "Fintech Payment Processing", "address": { "line1": "7500 Bluewater Rd NW", "town": "Albuquerque", "state": "NY", "postcode": "87121", "country": "US" }, "url": "https://example.com/", "domain": "example.com", "label": "Example customer", "integrationIds": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "archivedAt": "2011-08-28T01:00:00Z", "taxStatus": "TAXED", "customProperties": { "region": "EU", "tier": "gold" } }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "e309e948-088e-4d77-b654-cd85498f1555" }, "createdAt": { "type": "string", "description": "Time at which the customer was initially created, in ISO 8601 format", "example": "2021-01-02T10:55:00Z" }, "organizations": { "type": "array", "description": "Organizations that this customer is a member of", "example": [ { "id": "c0dc4e79-ec52-4811-8cf5-addb2527915c", "owner": { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "FinTech Solutions Inc." }, "members": [ { "id": "e309e948-088e-4d77-b654-cd85498f1555", "name": "Fintech Payment Processing" }, { "id": "50af5191-05a3-42a5-802a-6b59091157af", "name": "Fintech Lending Services" } ] } ], "items": { "$ref": "#/components/schemas/CustomerOrganization" } }, "legalName": { "type": "string", "description": "Legal name", "example": "Fintech Payment Processing" }, "address": { "$ref": "#/components/schemas/Address" }, "url": { "type": "string", "description": "URL", "example": "https://example.com/" }, "domain": { "type": "string", "description": "Customer's primary domain name", "example": "example.com" }, "label": { "type": "string", "description": "Label", "example": "Example customer" }, "integrationIds": { "type": "array", "description": "External services which are linked to this customer", "example": [ { "service": "Xero", "id": "2aaff66f-ef30-4599-b192-c168fd4cd226", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false }, { "service": "Stripe", "id": "cus_OCtCxqQDgu1uX9", "lastSynced": "2024-03-28T16:47:00Z", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId1" } }, "archivedAt": { "type": "string", "description": "Time at which the customer was archived, in ISO 8601 format", "example": "2011-08-28T01:00:00Z" }, "taxStatus": { "description": "Tax status applicable to customer. Can be one of TAXED, TAX_EXEMPT or REVERSE_CHARGED. The default is TAXED.", "$ref": "#/components/schemas/TaxStatus" }, "customProperties": { "type": "object", "description": "Custom key-value properties for this customer", "example": { "region": "EU", "tier": "gold" }, "additionalProperties": { "type": "string" } } } }, "GetCustomerAliasesResponse": { "required": [ "items" ], "type": "object", "example": { "items": [ { "id": "0185a140-194a-7e9d-9fae-6a034fd4a725", "sequenceAccountId": "cd243b67-7d8c-42ee-b19f-b4e41f584415", "customerId": "0185a142-54ff-7ce5-846a-fc188432da6e", "value": "customer-alias-123", "createdAt": "2022-10-01T00:00:00Z" } ] }, "properties": { "items": { "type": "array", "example": [ { "id": "0185a140-194a-7e9d-9fae-6a034fd4a725", "sequenceAccountId": "cd243b67-7d8c-42ee-b19f-b4e41f584415", "customerId": "0185a142-54ff-7ce5-846a-fc188432da6e", "value": "customer-alias-123", "createdAt": "2022-10-01T00:00:00Z" } ], "items": { "$ref": "#/components/schemas/CustomerAlias" } } } }, "CustomerAlias": { "required": [ "createdAt", "customerId", "id", "sequenceAccountId", "value" ], "type": "object", "example": { "id": "0185a140-194a-7e9d-9fae-6a034fd4a725", "sequenceAccountId": "cd243b67-7d8c-42ee-b19f-b4e41f584415", "customerId": "0185a142-54ff-7ce5-846a-fc188432da6e", "value": "customer-alias-123", "createdAt": "2022-10-01T00:00:00Z" }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "0185a140-194a-7e9d-9fae-6a034fd4a725" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "cd243b67-7d8c-42ee-b19f-b4e41f584415" }, "customerId": { "type": "string", "description": "Customer ID", "example": "0185a142-54ff-7ce5-846a-fc188432da6e" }, "value": { "type": "string", "description": "Alias value", "example": "customer-alias-123" }, "createdAt": { "type": "string", "description": "Created At", "example": "2022-10-01T00:00:00Z" } } }, "UpdateSequenceAccountProductEndpointUpdateSequenceAccountRequest": { "type": "object", "example": { "companyName": "Acme Inc.", "companyNumber": "GB123988", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] }, "properties": { "companyName": { "type": "string", "description": "The company name of the company that owns this Sequence account.", "nullable": true, "example": "Acme Inc." }, "companyNumber": { "type": "string", "description": "The company number of the company that owns this Sequence account.", "nullable": true, "example": "GB123988" }, "country": { "description": "The country in which the company who owns this account is registered.", "nullable": true, "$ref": "#/components/schemas/CountryCode" }, "sendCustomerNotifications": { "type": "boolean", "description": "True if Sequence should send customer notifications on your behalf.", "nullable": true, "example": true }, "alertEmailAddresses": { "type": "array", "description": "Email address to which alert notifications will be sent", "nullable": true, "example": [ "alerts@example.com" ], "items": { "type": "string" } } } }, "SequenceAccount": { "required": [ "alertEmailAddresses", "companyName", "companyNumber", "country", "createdAt", "id", "sendCustomerNotifications", "sequenceOrganisationId" ], "type": "object", "example": { "id": "b6b0bb79-7b03-4cc0-9c70-2d3aec3aeb17", "createdAt": "2022-06-28T16:47:00Z", "sequenceOrganisationId": "e4f49f12-38cf-4fcf-ad2a-0ae7d83d6be4", "companyName": "Acme Inc.", "companyNumber": "GB123988", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] }, "properties": { "id": { "type": "string", "description": "Unique identifier for the Sequence account.", "example": "b6b0bb79-7b03-4cc0-9c70-2d3aec3aeb17" }, "createdAt": { "type": "string", "description": "The time at which the account was created. Formatted as an ISO 8601 timestamp.", "example": "2022-06-28T16:47:00Z" }, "sequenceOrganisationId": { "type": "string", "description": "The Sequence organisation ID that this account belongs to.", "example": "e4f49f12-38cf-4fcf-ad2a-0ae7d83d6be4" }, "companyName": { "type": "string", "description": "The company name of the company that owns this Sequence account.", "example": "Acme Inc." }, "companyNumber": { "type": "string", "description": "The company number of the company that owns this Sequence account.", "example": "GB123988" }, "country": { "description": "The country in which the company who owns this account is registered.", "$ref": "#/components/schemas/CountryCode" }, "sendCustomerNotifications": { "type": "boolean", "description": "True if Sequence should send customer notifications on your behalf.", "example": true }, "alertEmailAddresses": { "type": "array", "description": "List of email addresses to which alert notifications will be sent.", "example": [ "alerts@example.com" ], "items": { "type": "string" } } } }, "ListSequenceUsersResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "7b1f28b9-a4ad-450b-a0ea-fd647d5109b2", "email": "john@example.xyz", "sequenceAccountIds": [ "83da2ca4-49c7-4d81-9c9a-ba5be11768b0", "c0901c87-e1a9-48e9-9e2f-9e05c402dcea" ], "state": "active", "roles": [ { "roleName": "financeUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "create", "read", "update", "delete", "archive", "start" ] }, { "resource": "org.product", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.quote", "actions": [ "read", "execute" ] }, { "resource": "org.invoice", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.creditNote", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] } ] } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } }, "properties": { "items": { "type": "array", "description": "A list of users.", "example": [ { "id": "7b1f28b9-a4ad-450b-a0ea-fd647d5109b2", "email": "john@example.xyz", "sequenceAccountIds": [ "83da2ca4-49c7-4d81-9c9a-ba5be11768b0", "c0901c87-e1a9-48e9-9e2f-9e05c402dcea" ], "state": "active", "roles": [ { "roleName": "financeUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "create", "read", "update", "delete", "archive", "start" ] }, { "resource": "org.product", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.quote", "actions": [ "read", "execute" ] }, { "resource": "org.invoice", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.creditNote", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] } ] } ], "items": { "$ref": "#/components/schemas/SequenceUserResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationResponse1" } } }, "SequenceUserResponse": { "required": [ "email", "id", "roles", "sequenceAccountIds", "state" ], "type": "object", "example": { "id": "7b1f28b9-a4ad-450b-a0ea-fd647d5109b2", "email": "john@example.xyz", "sequenceAccountIds": [ "83da2ca4-49c7-4d81-9c9a-ba5be11768b0", "c0901c87-e1a9-48e9-9e2f-9e05c402dcea" ], "state": "active", "roles": [ { "roleName": "financeUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "create", "read", "update", "delete", "archive", "start" ] }, { "resource": "org.product", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.quote", "actions": [ "read", "execute" ] }, { "resource": "org.invoice", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.creditNote", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] } ] }, "properties": { "id": { "type": "string", "description": "The unique ID of this user.", "example": "7b1f28b9-a4ad-450b-a0ea-fd647d5109b2" }, "email": { "type": "string", "description": "The email address of this user.", "example": "john@example.xyz" }, "sequenceAccountIds": { "type": "array", "description": "A list of Sequence account IDs. These account IDs represent the accounts this user has access to.", "example": [ "83da2ca4-49c7-4d81-9c9a-ba5be11768b0", "c0901c87-e1a9-48e9-9e2f-9e05c402dcea" ], "items": { "type": "string" } }, "state": { "type": "string", "description": "The state of this user.", "example": "active" }, "roles": { "type": "array", "description": "The roles assigned to this user for the current Sequence account.", "example": [ { "roleName": "financeUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "create", "read", "update", "delete", "archive", "start" ] }, { "resource": "org.product", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.quote", "actions": [ "read", "execute" ] }, { "resource": "org.invoice", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.creditNote", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] } ], "items": { "$ref": "#/components/schemas/Role" } } } }, "Role": { "type": "object", "example": { "roleName": "financeUser", "permissions": [ { "resource": "org.customer", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.billing", "actions": [ "create", "read", "update", "delete", "archive", "start" ] }, { "resource": "org.product", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.quote", "actions": [ "read", "execute" ] }, { "resource": "org.invoice", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.creditNote", "actions": [ "create", "read", "update", "delete", "archive", "finalize", "send" ] }, { "resource": "org.usage", "actions": [ "read" ] }, { "resource": "org.revenueRecognition", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.settings", "actions": [ "read", "invite" ] }, { "resource": "org.integration", "actions": [ "read" ] }, { "resource": "org.tax", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.asset", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.watchtower", "actions": [ "read" ] }, { "resource": "org.bulkAction", "actions": [ "create", "read", "update", "delete", "archive" ] }, { "resource": "org.savedView", "actions": [ "create", "read", "update", "delete", "archive" ] } ] }, "enum": [ "{\"roleName\":\"admin\",\"permissions\":[{\"resource\":\"org.customer\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.billing\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\",\"start\"]},{\"resource\":\"org.product\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.invoice\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\",\"finalize\",\"send\"]},{\"resource\":\"org.creditNote\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\",\"finalize\",\"send\"]},{\"resource\":\"org.quote\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\",\"publish\",\"accept\",\"execute\"]},{\"resource\":\"org.revenueRecognition\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.usage\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.settings\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\",\"invite\"]},{\"resource\":\"org.integration\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.tax\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.asset\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.watchtower\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.bulkAction\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.savedView\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]}]}", "{\"roleName\":\"financeUser\",\"permissions\":[{\"resource\":\"org.customer\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.billing\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\",\"start\"]},{\"resource\":\"org.product\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.quote\",\"actions\":[\"read\",\"execute\"]},{\"resource\":\"org.invoice\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\",\"finalize\",\"send\"]},{\"resource\":\"org.creditNote\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\",\"finalize\",\"send\"]},{\"resource\":\"org.usage\",\"actions\":[\"read\"]},{\"resource\":\"org.revenueRecognition\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.settings\",\"actions\":[\"read\",\"invite\"]},{\"resource\":\"org.integration\",\"actions\":[\"read\"]},{\"resource\":\"org.tax\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.asset\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.watchtower\",\"actions\":[\"read\"]},{\"resource\":\"org.bulkAction\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.savedView\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]}]}", "{\"roleName\":\"salesUser\",\"permissions\":[{\"resource\":\"org.customer\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.billing\",\"actions\":[\"read\"]},{\"resource\":\"org.product\",\"actions\":[\"read\"]},{\"resource\":\"org.quote\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\",\"publish\",\"accept\"]},{\"resource\":\"org.invoice\",\"actions\":[\"read\"]},{\"resource\":\"org.creditNote\",\"actions\":[\"read\"]},{\"resource\":\"org.usage\",\"actions\":[\"read\"]},{\"resource\":\"org.revenueRecognition\",\"actions\":[\"read\"]},{\"resource\":\"org.settings\",\"actions\":[\"read\",\"invite\"]},{\"resource\":\"org.integration\",\"actions\":[\"read\"]},{\"resource\":\"org.tax\",\"actions\":[\"read\"]},{\"resource\":\"org.asset\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.watchtower\",\"actions\":[\"read\"]},{\"resource\":\"org.bulkAction\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]},{\"resource\":\"org.savedView\",\"actions\":[\"create\",\"read\",\"update\",\"delete\",\"archive\"]}]}", "{\"roleName\":\"readOnlyUser\",\"permissions\":[{\"resource\":\"org.customer\",\"actions\":[\"read\"]},{\"resource\":\"org.billing\",\"actions\":[\"read\"]},{\"resource\":\"org.product\",\"actions\":[\"read\"]},{\"resource\":\"org.quote\",\"actions\":[\"read\"]},{\"resource\":\"org.invoice\",\"actions\":[\"read\"]},{\"resource\":\"org.creditNote\",\"actions\":[\"read\"]},{\"resource\":\"org.usage\",\"actions\":[\"read\"]},{\"resource\":\"org.revenueRecognition\",\"actions\":[\"read\"]},{\"resource\":\"org.settings\",\"actions\":[\"read\"]},{\"resource\":\"org.integration\",\"actions\":[\"read\"]},{\"resource\":\"org.tax\",\"actions\":[\"read\"]},{\"resource\":\"org.asset\",\"actions\":[\"read\"]},{\"resource\":\"org.watchtower\",\"actions\":[\"read\"]},{\"resource\":\"org.bulkAction\",\"actions\":[\"read\"]},{\"resource\":\"org.savedView\",\"actions\":[\"read\"]}]}" ] }, "PaginationResponse1": { "type": "object", "description": "Results pagination", "example": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 }, "properties": { "after": { "type": "string", "description": "Copy this value to the `after` parameter of your next request to retrieve the next page of results", "nullable": true, "example": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==" }, "before": { "type": "string", "description": "Copy this value to the `before` parameter of your next request to retrieve the next page of results", "nullable": true, "example": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND" }, "totalResultSize": { "type": "integer", "description": "Total number of entries across all pages", "format": "int64", "nullable": true, "example": 100 } } }, "ListSequenceAccountsResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "7e330949-a175-496a-a060-27821656ce34", "createdAt": "2022-06-28T16:47:00Z", "sequenceOrganisationId": "13448448-ce43-4874-8acf-8ff2a8ca24c1", "companyName": "Acme Inc.", "companyNumber": "GB123987", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } }, "properties": { "items": { "type": "array", "description": "A list of Sequence accounts that you have access to.", "example": [ { "id": "7e330949-a175-496a-a060-27821656ce34", "createdAt": "2022-06-28T16:47:00Z", "sequenceOrganisationId": "13448448-ce43-4874-8acf-8ff2a8ca24c1", "companyName": "Acme Inc.", "companyNumber": "GB123987", "country": "GB", "sendCustomerNotifications": true, "alertEmailAddresses": [ "alerts@example.com" ] } ], "items": { "$ref": "#/components/schemas/SequenceAccount" } }, "pagination": { "$ref": "#/components/schemas/PaginationResponse1" } } }, "ListDiscountsResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "seatDiscountType": "ALL_SEATS" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Discounts", "example": [ { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "seatDiscountType": "ALL_SEATS" } ], "items": { "$ref": "#/components/schemas/DiscountResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta3" } } }, "DiscountResponse": { "required": [ "amount", "billingScheduleId", "createdAt", "discountCalculationType", "id", "message", "priceIds", "seatDiscountType", "separateLineItem", "sequenceAccountId", "updatedAt" ], "type": "object", "example": { "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d", "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "seatDiscountType": "ALL_SEATS" }, "properties": { "id": { "type": "string", "description": "Discount ID", "example": "d58bf2e3-7a5d-4900-8457-2521c6880f7d" }, "sequenceAccountId": { "type": "string", "description": "The Sequence Account to which this Discount belongs", "example": "1986c663-9ee9-4811-bfbf-57d2ad666096" }, "billingScheduleId": { "type": "string", "description": "Billing Schedule ID", "example": "08a76ddb-230e-4700-a5e2-70f6edaf7d50" }, "phaseId": { "type": "string", "description": "Phase ID", "example": "220e1878-b70a-4dfd-9c55-7651424b12d6" }, "priceIds": { "type": "array", "description": "Price IDs this discount applies to. If not populated, the discount applies to all prices on the billing schedule", "example": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "items": { "type": "string" } }, "separateLineItem": { "type": "boolean", "description": "Indicates whether the discount should appear as a separate line item in the invoice", "example": false }, "amount": { "type": "number", "description": "Amount to be reduced", "example": 25 }, "discountCalculationType": { "description": "Indicates whether the discount amount is percentage or nominal", "$ref": "#/components/schemas/DiscountCalculationType" }, "message": { "type": "string", "description": "Message to appear on the Invoice", "example": "Loyalty Discount" }, "validFrom": { "type": "string", "description": "First Day Discount is Valid", "example": "2023-01-01" }, "validTo": { "type": "string", "description": "Last Day Discount is Valid", "example": "2023-01-31" }, "createdAt": { "type": "string", "description": "Created at", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Updated At", "example": "2022-06-28T16:47:00Z" }, "seatDiscountType": { "description": "Determines how the discount is applied to any seat-based prices", "$ref": "#/components/schemas/SeatDiscountType" } } }, "DiscountCalculationType": { "type": "string", "example": "PERCENTAGE", "enum": [ "PERCENTAGE", "NOMINAL" ] }, "SeatDiscountType": { "type": "string", "example": "ALL_SEATS", "enum": [ "INCLUDED_SEATS_ONLY", "OVERAGE_SEATS_ONLY", "ALL_SEATS" ] }, "PaginationMeta3": { "type": "object", "description": "Results pagination", "example": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 }, "properties": { "after": { "type": "string", "description": "Cursor for the page after this (if it exists)", "example": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3" }, "before": { "type": "string", "description": "Cursor for the page before this (if it exists)", "example": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz" }, "totalResultSize": { "type": "integer", "description": "Total number of entries across all pages", "format": "int64", "example": 10 } } }, "UpdateBillingScheduleRequest": { "required": [ "autoIssueInvoices", "phases", "rollUpBilling", "startDate", "taxRates" ], "type": "object", "example": { "startDate": "2022-01-01", "endDate": "2022-12-01", "recurrenceDayOfMonth": 1, "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "autoIssueInvoices": true, "purchaseOrderNumber": "PO123", "rollUpBilling": false, "phases": [ { "priceIds": [ "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" ], "startDate": "2022-01-01", "endDate": "2022-12-01", "discounts": [], "minimums": [], "creditGrants": [ { "id": "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "listPriceIds": [ "b4d7e884-e007-4183-8355-4771865c5100" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "arrCalculation": "INCLUDE" } ] } ], "attachmentAssetIds": [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ], "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" } }, "properties": { "startDate": { "type": "string", "description": "Start date", "example": "2022-01-01" }, "endDate": { "type": "string", "description": "End date", "example": "2022-12-01" }, "recurrenceDayOfMonth": { "type": "integer", "description": "Recurrence day of month", "format": "int32", "example": 1 }, "taxRates": { "type": "array", "description": "Tax Rate for each Product", "example": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "items": { "$ref": "#/components/schemas/ProductTaxRateRepresentation" } }, "autoIssueInvoices": { "type": "boolean", "description": "Auto-issue invoices for this billing schedule", "example": true }, "purchaseOrderNumber": { "type": "string", "description": "Optional purchase order number to be added to invoices", "example": "PO123" }, "rollUpBilling": { "type": "boolean", "description": "Toggles Roll-up billing", "example": false }, "phases": { "type": "array", "description": "Phases", "example": [ { "priceIds": [ "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" ], "startDate": "2022-01-01", "endDate": "2022-12-01", "discounts": [], "minimums": [], "creditGrants": [ { "id": "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "listPriceIds": [ "b4d7e884-e007-4183-8355-4771865c5100" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "arrCalculation": "INCLUDE" } ] } ], "items": { "$ref": "#/components/schemas/PhaseRequest" } }, "attachmentAssetIds": { "type": "array", "description": "IDs of assets that are attached to this schedule", "example": [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ], "items": { "type": "string" } }, "defaultDueDateDays": { "type": "integer", "description": "Default number of days between invoice issue date and due date. Overrides any invoice level set default due date", "example": 30 }, "memo": { "type": "string", "description": "Billing schedule memo. Overrides any invoice level set memo", "example": "Example Billing Schedule" }, "customFields": { "type": "object", "description": "Custom key-value fields. Providing this field replaces all existing custom fields. Omitting it leaves them unchanged.", "example": { "key": "value" }, "additionalProperties": { "type": "string" } } } }, "ProductTaxRateRepresentation": { "required": [ "priceId", "taxRateId" ], "type": "object", "example": { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" }, "properties": { "priceId": { "type": "string", "description": "ID of the Price", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "taxRateId": { "type": "string", "description": "ID of the Tax Rate", "example": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } } }, "PhaseRequest": { "required": [ "priceIds", "startDate" ], "type": "object", "example": { "priceIds": [ "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" ], "startDate": "2022-01-01", "endDate": "2022-12-01", "discounts": [], "minimums": [], "creditGrants": [ { "id": "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "listPriceIds": [ "b4d7e884-e007-4183-8355-4771865c5100" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "arrCalculation": "INCLUDE" } ] }, "properties": { "priceIds": { "type": "array", "description": "The price IDs included in this phase", "example": [ "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" ], "items": { "type": "string" } }, "startDate": { "type": "string", "description": "Phase start date", "example": "2022-01-01" }, "endDate": { "type": "string", "description": "Phase end date. A null end date denotes an open-ended phase. Only the last phase can be open-ended.", "example": "2022-12-01" }, "discounts": { "type": "array", "description": "Discounts applicable to this phase", "example": [], "items": {} }, "minimums": { "type": "array", "description": "Minimums applicable to this phase", "example": [], "items": {} }, "creditGrants": { "type": "array", "description": "Credit grants applicable to this phase. Omit this field on every phase to leave the schedule's existing grants untouched. Once any phase provides it, the grants across all phases are the schedule's full grant spec: grants without an ID are created, grants re-sent with their ID are kept, and grants left out are removed. Grants cannot be updated through this request, and a grant that has already been drawn down cannot be removed this way — delete it through the credit grant endpoint instead.", "example": [ { "id": "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "items": { "$ref": "#/components/schemas/EmbeddableCreditGrantRequest" } }, "listPriceIds": { "type": "array", "description": "IDs of list prices from which to create prices for this phase", "example": [ "b4d7e884-e007-4183-8355-4771865c5100" ], "items": { "type": "string" } }, "recurrencePreference": { "description": "Phase recurrence preference", "$ref": "#/components/schemas/PhaseRecurrencePreference" }, "phasePriceMetadata": { "type": "array", "description": "Additional metadata for the relationship between this phase and each price", "example": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "items": { "$ref": "#/components/schemas/PhasePriceMetadata" } }, "phaseListPriceMetadata": { "type": "array", "description": "Additional metadata for the relationship between this phase and each list price", "example": [ { "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "arrCalculation": "INCLUDE" } ], "items": { "$ref": "#/components/schemas/PhaseListPriceMetadata" } } } }, "EmbeddableCreditGrantRequest": { "required": [ "amount", "creditUnitType", "grantRefreshFrequency", "name", "rolloverMode" ], "type": "object", "example": { "id": "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] }, "properties": { "id": { "type": "string", "description": "ID of an existing credit grant on this billing schedule. Omit to create a new grant. When present, the grant is kept as-is — credit grants cannot be updated through a billing schedule edit.", "example": "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40" }, "name": { "type": "string", "description": "Name of the credit grant.", "example": "Monthly usage credits" }, "creditUnitType": { "description": "Type of the unit of credit.", "$ref": "#/components/schemas/CreditUnitType" }, "currency": { "description": "Currency of cash credit if creditUnitType is CURRENCY.", "$ref": "#/components/schemas/Currency" }, "amount": { "type": "number", "description": "Amount of units granted.", "example": 100 }, "costOfCredit": { "type": "number", "description": "Cost of credit grant.", "example": 0 }, "taxRateId": { "type": "string", "description": "Tax rate ID for the credit grant.", "example": "179d1ab3-cc96-48e2-9310-067b0b42d47c" }, "grantRefreshFrequency": { "description": "How often the credit grant refreshes its balance.", "$ref": "#/components/schemas/GrantRefreshFrequency" }, "rolloverMode": { "description": "Whether unused balance carries over when the grant refreshes.", "$ref": "#/components/schemas/RolloverMode" }, "restrictToPrices": { "type": "array", "description": "Price IDs the grant is consumed against. Omit or leave empty to apply to every price in the phase.", "example": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ], "items": { "type": "string" } } } }, "CreditUnitType": { "type": "string", "example": "CURRENCY", "enum": [ "CURRENCY", "METRIC" ] }, "GrantRefreshFrequency": { "type": "string", "example": "MONTHLY", "enum": [ "NONE", "MONTHLY", "QUARTERLY", "YEARLY" ] }, "RolloverMode": { "type": "string", "example": "NONE", "enum": [ "NONE", "ON_GRANT_REFRESH", "ON_GRANT_REFRESH_AND_PHASE" ] }, "PhaseRecurrencePreference": { "type": "string", "example": "CONTINUE_FROM_PREVIOUS_PHASE", "enum": [ "CONTINUE_FROM_PREVIOUS_PHASE", "RESET" ] }, "PhasePriceMetadata": { "required": [ "arrCalculation", "priceId" ], "type": "object", "example": { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" }, "properties": { "priceId": { "type": "string", "example": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" }, "arrCalculation": { "$ref": "#/components/schemas/ArrCalculation" } } }, "ArrCalculation": { "type": "string", "example": "INCLUDE", "enum": [ "INCLUDE", "EXCLUDE" ] }, "PhaseListPriceMetadata": { "required": [ "arrCalculation", "listPriceId" ], "type": "object", "example": { "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "arrCalculation": "INCLUDE" }, "properties": { "listPriceId": { "type": "string", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "arrCalculation": { "$ref": "#/components/schemas/ArrCalculation" } } }, "BillingScheduleResponse": { "required": [ "attachmentAssets", "autoIssueInvoices", "createdAt", "customFields", "customerId", "id", "integrationIds", "phases", "prices", "rollUpBilling", "startDate", "status", "updatedAt" ], "type": "object", "example": { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true }, "properties": { "id": { "type": "string", "description": "Billing Schedule ID", "example": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b" }, "customerId": { "type": "string", "description": "Customer ID", "example": "cca32597-b6b0-4499-9669-128aef8702e4" }, "status": { "description": "Billing schedule status", "$ref": "#/components/schemas/ApiBillingScheduleStatus" }, "startDate": { "type": "string", "description": "Start date", "example": "2022-01-01" }, "endDate": { "type": "string", "description": "End date", "example": "2022-12-01" }, "taxRates": { "type": "array", "description": "Tax Rate for each Product", "example": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "items": { "$ref": "#/components/schemas/ProductTaxRateRepresentation" } }, "firstBillingDate": { "type": "string", "description": "First billing date", "example": "2022-02-02" }, "autoIssueInvoices": { "type": "boolean", "description": "If true, invoices will be automatically sent for this billing schedule", "example": false }, "purchaseOrderNumber": { "type": "string", "description": "Optional purchase order number to be added to invoices", "example": "PO123" }, "reference": { "type": "string", "description": "Optional reference to be added to invoices", "example": "ref" }, "label": { "type": "string", "description": "Optional label", "example": "label" }, "recurrenceDayOfMonth": { "type": "integer", "description": "The day of the month on which billing recurs", "format": "int32", "example": 1 }, "prices": { "type": "array", "description": "Prices", "example": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "items": { "$ref": "#/components/schemas/PriceResponse" } }, "createdAt": { "type": "string", "description": "Time at which the schedule was initially created, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time at which the schedule was last updated, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "lastInvoiceId": { "type": "string", "description": "ID of the last invoice (if there has been one)", "example": "bdbf78a5-b007-4d46-aa7d-d0417a649d64" }, "phases": { "type": "array", "description": "Phases", "example": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "items": { "$ref": "#/components/schemas/Phase" } }, "archivedAt": { "type": "string", "description": "Time at which the schedule was archived, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "rollUpBilling": { "type": "boolean", "description": "Roll up billing", "example": false }, "integrationIds": { "type": "array", "description": "External services which are linked to this customer", "example": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "attachmentAssets": { "type": "array", "description": "Assets attached to this billing schedule", "example": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "items": { "$ref": "#/components/schemas/AssetResponse" } }, "contractId": { "type": "string", "description": "Optional ID of the contract used to create this billing schedule", "example": "0194d091-f65b-7b98-b75f-a923aa0f5b1a" }, "defaultDueDateDays": { "type": "integer", "description": "Default number of days between invoice issue date and due date", "example": 30 }, "memo": { "type": "string", "description": "Billing schedule memo", "example": "Example Billing Schedule" }, "customFields": { "type": "object", "description": "Custom key-value fields for this billing schedule", "example": { "key": "value" }, "additionalProperties": { "type": "string" } }, "paymentProvider": { "description": "Payment provider configured for collecting invoices on this billing schedule", "$ref": "#/components/schemas/PaymentProvider" }, "autoCharge": { "type": "boolean", "description": "Whether invoices for this billing schedule are automatically charged. Only returned when paymentProvider is STRIPE", "example": true } } }, "ApiBillingScheduleStatus": { "type": "string", "example": "ACTIVE", "enum": [ "DRAFT", "PENDING", "ACTIVE", "SUSPENDED", "CANCELLED", "COMPLETED" ] }, "PriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ], "type": "object", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" }, "properties": { "id": { "type": "string", "description": "Unique Price ID, generated by Sequence on creation.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "f409d651-c475-4142-aafd-a5d2bd74d4f9" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "oneOf": [ { "$ref": "#/components/schemas/GraduatedPricingStructure1" }, { "$ref": "#/components/schemas/VolumePricingStructure1" }, { "$ref": "#/components/schemas/SeatBasedPricingStructure1" }, { "$ref": "#/components/schemas/PackagePricingStructure1" }, { "$ref": "#/components/schemas/LinearPricingStructure1" }, { "$ref": "#/components/schemas/FixedPricingStructure1" }, { "$ref": "#/components/schemas/OneTimePricingStructure1" } ] }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Time at which the Price was initially created, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time at which the Price was last updated, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "usageCalculationPeriod": { "$ref": "#/components/schemas/UsageCalculationPeriod1" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "LinearPricingStructure1": { "required": [ "isPricePercentage", "pricePerUnit", "pricingType", "usageMetricId" ], "type": "object", "description": "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.", "example": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "properties": { "pricePerUnit": { "type": "string", "description": "The per unit rate to apply to usage for this product. In the case of percentage pricing where `isPricePercentage` is set to `true`, a value of 1 represents 100%.", "example": "0.25" }, "usageMetricId": { "type": "string", "description": "Usage metric associated to this pricing structure", "example": "04c62961-04ba-48e6-b985-758bb7d3e712" }, "isPricePercentage": { "type": "boolean", "description": "Indicate whether the price attribute is to be considered as a percentage or an absolute value.", "example": false }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/LinearPricingType" } } }, "PricingType1": { "type": "string", "example": "LINEAR", "enum": [ "ONE_TIME", "FIXED", "LINEAR", "PACKAGE", "GRADUATED", "VOLUME", "SEAT_BASED" ] }, "PriceParameter1": { "required": [ "parameterId", "value" ], "type": "object", "example": { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" }, "properties": { "parameterId": { "type": "string", "description": "Custom metric parameter ID", "example": "94703530-1293-479b-bd37-ccad42fd9c8b" }, "value": { "type": "string", "description": "Parameter value", "example": "10" } } }, "UsageCalculationPeriod1": { "required": [ "frequency", "interval" ], "type": "object", "description": "The period over which usage is aggregated.", "example": { "frequency": "MONTHLY", "interval": 1 }, "properties": { "frequency": { "description": "Frequency determines the time period over which usage is aggregated.", "$ref": "#/components/schemas/UsageCalculationFrequency1" }, "interval": { "type": "integer", "description": "Interval determines the time period over which usage is aggregated. For example, if the frequency is MONTHLY and the interval is 3, the usage is aggregated over 3 months before starting at 0 again.", "format": "int32", "example": 1 } } }, "UsageCalculationFrequency1": { "type": "string", "example": "MONTHLY", "enum": [ "MONTHLY", "QUARTERLY", "HALF_YEARLY", "YEARLY" ] }, "PriceStatus": { "type": "string", "example": "ACTIVE", "enum": [ "DRAFT", "ACTIVE" ] }, "Phase": { "required": [ "billingScheduleId", "createdAt", "creditGrants", "discounts", "id", "minimums", "phasePriceMetadata", "priceIds", "recurrencePreference", "startDate" ], "type": "object", "example": { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] }, "properties": { "id": { "type": "string", "description": "Phase ID", "example": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" }, "name": { "type": "string", "description": "Name", "example": "Onboarding" }, "createdAt": { "type": "string", "description": "Created at", "example": "2022-06-28T16:47:00Z" }, "billingScheduleId": { "type": "string", "description": "Billing Schedule ID", "example": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b" }, "priceIds": { "type": "array", "description": "Price IDs", "example": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "items": { "type": "string" } }, "startDate": { "type": "string", "description": "Start Date", "example": "2022-01-01" }, "endDate": { "type": "string", "description": "End date", "example": "2022-06-30" }, "discounts": { "type": "array", "description": "Discounts in Phase", "example": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "items": { "$ref": "#/components/schemas/EmbeddableDiscount" } }, "minimums": { "type": "array", "example": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "items": { "$ref": "#/components/schemas/Minimum" } }, "creditGrants": { "type": "array", "description": "Credit grants in Phase", "example": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "items": { "$ref": "#/components/schemas/EmbeddableCreditGrant" } }, "recurrencePreference": { "$ref": "#/components/schemas/PhaseRecurrencePreference" }, "phasePriceMetadata": { "type": "array", "description": "Additional metadata for the relationship between this phase and each price", "example": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "items": { "$ref": "#/components/schemas/PhasePriceMetadata" } } } }, "EmbeddableDiscount": { "required": [ "amount", "id", "message", "separateLineItem", "type" ], "type": "object", "example": { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" }, "properties": { "id": { "type": "string", "description": "Discount ID", "example": "4451f62c-0c1f-491c-aeb2-9eb41b28149c" }, "restrictToPrices": { "type": "array", "description": "Price IDs to which this discount applies", "example": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "items": { "type": "string" } }, "type": { "description": "Whether the discount is a nominal or percentage amount", "$ref": "#/components/schemas/DiscountCalculationType" }, "amount": { "type": "number", "description": "The discount amount", "example": 15 }, "message": { "type": "string", "description": "The message to show on an invoice", "example": "15% Discount" }, "separateLineItem": { "type": "boolean", "description": "If true the discount will show as a separate line item on an invoice", "example": true }, "seatDiscountType": { "description": "Determines how the discount is applied to any seat-based prices", "$ref": "#/components/schemas/SeatDiscountType" } } }, "Minimum": { "required": [ "amount", "billingScheduleId", "createdAt", "id", "phaseId", "restrictToPrices", "sequenceAccountId", "updatedAt" ], "type": "object", "example": { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" }, "properties": { "id": { "type": "string", "description": "Minimum ID", "example": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "c4602d51-0fb4-4b48-b689-6ba28f540d1e" }, "billingScheduleId": { "type": "string", "description": "Billing Schedule ID", "example": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b" }, "phaseId": { "type": "string", "description": "Phase ID", "example": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" }, "amount": { "type": "number", "description": "Minimum amount", "example": 100 }, "restrictToPrices": { "type": "array", "description": "Price IDs the minimum is restricted to", "example": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "items": { "type": "string" } }, "createdAt": { "type": "string", "description": "Created at", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Updated at", "example": "2022-06-28T16:47:00Z" } } }, "EmbeddableCreditGrant": { "required": [ "amount", "creditUnitType", "grantRefreshFrequency", "id", "name", "restrictToPrices", "rolloverMode" ], "type": "object", "example": { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] }, "properties": { "id": { "type": "string", "description": "Credit grant ID.", "example": "0199ca8a-e7e8-73b3-bd69-a316a23231a0" }, "name": { "type": "string", "description": "Name of the credit grant.", "example": "Monthly usage credits" }, "creditUnitType": { "description": "Type of the unit of credit.", "$ref": "#/components/schemas/CreditUnitType" }, "currency": { "description": "Currency of cash credit if creditUnitType is CURRENCY.", "$ref": "#/components/schemas/Currency" }, "amount": { "type": "number", "description": "Amount of units granted.", "example": 100 }, "costOfCredit": { "type": "number", "description": "Cost of credit grant.", "example": 0 }, "taxRateId": { "type": "string", "description": "Tax rate ID for the credit grant.", "example": "179d1ab3-cc96-48e2-9310-067b0b42d47c" }, "grantRefreshFrequency": { "description": "How often the credit grant refreshes its balance.", "$ref": "#/components/schemas/GrantRefreshFrequency" }, "rolloverMode": { "description": "Whether unused balance carries over when the grant refreshes.", "$ref": "#/components/schemas/RolloverMode" }, "restrictToPrices": { "type": "array", "description": "Price IDs the grant is consumed against.", "example": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ], "items": { "type": "string" } } } }, "AssetResponse": { "required": [ "createdAt", "createdBy", "fileName", "fileSizeBytes", "format", "id", "type", "url" ], "type": "object", "example": { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "e007e884-5100-4183-8355-4771865cb4dd" }, "createdBy": { "type": "string", "description": "The Sequence user who created this asset", "example": "94703530-1293-479b-bd37-ccad42fd9c8b" }, "type": { "description": "Either image or document", "$ref": "#/components/schemas/AssetType" }, "format": { "description": "Identifies the intended data format. Allowed formats are: jpg, jpeg, png, and pdf", "$ref": "#/components/schemas/AssetFormat" }, "fileName": { "type": "string", "description": "Filename of the uploaded file", "example": "my-image.png" }, "fileSizeBytes": { "type": "integer", "description": "Size of the uploaded file in bytes", "format": "int32", "example": 12345 }, "url": { "type": "string", "description": "URL to download the asset", "example": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png" }, "createdAt": { "type": "string", "description": "Creation timestamp. Formatted as an ISO 8601 timestamp.", "example": "2022-06-28T16:47:00Z" } } }, "AssetType": { "type": "string", "example": "IMAGE", "enum": [ "IMAGE", "DOCUMENT", "BINARY" ] }, "AssetFormat": { "type": "string", "example": "PNG", "enum": [ "JPEG", "JPG", "PNG", "PDF", "CSV", "TXT", "RTF", "MD", "XLS", "XLSX", "XLSM", "DOC", "DOCX", "ZIP", "ODT", "ODS" ] }, "ListBillingProductsResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Fixed priced product", "label": "Fixed priced product - UK", "sequenceAccountId": "683fe518-60c8-429f-9320-8aa7efc20bcc", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "prices": [], "taxCategoryName": "SaaS", "recognitionMethod": "USAGE" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Billing products", "example": [ { "id": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Fixed priced product", "label": "Fixed priced product - UK", "sequenceAccountId": "683fe518-60c8-429f-9320-8aa7efc20bcc", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "prices": [], "taxCategoryName": "SaaS", "recognitionMethod": "USAGE" } ], "items": { "$ref": "#/components/schemas/BillingProduct" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta3" } } }, "BillingProduct": { "required": [ "createdAt", "id", "label", "name", "prices", "recognitionMethod", "sequenceAccountId", "updatedAt" ], "type": "object", "example": { "id": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Fixed priced product", "label": "Fixed priced product - UK", "sequenceAccountId": "683fe518-60c8-429f-9320-8aa7efc20bcc", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "prices": [], "taxCategoryName": "SaaS", "recognitionMethod": "USAGE" }, "properties": { "id": { "type": "string", "description": "Unique Product ID", "example": "f409d651-c475-4142-aafd-a5d2bd74d4f9" }, "name": { "type": "string", "description": "The customer-facing name of this Product", "example": "Fixed priced product" }, "label": { "type": "string", "description": "The internal descriptive name of this item", "example": "Fixed priced product - UK" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "683fe518-60c8-429f-9320-8aa7efc20bcc" }, "createdAt": { "type": "string", "description": "Created at", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Updated At", "example": "2022-06-28T16:47:00Z" }, "prices": { "type": "array", "description": "Prices", "example": [], "items": {} }, "taxCategoryName": { "type": "string", "description": "The tax category associated with the product", "example": "SaaS" }, "recognitionMethod": { "description": "Indication of how revenue is recognised for this product", "$ref": "#/components/schemas/RevenueRecognitionMethod" } } }, "RevenueRecognitionMethod": { "type": "string", "example": "USAGE", "enum": [ "STRAIGHT_LINE", "USAGE", "MILESTONE", "POINT_IN_TIME" ] }, "DuplicateBillingScheduleRequest": { "required": [ "customerId" ], "type": "object", "example": { "customerId": "cca32597-b6b0-4499-9669-128aef8702e4" }, "properties": { "customerId": { "type": "string", "description": "Customer ID", "example": "cca32597-b6b0-4499-9669-128aef8702e4" } } }, "CreateCreditGrantRequest": { "required": [ "amount", "creditUnitType", "currency", "customerId", "name", "sequenceAccountId" ], "type": "object", "example": { "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "Onboarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createInvoice": true }, "properties": { "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "dce9ae85-d8d0-42b4-bcad-f221a64363c6" }, "customerId": { "type": "string", "description": "The ID of the customer credit is granted to", "example": "61b083e0-1faa-47ca-9aeb-6205da8f6c47" }, "name": { "type": "string", "description": "Name of the credit grant", "example": "Onboarding Credits" }, "creditUnitType": { "description": "Type of the unit of credit", "$ref": "#/components/schemas/CreditUnitType" }, "currency": { "description": "Currency of cash credit (if creditUnitType is CURRENCY)", "$ref": "#/components/schemas/Currency" }, "metricId": { "type": "string", "description": "Metric ID (if creditUnitType is METRIC)", "example": "f092246c-6b90-4106-bcca-304ccf06bf45" }, "amount": { "type": "number", "description": "Amount of units granted", "example": 10 }, "costOfCredit": { "type": "number", "description": "Cost of credit grant, to be invoiced to the customer", "example": 10 }, "effectiveDate": { "type": "string", "description": "First day credit grant can be consumed", "example": "2023-01-01" }, "expiryDate": { "type": "string", "description": "Last day credit grant can be consumed", "example": "2023-01-31" }, "createInvoice": { "type": "boolean", "description": "If true we will create an invoice to charge the customer for this grant", "example": true } } }, "CreditGrantResponse": { "required": [ "amount", "createdAt", "creditUnitType", "customerId", "id", "integrationIds", "name", "sequenceAccountId" ], "type": "object", "example": { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "Onboarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] }, "properties": { "id": { "type": "string", "description": "Credit grant ID", "example": "746fc7f2-8098-4fe7-953c-7d51c580a126" }, "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "dce9ae85-d8d0-42b4-bcad-f221a64363c6" }, "customerId": { "type": "string", "description": "The ID of the customer credit is granted to", "example": "61b083e0-1faa-47ca-9aeb-6205da8f6c47" }, "name": { "type": "string", "description": "Name of the credit grant", "example": "Onboarding Credits" }, "creditUnitType": { "description": "Type of the unit of credit", "$ref": "#/components/schemas/CreditUnitType" }, "currency": { "description": "Currency of cash credit (if creditUnitType is CURRENCY)", "$ref": "#/components/schemas/Currency" }, "metricId": { "type": "string", "description": "Metric ID (if creditUnitType is METRIC)", "example": "f092246c-6b90-4106-bcca-304ccf06bf45" }, "amount": { "type": "number", "description": "Amount of units granted", "example": 10 }, "costOfCredit": { "type": "number", "description": "Cost of credit grant, to be invoiced to the customer", "example": 10 }, "effectiveDate": { "type": "string", "description": "First day credit grant can be consumed", "example": "2023-01-01" }, "expiryDate": { "type": "string", "description": "Last day credit grant can be consumed", "example": "2023-01-31" }, "createdAt": { "type": "string", "description": "The creation timestamp", "example": "2022-10-07T14:12:08.826121Z" }, "integrationIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } } } }, "CreditGrantsResponse": { "required": [ "items" ], "type": "object", "example": { "items": [ { "id": "22efb229-c474-407c-bbf7-f5e113ee8b20", "name": "API Calls", "grantAmount": 1000, "balance": 324, "issueDate": "2022-02-22", "expiryDate": "2030-03-03" } ] }, "properties": { "items": { "type": "array", "description": "Credit Grants", "example": [ { "id": "22efb229-c474-407c-bbf7-f5e113ee8b20", "name": "API Calls", "grantAmount": 1000, "balance": 324, "issueDate": "2022-02-22", "expiryDate": "2030-03-03" } ], "items": { "$ref": "#/components/schemas/CreditGrantResponseItem" } } } }, "CreditGrantResponseItem": { "required": [ "balance", "grantAmount", "id", "issueDate", "name" ], "type": "object", "example": { "id": "22efb229-c474-407c-bbf7-f5e113ee8b20", "name": "API Calls", "grantAmount": 1000, "balance": 324, "issueDate": "2022-02-22", "expiryDate": "2030-03-03" }, "properties": { "id": { "type": "string", "description": "Credit Grant ID", "example": "22efb229-c474-407c-bbf7-f5e113ee8b20" }, "name": { "type": "string", "description": "Credit Grant Name", "example": "API Calls" }, "grantAmount": { "type": "number", "description": "Amount of Credits Granted", "example": 1000 }, "balance": { "type": "number", "description": "Amount remaining of Credits Granted", "example": 324 }, "issueDate": { "type": "string", "description": "Grant Issue Date", "example": "2022-02-22" }, "expiryDate": { "type": "string", "description": "Grant Expiry Date", "example": "2030-03-03" } } }, "GraduatedPricingStructure1": { "required": [ "pricingType", "tiers", "usageCalculationMode", "usageMetricId" ], "type": "object", "description": "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.", "example": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "properties": { "tiers": { "type": "array", "description": "A list of contiguous pricing tiers", "example": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "items": { "$ref": "#/components/schemas/GraduatedUsageTier" } }, "usageMetricId": { "type": "string", "description": "The usage metric associated to this pricing structure", "example": "04c62961-04ba-48e6-b985-758bb7d3e712" }, "usageCalculationMode": { "description": "Indicates the scope of usage calculation", "$ref": "#/components/schemas/UsageCalculationMode" }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/GraduatedPricingType" } } }, "GraduatedPriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ], "type": "object", "title": "GraduatedPriceResponse", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" }, "properties": { "id": { "type": "string", "description": "Unique Price ID, generated by Sequence on creation.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/GraduatedPricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Time at which the Price was initially created, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time at which the Price was last updated, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "usageCalculationPeriod": { "$ref": "#/components/schemas/UsageCalculationPeriod1" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "VolumePricingStructure1": { "required": [ "pricingType", "tiers", "usageMetricId" ], "type": "object", "description": "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.", "example": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "properties": { "tiers": { "type": "array", "description": "A list of contiguous pricing tiers", "example": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "items": { "$ref": "#/components/schemas/VolumeUsageTier" } }, "usageMetricId": { "type": "string", "description": "The usage metric associated to this tier", "example": "04c62961-04ba-48e6-b985-758bb7d3e712" }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/VolumePricingType" } } }, "VolumePriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ], "type": "object", "title": "VolumePriceResponse", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "id": { "type": "string", "description": "Unique Price ID, generated by Sequence on creation.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/VolumePricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Time at which the Price was initially created, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time at which the Price was last updated, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "SeatBasedPricingStructure1": { "required": [ "contractedMinimumSeats", "pricePerSeat", "pricingType", "prorationStrategy", "seatMetricId", "tiers" ], "type": "object", "description": "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.", "example": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "properties": { "seatMetricId": { "type": "string", "description": "Seat metric associated to this pricing structure", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "pricePerSeat": { "type": "string", "description": "Price charged per seat per full billing period", "example": "0.25" }, "prorationStrategy": { "description": "The proration strategy to use when calculating the price for a seat. A `USE_MAXIMUM` will not prorate and charge the highest seat balance for the entire billing period, while a PRORATE_INCREMENTS will charge incremental seats from the day they're added", "$ref": "#/components/schemas/SeatProrationStrategy" }, "contractedMinimumSeats": { "type": "integer", "description": "The number of contractually agreed minimum seats", "example": 10 }, "overagesBillingFrequency": { "description": "The frequency with which to charge overages", "$ref": "#/components/schemas/OveragesFrequency" }, "tiers": { "type": "array", "description": "A list of contiguous pricing tiers", "example": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "items": { "$ref": "#/components/schemas/SeatUsageTier" } }, "prorateFlatFees": { "type": "boolean", "description": "If set any flat fees will be pro-rated if the invoice service period length does not match the billing frequency", "example": false }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/SeatBasedPricingType" } } }, "SeatBasedPriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ], "type": "object", "title": "SeatBasedPriceResponse", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "id": { "type": "string", "description": "Unique Price ID, generated by Sequence on creation.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/SeatBasedPricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Time at which the Price was initially created, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time at which the Price was last updated, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "PackagePricingStructure1": { "required": [ "packageSize", "pricePerPackage", "pricingType", "usageMetricId" ], "type": "object", "description": "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.", "example": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "properties": { "packageSize": { "type": "string", "description": "The amount of usage allowed for the price in this structure", "example": "50" }, "pricePerPackage": { "type": "string", "description": "The price charged for each package", "example": "2.00" }, "usageMetricId": { "type": "string", "description": "The usage metric associated to this tier", "example": "04c62961-04ba-48e6-b985-758bb7d3e712" }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/PackagePricingType" } } }, "PackagePriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ], "type": "object", "title": "PackagePriceResponse", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "id": { "type": "string", "description": "Unique Price ID, generated by Sequence on creation.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/PackagePricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Time at which the Price was initially created, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time at which the Price was last updated, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "LinearPriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ], "type": "object", "title": "LinearPriceResponse", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "id": { "type": "string", "description": "Unique Price ID, generated by Sequence on creation.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/LinearPricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Time at which the Price was initially created, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time at which the Price was last updated, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "FixedPricingStructure1": { "required": [ "price", "pricingType" ], "type": "object", "description": "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.", "example": { "price": "20.00", "pricingType": "FIXED" }, "properties": { "price": { "type": "string", "description": "A fixed amount that is charged once every billing period.", "example": "20.00" }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/FixedPricingType" } } }, "FixedPriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ], "type": "object", "title": "FixedPriceResponse", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "id": { "type": "string", "description": "Unique Price ID, generated by Sequence on creation.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/FixedPricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Time at which the Price was initially created, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time at which the Price was last updated, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "OneTimePricingStructure1": { "required": [ "price", "pricingType" ], "type": "object", "description": "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.", "example": { "price": "150.00", "pricingType": "ONE_TIME" }, "properties": { "price": { "type": "string", "description": "A fixed amount that is charged once.", "example": "150.00" }, "pricingType": { "description": "The type of pricing", "$ref": "#/components/schemas/OneTimePricingType" } } }, "OneTimePriceResponse": { "required": [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ], "type": "object", "title": "OneTimePriceResponse", "example": { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "id": { "type": "string", "description": "Unique Price ID, generated by Sequence on creation.", "example": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" }, "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/OneTimePricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "createdAt": { "type": "string", "description": "Time at which the Price was initially created, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Time at which the Price was last updated, in ISO 8601 format.", "example": "2022-06-28T16:47:00Z" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "CreateBillingScheduleRequest": { "required": [ "autoIssueInvoices", "customerId", "isDraft", "phases", "rollUpBilling", "startDate", "taxRates" ], "type": "object", "example": { "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "startDate": "2022-01-01", "endDate": "2022-12-31", "recurrenceDayOfMonth": 1, "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "Example reference", "label": "Example label", "paymentProvider": "STRIPE", "isDraft": true, "rollUpBilling": false, "phases": [ { "name": "Trial Period", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 8, "message": "8% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "creditGrants": [ { "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] }, { "priceIds": [], "startDate": "2022-07-01", "endDate": "2022-12-31", "discounts": [], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] } ], "attachmentAssetIds": [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ], "autoCharge": true, "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" } }, "properties": { "customerId": { "type": "string", "description": "Customer ID", "example": "cca32597-b6b0-4499-9669-128aef8702e4" }, "startDate": { "type": "string", "description": "Start date", "example": "2022-01-01" }, "endDate": { "type": "string", "description": "End date. A null end date denotes an open-ended schedule.", "example": "2022-12-31" }, "recurrenceDayOfMonth": { "type": "integer", "description": "Recurrence day of month", "format": "int32", "example": 1 }, "taxRates": { "type": "array", "description": "Tax Rate for each Product", "example": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "items": { "$ref": "#/components/schemas/ProductTaxRateRepresentation" } }, "autoIssueInvoices": { "type": "boolean", "description": "Auto-issue invoices for this billing schedule", "example": false }, "purchaseOrderNumber": { "type": "string", "description": "Optional purchase order number to be added to invoices", "example": "PO123" }, "reference": { "type": "string", "description": "Optional reference to be added to invoices", "example": "Example reference" }, "label": { "type": "string", "description": "Optional label", "example": "Example label" }, "paymentProvider": { "description": "Payment provider to set up collection for", "$ref": "#/components/schemas/PaymentProvider" }, "isDraft": { "type": "boolean", "description": "Create in draft status", "example": true }, "rollUpBilling": { "type": "boolean", "description": "Toggles Roll-up billing", "example": false }, "phases": { "type": "array", "description": "Phases", "example": [ { "name": "Trial Period", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 8, "message": "8% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "creditGrants": [ { "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] }, { "priceIds": [], "startDate": "2022-07-01", "endDate": "2022-12-31", "discounts": [], "minimums": [ { "restrictToPrices": [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ], "amount": 100 } ], "listPriceIds": [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ], "phaseListPriceMetadata": [ { "listPriceId": "45e16eb7-2170-4632-b04f-9ecd90b85b1e", "arrCalculation": "INCLUDE" } ] } ], "items": { "$ref": "#/components/schemas/PhaseRequest" } }, "attachmentAssetIds": { "type": "array", "description": "IDs of assets that are attached to this schedule", "example": [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ], "items": { "type": "string" } }, "autoCharge": { "type": "boolean", "description": "Automatically collect payments if payment details are available", "example": true }, "defaultDueDateDays": { "type": "integer", "description": "Default number of days between invoice issue date and due date. Overrides any invoice level set default due date", "example": 30 }, "memo": { "type": "string", "description": "Billing schedule memo. Overrides any invoice level set memo", "example": "Example Billing Schedule" }, "customFields": { "type": "object", "description": "Custom key-value fields for this billing schedule", "example": { "key": "value" }, "additionalProperties": { "type": "string" } } } }, "CreditGrant": { "required": [ "amount", "costOfCredit", "createdAt", "creditUnitType", "currency", "customerId", "id", "integrationIds", "name", "sequenceAccountId" ], "type": "object", "example": { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "On-boarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "creditNoteId": "73086198-8752-4ec9-a99b-16209a32dc6c", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] }, "properties": { "id": { "type": "string", "description": "Credit Grant ID", "example": "746fc7f2-8098-4fe7-953c-7d51c580a126" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "dce9ae85-d8d0-42b4-bcad-f221a64363c6" }, "customerId": { "type": "string", "description": "The ID of the Customer Credit is granted to", "example": "61b083e0-1faa-47ca-9aeb-6205da8f6c47" }, "name": { "type": "string", "description": "Name of the Credit Grant", "example": "On-boarding Credits" }, "creditUnitType": { "description": "Type of the Unit of Credit", "$ref": "#/components/schemas/CreditUnitType" }, "currency": { "description": "Currency of Cash Credit (if CreditUnitType is CURRENCY)", "$ref": "#/components/schemas/Currency" }, "metricId": { "type": "string", "description": "Metric ID (if CreditUnitType is METRIC)", "example": "f092246c-6b90-4106-bcca-304ccf06bf45" }, "amount": { "type": "number", "description": "Amount of Units Granted", "example": 10 }, "costOfCredit": { "type": "number", "description": "Cost of Credit Grant, to be Invoiced to the Customer", "example": 10 }, "taxRateId": { "type": "string", "description": "Tax Rate ID for Credit Purchase", "example": "179d1ab3-cc96-48e2-9310-067b0b42d47c" }, "effectiveDate": { "type": "string", "description": "First Day Credit Grant can be consumed", "example": "2023-01-01" }, "expiryDate": { "type": "string", "description": "Last Day Credit Grant can be consumed", "example": "2023-01-31" }, "createdAt": { "type": "string", "description": "The created at", "example": "2022-10-07T14:12:08.826121Z" }, "creditNoteId": { "type": "string", "description": "ID of the credit note that created this grant (if applicable)", "example": "73086198-8752-4ec9-a99b-16209a32dc6c" }, "integrationIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } } } }, "CreditGrantResponse2": { "required": [ "amount", "createdAt", "creditUnitType", "customerId", "id", "integrationIds", "name", "sequenceAccountId" ], "type": "object", "example": { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "Onboarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] }, "properties": { "id": { "type": "string", "description": "Credit grant ID", "example": "746fc7f2-8098-4fe7-953c-7d51c580a126" }, "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "dce9ae85-d8d0-42b4-bcad-f221a64363c6" }, "customerId": { "type": "string", "description": "The ID of the customer credit is granted to", "example": "61b083e0-1faa-47ca-9aeb-6205da8f6c47" }, "name": { "type": "string", "description": "Name of the credit grant", "example": "Onboarding Credits" }, "creditUnitType": { "description": "Type of the unit of credit", "$ref": "#/components/schemas/CreditUnitType" }, "currency": { "description": "Currency of cash credit (if creditUnitType is CURRENCY)", "$ref": "#/components/schemas/Currency" }, "metricId": { "type": "string", "description": "Metric ID (if creditUnitType is METRIC)", "example": "f092246c-6b90-4106-bcca-304ccf06bf45" }, "amount": { "type": "number", "description": "Amount of units granted", "example": 10 }, "costOfCredit": { "type": "number", "description": "Cost of credit grant, to be invoiced to the customer", "example": 10 }, "effectiveDate": { "type": "string", "description": "First day credit grant can be consumed", "example": "2023-01-01" }, "expiryDate": { "type": "string", "description": "Last day credit grant can be consumed", "example": "2023-01-31" }, "createdAt": { "type": "string", "description": "The creation timestamp", "example": "2022-10-07T14:12:08.826121Z" }, "integrationIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ], "items": { "$ref": "#/components/schemas/IntegrationId" } } } }, "CreditBalancesReply": { "required": [ "items" ], "type": "object", "example": { "items": [ { "id": "6587e308-ab0d-4a58-8cc1-1d168490de7b", "type": "CASH", "name": "Credits", "balance": "50", "grants": [ { "id": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "sequenceAccountId": "a507e782-d26b-4d34-92b9-aacd1667e1f0", "customerId": "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb", "type": "CASH", "currency": "GBP", "metricId": "b84f5290-fe95-4c6f-bedc-477700125265", "name": "GBP", "originalAmount": "10", "currentBalance": "1", "expiryDate": "2024-01-02", "costOfCredit": "10", "taxRateId": "b3c37ea3-96bb-44fb-baed-01eb38d3328e", "effectiveDate": "2024-01-01", "createdAt": "2024-01-01T12:00:00Z" } ], "transactions": [ { "id": "c770d296-ef09-459b-b8dd-42c334e00dab", "grantId": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "reason": "because", "invoiceId": "c6864c69-42a3-4966-8c22-1c56d7375a05", "billingRunId": "e95256be-08e7-4585-b3c7-fa9928aacd90", "type": "CREDIT", "amount": "10", "date": "2024-01-01" } ] } ] }, "properties": { "items": { "type": "array", "example": [ { "id": "6587e308-ab0d-4a58-8cc1-1d168490de7b", "type": "CASH", "name": "Credits", "balance": "50", "grants": [ { "id": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "sequenceAccountId": "a507e782-d26b-4d34-92b9-aacd1667e1f0", "customerId": "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb", "type": "CASH", "currency": "GBP", "metricId": "b84f5290-fe95-4c6f-bedc-477700125265", "name": "GBP", "originalAmount": "10", "currentBalance": "1", "expiryDate": "2024-01-02", "costOfCredit": "10", "taxRateId": "b3c37ea3-96bb-44fb-baed-01eb38d3328e", "effectiveDate": "2024-01-01", "createdAt": "2024-01-01T12:00:00Z" } ], "transactions": [ { "id": "c770d296-ef09-459b-b8dd-42c334e00dab", "grantId": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "reason": "because", "invoiceId": "c6864c69-42a3-4966-8c22-1c56d7375a05", "billingRunId": "e95256be-08e7-4585-b3c7-fa9928aacd90", "type": "CREDIT", "amount": "10", "date": "2024-01-01" } ] } ], "items": { "$ref": "#/components/schemas/CreditBalance" } } } }, "CreditBalance": { "required": [ "balance", "grants", "id", "name", "transactions", "type" ], "type": "object", "example": { "id": "6587e308-ab0d-4a58-8cc1-1d168490de7b", "type": "CASH", "name": "Credits", "balance": "50", "grants": [ { "id": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "sequenceAccountId": "a507e782-d26b-4d34-92b9-aacd1667e1f0", "customerId": "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb", "type": "CASH", "currency": "GBP", "metricId": "b84f5290-fe95-4c6f-bedc-477700125265", "name": "GBP", "originalAmount": "10", "currentBalance": "1", "expiryDate": "2024-01-02", "costOfCredit": "10", "taxRateId": "b3c37ea3-96bb-44fb-baed-01eb38d3328e", "effectiveDate": "2024-01-01", "createdAt": "2024-01-01T12:00:00Z" } ], "transactions": [ { "id": "c770d296-ef09-459b-b8dd-42c334e00dab", "grantId": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "reason": "because", "invoiceId": "c6864c69-42a3-4966-8c22-1c56d7375a05", "billingRunId": "e95256be-08e7-4585-b3c7-fa9928aacd90", "type": "CREDIT", "amount": "10", "date": "2024-01-01" } ] }, "properties": { "id": { "type": "string", "description": "Indicates the ID of Credit target, either a currency code or a metric id", "example": "6587e308-ab0d-4a58-8cc1-1d168490de7b" }, "type": { "description": "Type of the Credit - will either be CASH or USAGE", "$ref": "#/components/schemas/CreditType" }, "name": { "type": "string", "description": "Name of the Credit - will either be the currency or name of the metric", "example": "Credits" }, "balance": { "type": "string", "description": "Amount remaining of Credits Granted", "example": "50" }, "grants": { "type": "array", "description": "Related credit grants", "example": [ { "id": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "sequenceAccountId": "a507e782-d26b-4d34-92b9-aacd1667e1f0", "customerId": "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb", "type": "CASH", "currency": "GBP", "metricId": "b84f5290-fe95-4c6f-bedc-477700125265", "name": "GBP", "originalAmount": "10", "currentBalance": "1", "expiryDate": "2024-01-02", "costOfCredit": "10", "taxRateId": "b3c37ea3-96bb-44fb-baed-01eb38d3328e", "effectiveDate": "2024-01-01", "createdAt": "2024-01-01T12:00:00Z" } ], "items": { "$ref": "#/components/schemas/CreditGrant2" } }, "transactions": { "type": "array", "description": "Related credit transactions", "example": [ { "id": "c770d296-ef09-459b-b8dd-42c334e00dab", "grantId": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "reason": "because", "invoiceId": "c6864c69-42a3-4966-8c22-1c56d7375a05", "billingRunId": "e95256be-08e7-4585-b3c7-fa9928aacd90", "type": "CREDIT", "amount": "10", "date": "2024-01-01" } ], "items": { "$ref": "#/components/schemas/CreditTransaction" } } } }, "CreditType": { "type": "string", "example": "CASH", "enum": [ "CASH", "USAGE" ] }, "CreditGrant2": { "required": [ "costOfCredit", "createdAt", "currency", "currentBalance", "customerId", "id", "name", "originalAmount", "sequenceAccountId", "type" ], "type": "object", "example": { "id": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "sequenceAccountId": "a507e782-d26b-4d34-92b9-aacd1667e1f0", "customerId": "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb", "type": "CASH", "currency": "GBP", "metricId": "b84f5290-fe95-4c6f-bedc-477700125265", "name": "GBP", "originalAmount": "10", "currentBalance": "1", "expiryDate": "2024-01-02", "costOfCredit": "10", "taxRateId": "b3c37ea3-96bb-44fb-baed-01eb38d3328e", "effectiveDate": "2024-01-01", "createdAt": "2024-01-01T12:00:00Z" }, "properties": { "id": { "type": "string", "description": "Credit Grant ID", "example": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6" }, "sequenceAccountId": { "type": "string", "description": "Sequence account ID", "example": "a507e782-d26b-4d34-92b9-aacd1667e1f0" }, "customerId": { "type": "string", "description": "Customer ID", "example": "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb" }, "type": { "description": "Type of the Credit - will either be CASH or USAGE", "$ref": "#/components/schemas/CreditType" }, "currency": { "description": "Currency", "$ref": "#/components/schemas/Currency" }, "metricId": { "type": "string", "description": "Usage metric ID (if type is USAGE)", "example": "b84f5290-fe95-4c6f-bedc-477700125265" }, "name": { "type": "string", "description": "Name of the Credit - will either be the currency or name of the metric", "example": "GBP" }, "originalAmount": { "type": "string", "description": "Amount of credits originally granted", "example": "10" }, "currentBalance": { "type": "string", "description": "Amount remaining of Credits Granted", "example": "1" }, "expiryDate": { "type": "string", "description": "Last Day Credit Grant can be consumed", "example": "2024-01-02" }, "costOfCredit": { "type": "string", "description": "Cost of credit grant", "example": "10" }, "taxRateId": { "type": "string", "description": "Tax Rate ID for Credit Purchase", "example": "b3c37ea3-96bb-44fb-baed-01eb38d3328e" }, "effectiveDate": { "type": "string", "description": "First Day Credit Grant can be consumed", "example": "2024-01-01" }, "createdAt": { "type": "string", "description": "The created at", "example": "2024-01-01T12:00:00Z" } } }, "CreditTransaction": { "required": [ "amount", "date", "grantId", "type" ], "type": "object", "example": { "id": "c770d296-ef09-459b-b8dd-42c334e00dab", "grantId": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6", "reason": "because", "invoiceId": "c6864c69-42a3-4966-8c22-1c56d7375a05", "billingRunId": "e95256be-08e7-4585-b3c7-fa9928aacd90", "type": "CREDIT", "amount": "10", "date": "2024-01-01" }, "properties": { "id": { "type": "string", "description": "Credit Transaction ID", "example": "c770d296-ef09-459b-b8dd-42c334e00dab" }, "grantId": { "type": "string", "description": "Credit Grant ID", "example": "5a0faea3-7ad5-4a83-a420-09bb6576f7e6" }, "reason": { "type": "string", "description": "Transaction Reason", "example": "because" }, "invoiceId": { "type": "string", "description": "Invoice ID where Credit was consumed", "example": "c6864c69-42a3-4966-8c22-1c56d7375a05" }, "billingRunId": { "type": "string", "description": "Billing Run ID where Credit was consumed", "example": "e95256be-08e7-4585-b3c7-fa9928aacd90" }, "type": { "description": "Credit Transaction Type", "$ref": "#/components/schemas/CreditTransactionType" }, "amount": { "type": "string", "description": "Number of units added or consumed", "example": "10" }, "date": { "type": "string", "description": "Date of transaction", "example": "2024-01-01" } } }, "CreditTransactionType": { "type": "string", "example": "CREDIT", "enum": [ "DEBIT", "CREDIT" ] }, "ListBillingScheduleCustomFieldKeysResponse": { "required": [ "items" ], "type": "object", "example": { "items": [ "department", "region" ] }, "properties": { "items": { "type": "array", "description": "Distinct custom field keys across all billing schedules", "example": [ "department", "region" ], "items": { "type": "string" } } } }, "UpdateDiscountRequest": { "required": [ "amount", "billingScheduleId", "discountCalculationType", "message", "priceIds", "separateLineItem" ], "type": "object", "example": { "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "priceIds": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "separateLineItem": false, "amount": 25, "discountCalculationType": "PERCENTAGE", "message": "Loyalty Discount", "validFrom": "2023-01-01", "validTo": "2023-01-31" }, "properties": { "billingScheduleId": { "type": "string", "description": "Billing Schedule ID", "example": "08a76ddb-230e-4700-a5e2-70f6edaf7d50" }, "priceIds": { "type": "array", "description": "Price IDs this discount applies to. If not populated, the discount applies to all prices on the billing schedule", "example": [ "e007e884-5100-4183-8355-4771865cb4d7" ], "items": { "type": "string" } }, "separateLineItem": { "type": "boolean", "description": "Indicates whether the discount should appear as a separate line item in the invoice", "example": false }, "amount": { "type": "number", "description": "Amount to be reduced", "example": 25 }, "discountCalculationType": { "description": "Indicates whether the discount amount is percentage or nominal", "$ref": "#/components/schemas/DiscountCalculationType" }, "message": { "type": "string", "description": "Message to appear on the Invoice", "example": "Loyalty Discount" }, "validFrom": { "type": "string", "description": "First Day Discount is Valid", "example": "2023-01-01" }, "validTo": { "type": "string", "description": "Last Day Discount is Valid", "example": "2023-01-31" } } }, "ListCreditGrantsResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "On-boarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "creditNoteId": "73086198-8752-4ec9-a99b-16209a32dc6c", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Credit grants", "example": [ { "id": "746fc7f2-8098-4fe7-953c-7d51c580a126", "sequenceAccountId": "dce9ae85-d8d0-42b4-bcad-f221a64363c6", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "name": "On-boarding Credits", "creditUnitType": "CURRENCY", "currency": "GBP", "metricId": "f092246c-6b90-4106-bcca-304ccf06bf45", "amount": 10, "costOfCredit": 10, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "effectiveDate": "2023-01-01", "expiryDate": "2023-01-31", "createdAt": "2022-10-07T14:12:08.826121Z", "creditNoteId": "73086198-8752-4ec9-a99b-16209a32dc6c", "integrationIds": [ { "service": "Xero", "id": "74ed2615-4730-49ab-9445-74f31723a206", "isPending": false } ] } ], "items": { "$ref": "#/components/schemas/CreditGrant" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta3" } } }, "GraduatedPriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ], "type": "object", "title": "GraduatedPriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" }, "properties": { "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/GraduatedPricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "usageCalculationPeriod": { "$ref": "#/components/schemas/UsageCalculationPeriod1" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "VolumePriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ], "type": "object", "title": "VolumePriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" }, { "price": "0.75", "fee": "25.00", "isPricePercentage": true, "maxPrice": "10", "minPrice": "5" } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "VOLUME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/VolumePricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "SeatBasedPriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ], "type": "object", "title": "SeatBasedPriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "pricePerSeat": "0.25", "prorationStrategy": "USE_MAXIMUM", "contractedMinimumSeats": 10, "overagesBillingFrequency": "YEARLY", "tiers": [ { "upperBound": "100", "price": "1.00", "fee": "50.00" }, { "price": "0.75", "fee": "25.00" } ], "prorateFlatFees": false, "pricingType": "SEAT_BASED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/SeatBasedPricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "PackagePriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ], "type": "object", "title": "PackagePriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "packageSize": "50", "pricePerPackage": "2.00", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "pricingType": "PACKAGE" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/PackagePricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "LinearPriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ], "type": "object", "title": "LinearPriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/LinearPricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "FixedPriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ], "type": "object", "title": "FixedPriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "20.00", "pricingType": "FIXED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/FixedPricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "OneTimePriceRequest": { "required": [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ], "type": "object", "title": "OneTimePriceRequest", "example": { "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "price": "150.00", "pricingType": "ONE_TIME" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "integrationIds": [ { "service": "Xero", "id": "123" } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "status": "ACTIVE" }, "properties": { "productId": { "type": "string", "description": "The ID of the Product that this Price is associated with.", "example": "d07037d5-3e31-4c3a-a360-e58555e2bf44" }, "name": { "type": "string", "description": "A short form description of the price, which appears as the title of line items on invoices.", "example": "Demo Product" }, "currency": { "description": "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.", "$ref": "#/components/schemas/Currency" }, "structure": { "$ref": "#/components/schemas/OneTimePricingStructure1" }, "billingFrequency": { "description": "The frequency with which this price is billed.", "$ref": "#/components/schemas/BillingFrequency" }, "billingType": { "description": "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).", "$ref": "#/components/schemas/BillingType" }, "integrationIds": { "type": "array", "description": "Alternate IDs for this Price in third-party integration systems", "example": [ { "service": "Xero", "id": "123" } ], "items": { "$ref": "#/components/schemas/GenerateIntegrationIdRequest" } }, "customMetricParameters": { "type": "array", "description": "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.", "example": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "items": { "$ref": "#/components/schemas/PriceParameter1" } }, "listPriceId": { "type": "string", "description": "The list price ID, if this price variant was created from a list price", "example": "b4d7e884-e007-4183-8355-4771865c5100" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "UpdatePriceRequest": { "required": [ "name" ], "type": "object", "example": { "name": "Demo Product", "status": "ACTIVE" }, "properties": { "name": { "type": "string", "description": "The customer-facing name of this Price", "example": "Demo Product" }, "status": { "description": "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.", "$ref": "#/components/schemas/PriceStatus" } } }, "ListBillingSchedulesResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Billing Schedules", "example": [ { "id": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "customerId": "cca32597-b6b0-4499-9669-128aef8702e4", "status": "ACTIVE", "startDate": "2022-01-01", "endDate": "2022-12-01", "taxRates": [ { "priceId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "taxRateId": "50c0d53b-8460-41e6-b4e9-a4e157fc1a64" } ], "firstBillingDate": "2022-02-02", "autoIssueInvoices": false, "purchaseOrderNumber": "PO123", "reference": "ref", "label": "label", "recurrenceDayOfMonth": 1, "prices": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "f409d651-c475-4142-aafd-a5d2bd74d4f9", "name": "Demo Product", "currency": "GBP", "structure": { "pricePerUnit": "0.25", "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "isPricePercentage": false, "pricingType": "LINEAR" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "lastInvoiceId": "bdbf78a5-b007-4d46-aa7d-d0417a649d64", "phases": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "name": "Onboarding", "createdAt": "2022-06-28T16:47:00Z", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "priceIds": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "startDate": "2022-01-01", "endDate": "2022-06-30", "discounts": [ { "id": "4451f62c-0c1f-491c-aeb2-9eb41b28149c", "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "type": "PERCENTAGE", "amount": 15, "message": "15% Discount", "separateLineItem": true, "seatDiscountType": "ALL_SEATS" } ], "minimums": [ { "id": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "billingScheduleId": "b102e007-f5d7-4b1a-8a1d-9a51135ae73b", "phaseId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "amount": 100, "restrictToPrices": [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ], "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z" } ], "creditGrants": [ { "id": "0199ca8a-e7e8-73b3-bd69-a316a23231a0", "name": "Monthly usage credits", "creditUnitType": "CURRENCY", "currency": "GBP", "amount": 100, "costOfCredit": 0, "taxRateId": "179d1ab3-cc96-48e2-9310-067b0b42d47c", "grantRefreshFrequency": "MONTHLY", "rolloverMode": "NONE", "restrictToPrices": [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ] } ], "recurrencePreference": "CONTINUE_FROM_PREVIOUS_PHASE", "phasePriceMetadata": [ { "priceId": "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8", "arrCalculation": "INCLUDE" } ] } ], "archivedAt": "2022-06-28T16:47:00Z", "rollUpBilling": false, "integrationIds": [ { "service": "Salesforce", "id": "a0CQy00000Ipz5VMAR", "lastSynced": "2024-08-14T17:14:17Z", "url": "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view", "isPending": false } ], "attachmentAssets": [ { "id": "e007e884-5100-4183-8355-4771865cb4dd", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "IMAGE", "format": "PNG", "fileName": "my-image.png", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png", "createdAt": "2022-06-28T16:47:00Z" } ], "contractId": "0194d091-f65b-7b98-b75f-a923aa0f5b1a", "defaultDueDateDays": 30, "memo": "Example Billing Schedule", "customFields": { "key": "value" }, "paymentProvider": "STRIPE", "autoCharge": true } ], "items": { "$ref": "#/components/schemas/BillingScheduleResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta3" } } }, "PriceResponsePaginatedPriceResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Prices", "example": [ { "id": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730", "productId": "d07037d5-3e31-4c3a-a360-e58555e2bf44", "name": "Demo Product", "currency": "GBP", "structure": { "tiers": [ { "upperBound": "200", "price": "1.00", "fee": "50.00", "isPricePercentage": false }, { "upperBound": "400", "price": "0.75", "fee": "25.00", "isPricePercentage": false }, { "price": "0.50", "fee": "0.00", "isPricePercentage": false } ], "usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712", "usageCalculationMode": "BILLING_PERIOD", "pricingType": "GRADUATED" }, "billingFrequency": "MONTHLY", "billingType": "IN_ARREARS", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "integrationIds": [ { "service": "Xero", "id": "123", "isPending": false } ], "customMetricParameters": [ { "parameterId": "94703530-1293-479b-bd37-ccad42fd9c8b", "value": "10" } ], "listPriceId": "b4d7e884-e007-4183-8355-4771865c5100", "usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }, "status": "ACTIVE" } ], "items": { "$ref": "#/components/schemas/PriceResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta3" } } }, "ListQuoteEndpointListQuotePaginatedResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "678ca125-8bc3-478f-9a96-6ba73605cf1e", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "customerId": "377bf97b-ca1d-4538-be06-4022afa6bde3", "quoteNumber": "Q00001", "title": "My quote", "currency": "GBP", "status": "DRAFT", "dealType": "NEW_BUSINESS", "preliminaryBillingStartDate": "2022-10-01", "expiresAt": "2022-10-01", "publishedAt": "2022-06-28T16:47:00Z", "acceptedAt": "2022-06-28T16:47:00Z", "executedAt": "2022-06-28T16:47:00Z", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "expiryDays": 30, "archivedAt": "2022-06-28T16:47:00Z", "isExpired": true } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Quotes", "example": [ { "id": "678ca125-8bc3-478f-9a96-6ba73605cf1e", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "customerId": "377bf97b-ca1d-4538-be06-4022afa6bde3", "quoteNumber": "Q00001", "title": "My quote", "currency": "GBP", "status": "DRAFT", "dealType": "NEW_BUSINESS", "preliminaryBillingStartDate": "2022-10-01", "expiresAt": "2022-10-01", "publishedAt": "2022-06-28T16:47:00Z", "acceptedAt": "2022-06-28T16:47:00Z", "executedAt": "2022-06-28T16:47:00Z", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "expiryDays": 30, "archivedAt": "2022-06-28T16:47:00Z", "isExpired": true } ], "items": { "$ref": "#/components/schemas/ListQuoteEndpointListQuoteResponseModel" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta4" } } }, "ListQuoteEndpointListQuoteResponseModel": { "required": [ "createdAt", "createdBy", "id", "isExpired", "quoteNumber", "status", "updatedAt" ], "type": "object", "example": { "id": "678ca125-8bc3-478f-9a96-6ba73605cf1e", "createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da", "customerId": "377bf97b-ca1d-4538-be06-4022afa6bde3", "quoteNumber": "Q00001", "title": "My quote", "currency": "GBP", "status": "DRAFT", "dealType": "NEW_BUSINESS", "preliminaryBillingStartDate": "2022-10-01", "expiresAt": "2022-10-01", "publishedAt": "2022-06-28T16:47:00Z", "acceptedAt": "2022-06-28T16:47:00Z", "executedAt": "2022-06-28T16:47:00Z", "createdAt": "2022-06-28T16:47:00Z", "updatedAt": "2022-06-28T16:47:00Z", "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50", "expiryDays": 30, "archivedAt": "2022-06-28T16:47:00Z", "isExpired": true }, "properties": { "id": { "type": "string", "description": "Quote ID", "example": "678ca125-8bc3-478f-9a96-6ba73605cf1e" }, "createdBy": { "type": "string", "description": "The Sequence User to which this Quote belongs", "example": "4ffd439e-32e5-4046-bb40-3cb81f40e5da" }, "customerId": { "type": "string", "description": "Customer ID", "example": "377bf97b-ca1d-4538-be06-4022afa6bde3" }, "quoteNumber": { "type": "string", "description": "An alpha-numeric value that identifies the quote. Leave blank for an auto-generated incrementing quote number.", "example": "Q00001" }, "title": { "type": "string", "description": "The quote title", "example": "My quote" }, "currency": { "description": "Quote currency", "$ref": "#/components/schemas/Currency" }, "status": { "description": "The status of the quote", "$ref": "#/components/schemas/QuoteStatus" }, "dealType": { "description": "Quote deal type", "$ref": "#/components/schemas/QuoteDealType" }, "preliminaryBillingStartDate": { "type": "string", "description": "Preliminary start date of contract", "example": "2022-10-01" }, "expiresAt": { "type": "string", "description": "Date when quote expires", "example": "2022-10-01" }, "publishedAt": { "type": "string", "description": "Date when quote was published", "example": "2022-06-28T16:47:00Z" }, "acceptedAt": { "type": "string", "description": "Date when quote was accepted", "example": "2022-06-28T16:47:00Z" }, "executedAt": { "type": "string", "description": "Date when quote was executed", "example": "2022-06-28T16:47:00Z" }, "createdAt": { "type": "string", "description": "Created at", "example": "2022-06-28T16:47:00Z" }, "updatedAt": { "type": "string", "description": "Updated at", "example": "2022-06-28T16:47:00Z" }, "billingScheduleId": { "type": "string", "description": "Billing schedule ID associated with this quote, if executed", "example": "08a76ddb-230e-4700-a5e2-70f6edaf7d50" }, "expiryDays": { "type": "integer", "description": "Number of days after publishing in which quote will expire", "format": "int32", "example": 30 }, "archivedAt": { "type": "string", "description": "Date and time the quote was archived", "example": "2022-06-28T16:47:00Z" }, "isExpired": { "type": "boolean", "description": "True if the quote expiry date has passed", "example": true } } }, "QuoteStatus": { "type": "string", "example": "DRAFT", "enum": [ "DRAFT", "PUBLISHED", "PREPARING_SIGNATURE_REQUEST", "READY_TO_SIGN", "ACCEPTED", "EXECUTED" ] }, "QuoteDealType": { "type": "string", "example": "NEW_BUSINESS", "enum": [ "NEW_BUSINESS", "RENEWAL" ] }, "PaginationMeta4": { "type": "object", "description": "Results pagination", "example": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 }, "properties": { "after": { "type": "string", "description": "Cursor for the page after this (if it exists)", "example": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3" }, "before": { "type": "string", "description": "Cursor for the page before this (if it exists)", "example": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz" }, "totalResultSize": { "type": "integer", "description": "Total number of entries across all pages", "format": "int64", "example": 10 } } }, "GetQuoteViewTrackingResponse": { "required": [ "totalViews", "uniqueViewers", "viewsByDay" ], "type": "object", "example": { "totalViews": 42, "uniqueViewers": [ { "visitorIdentifier": "0190dae7-7228-7619-aad8-c51f56733b2b", "lastViewedAt": "2024-01-07T10:30:00Z", "loginType": "SEQUENCE_USER", "email": "johndoe@example.com" } ], "viewsByDay": [ { "date": "2024-01-07", "totalViews": 15 } ] }, "properties": { "totalViews": { "type": "integer", "format": "int32", "example": 42 }, "uniqueViewers": { "type": "array", "example": [ { "visitorIdentifier": "0190dae7-7228-7619-aad8-c51f56733b2b", "lastViewedAt": "2024-01-07T10:30:00Z", "loginType": "SEQUENCE_USER", "email": "johndoe@example.com" } ], "items": { "$ref": "#/components/schemas/UniqueViewerResponse" } }, "viewsByDay": { "type": "array", "example": [ { "date": "2024-01-07", "totalViews": 15 } ], "items": { "$ref": "#/components/schemas/DailyQuoteViewTotalResponse" } } } }, "UniqueViewerResponse": { "required": [ "lastViewedAt", "loginType", "visitorIdentifier" ], "type": "object", "example": { "visitorIdentifier": "0190dae7-7228-7619-aad8-c51f56733b2b", "lastViewedAt": "2024-01-07T10:30:00Z", "loginType": "SEQUENCE_USER", "email": "johndoe@example.com" }, "properties": { "visitorIdentifier": { "type": "string", "example": "0190dae7-7228-7619-aad8-c51f56733b2b" }, "lastViewedAt": { "type": "string", "example": "2024-01-07T10:30:00Z" }, "loginType": { "type": "string", "example": "SEQUENCE_USER" }, "email": { "type": "string", "example": "johndoe@example.com" } } }, "DailyQuoteViewTotalResponse": { "required": [ "date", "totalViews" ], "type": "object", "example": { "date": "2024-01-07", "totalViews": 15 }, "properties": { "date": { "type": "string", "example": "2024-01-07" }, "totalViews": { "type": "integer", "format": "int32", "example": 15 } } }, "InvoiceResponse": { "required": [ "accountingDate", "appliedCreditGrants", "appliedCreditNotes", "createdAt", "creditNoteIds", "currency", "customerBillingAddress", "customerEmails", "customerId", "customerLegalCompanyName", "customerShippingAddress", "dueDateSource", "grossTotal", "id", "integrationPaymentStatuses", "isCustomerArchived", "linkedServices", "metadata", "netTotal", "paymentAllocations", "paymentStatus", "renderSettings", "sequenceAccountId", "status", "totalTax", "updatedAt" ], "type": "object", "example": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingRunId": "9c5fdd27-1f7a-41e7-ab67-14f65272a853", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "updatedAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "attachmentAssets": [ { "id": "4b36a61e-425e-4640-aa26-6224c577b613", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "DOCUMENT", "format": "PDF", "fileName": "my-document.pdf", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf", "createdAt": "2022-06-28T16:47:00Z" } ], "balance": "1000.00", "balanceVersion": 0, "integrationPaymentStatuses": { "stripe": "IN_PROGRESS", "goCardless": "CANCELLED" }, "appliedCreditNotes": [ { "id": "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b", "creditNoteNumber": "CN00001", "netTotal": "41.67", "totalTax": "8.33", "grossTotal": "50.00", "lineItems": [ { "name": "Adjustment", "netTotal": "41.67", "grossTotal": "50.00", "invoiceLineItemIds": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ] } ] } ], "appliedCreditGrants": [ { "creditGrantId": "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13", "creditGrantName": "Q3 prepaid credit", "amount": "820.00", "taxAmount": "164.00", "status": "APPLIED" } ], "paymentAllocations": [ { "paymentId": "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e", "amount": "50.00", "allocatedAt": "2022-10-30T00:00:00Z", "paidAt": "2022-10-29T00:00:00Z", "origin": "MANUAL" } ], "paymentTermDays": 30, "dueDateSource": "CALCULATED" }, "properties": { "id": { "type": "string", "description": "Invoice ID", "example": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "68233908-402a-43b4-8952-1c2ab0ef0b25" }, "billingScheduleId": { "type": "string", "description": "Billing Schedule ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "billingRunId": { "type": "string", "description": "Billing Run ID", "example": "9c5fdd27-1f7a-41e7-ab67-14f65272a853" }, "status": { "description": "Invoice status", "$ref": "#/components/schemas/InvoiceStatus" }, "currency": { "description": "Invoice currency", "$ref": "#/components/schemas/Currency" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "INV00001" }, "issueDate": { "type": "string", "description": "Issue date", "example": "2022-09-15" }, "dueDate": { "type": "string", "description": "Due date", "example": "2022-09-30" }, "purchaseOrderNumber": { "type": "string", "description": "Purchase order number", "example": "PO123" }, "reference": { "type": "string", "description": "Reference", "example": "ref" }, "customerEmails": { "type": "array", "description": "Customer email addresses, used for sending the Invoice if provided", "example": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "items": { "type": "string" } }, "customerLegalCompanyName": { "type": "string", "description": "Customer's legal company name", "example": "Facebook" }, "customerBillingAddress": { "$ref": "#/components/schemas/Address1" }, "customerShippingAddress": { "$ref": "#/components/schemas/Address1" }, "memo": { "type": "string", "description": "Invoice memo", "example": "Thanks" }, "paymentOptions": { "type": "array", "description": "Invoice payment options", "example": [ "BANK_TRANSFER" ], "items": { "$ref": "#/components/schemas/InvoicePaymentOption" } }, "billingPeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "customerId": { "type": "string", "description": "The ID of the Customer this invoice is linked to", "example": "61b083e0-1faa-47ca-9aeb-6205da8f6c47" }, "totalTax": { "type": "string", "description": "Total tax, in decimal format of the Invoice's currency", "example": "2.50" }, "netTotal": { "type": "string", "description": "Net total, in decimal format of the Invoice's currency", "example": "51.20" }, "grossTotal": { "type": "string", "description": "Gross total, in decimal format of the Invoice's currency", "example": "101.23" }, "metadata": { "type": "array", "description": "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.", "example": [ { "key": "example-label", "value": "label-value" } ], "items": { "$ref": "#/components/schemas/KeyValuePair" } }, "customerTaxId": { "type": "string", "description": "Customer's tax ID", "example": "TAX123" }, "paymentStatus": { "description": "Invoice payment status", "$ref": "#/components/schemas/InvoicePaymentStatus" }, "createdAt": { "type": "string", "description": "Creation time", "example": "2022-10-30T00:00:00Z" }, "updatedAt": { "type": "string", "description": "Updated time", "example": "2022-10-30T00:00:00Z" }, "creditNoteIds": { "type": "array", "description": "IDs of linked credit notes (if any)", "example": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "items": { "type": "string" } }, "linkedServices": { "type": "array", "description": "External services which are linked to this invoice", "example": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "items": { "$ref": "#/components/schemas/LinkInfo" } }, "merchantDetails": { "$ref": "#/components/schemas/InvoiceMerchantDetails" }, "creditBalances": { "type": "string", "description": "Credit balances", "example": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)" }, "dunningStatus": { "description": "Dunning status", "$ref": "#/components/schemas/InvoiceDunningStatus" }, "accountingDate": { "type": "string", "description": "Accounting date", "example": "2022-09-30" }, "calculatedAt": { "type": "string", "description": "Time this invoice was last calculated (applicable for invoices generated by billing engine only)", "example": "2022-09-30T00:00:00Z" }, "customerTaxStatus": { "description": "Customer tax status", "$ref": "#/components/schemas/TaxStatus" }, "renderSettings": { "$ref": "#/components/schemas/InvoiceRenderSettingsInlineAggregate" }, "isCustomerArchived": { "type": "boolean", "description": "isCustomerArchived", "example": false }, "attachmentAssets": { "type": "array", "description": "Assets attached to this invoice", "example": [ { "id": "4b36a61e-425e-4640-aa26-6224c577b613", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "DOCUMENT", "format": "PDF", "fileName": "my-document.pdf", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf", "createdAt": "2022-06-28T16:47:00Z" } ], "items": { "$ref": "#/components/schemas/AssetResponse1" } }, "balance": { "type": "string", "description": "Outstanding amount owed on this invoice", "example": "1000.00" }, "balanceVersion": { "type": "integer", "description": "Ledger version of the balance. Advances each time the balance changes; null when the invoice has no ledger balance.", "format": "int64", "example": 0 }, "integrationPaymentStatuses": { "$ref": "#/components/schemas/IntegrationPaymentStatuses" }, "appliedCreditNotes": { "type": "array", "description": "Credit notes applied to this invoice, with per-credit-note totals and line items", "example": [ { "id": "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b", "creditNoteNumber": "CN00001", "netTotal": "41.67", "totalTax": "8.33", "grossTotal": "50.00", "lineItems": [ { "name": "Adjustment", "netTotal": "41.67", "grossTotal": "50.00", "invoiceLineItemIds": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ] } ] } ], "items": { "$ref": "#/components/schemas/AppliedCreditNoteResponse" } }, "appliedCreditGrants": { "type": "array", "description": "Credit grants applied to this invoice, with the total credit each grant contributed", "example": [ { "creditGrantId": "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13", "creditGrantName": "Q3 prepaid credit", "amount": "820.00", "taxAmount": "164.00", "status": "APPLIED" } ], "items": { "$ref": "#/components/schemas/AppliedCreditGrantResponse" } }, "paymentAllocations": { "type": "array", "description": "Payments allocated to this invoice, with per-payment amounts and dates", "example": [ { "paymentId": "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e", "amount": "50.00", "allocatedAt": "2022-10-30T00:00:00Z", "paidAt": "2022-10-29T00:00:00Z", "origin": "MANUAL" } ], "items": { "$ref": "#/components/schemas/PaymentAllocationResponse" } }, "paymentTermDays": { "type": "integer", "description": "Payment terms in days. The due date is computed from these terms.", "example": 30 }, "dueDateSource": { "description": "How the due date was determined: MANUAL when set to a fixed date, CALCULATED when computed from payment terms.", "$ref": "#/components/schemas/DueDateSource" } } }, "InvoiceStatus": { "type": "string", "example": "DRAFT", "enum": [ "IN_PROGRESS", "DRAFT", "FINAL", "SENT", "VOIDED" ] }, "Address1": { "required": [ "country", "line1", "postcode", "town" ], "type": "object", "description": "Customer's billing address", "example": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "properties": { "line1": { "type": "string", "description": "Address line 1", "example": "Flat 1" }, "line2": { "type": "string", "description": "Address line 2", "example": "15 Yemen Road" }, "town": { "type": "string", "description": "Town or city", "example": "Yemen" }, "state": { "description": "State or province (required for USA and Canada)", "$ref": "#/components/schemas/State" }, "postcode": { "type": "string", "description": "Postal code", "example": "YE1 2YE" }, "country": { "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))", "$ref": "#/components/schemas/CountryCode2" } } }, "CountryCode2": { "type": "string", "example": "YE", "enum": [ "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "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", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW" ] }, "InvoicePaymentOption": { "type": "string", "example": "BANK_TRANSFER", "enum": [ "BANK_TRANSFER", "LINK" ] }, "InclusiveDateRange": { "required": [ "endInclusive", "start" ], "type": "object", "description": "Billing period", "example": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "properties": { "start": { "type": "string", "description": "Start date, included in the whole range", "example": "2022-10-01" }, "endInclusive": { "type": "string", "description": "End date, included in the whole range", "example": "2022-10-30" } } }, "KeyValuePair": { "required": [ "key", "value" ], "type": "object", "example": { "key": "example-label", "value": "label-value" }, "properties": { "key": { "type": "string", "example": "example-label" }, "value": { "type": "string", "example": "label-value" } } }, "InvoicePaymentStatus": { "type": "string", "example": "UNPAID", "enum": [ "UNPAID", "PARTIALLY_PAID", "PAID", "UNCOLLECTIBLE" ] }, "LinkInfo": { "required": [ "externalId", "externalService", "syncTime" ], "type": "object", "example": { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" }, "properties": { "externalId": { "type": "string", "description": "The ID of the related entity in external system", "example": "123" }, "externalService": { "description": "The connected service", "$ref": "#/components/schemas/IntegrationService" }, "syncTime": { "type": "string", "description": "The time that this was synced from the connected integration", "example": "2022-06-28T16:47:00Z" }, "externalUrl": { "type": "string", "description": "External URL", "example": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } } }, "InvoiceMerchantDetails": { "required": [ "address", "customFields", "email", "includeBeneficiaryAddressInPaymentDetails", "legalCompanyName" ], "type": "object", "description": "Merchant details", "example": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "properties": { "address": { "$ref": "#/components/schemas/Address1" }, "phoneNumber": { "type": "string", "description": "Merchant's phone number", "example": "0800001066" }, "email": { "type": "string", "description": "Merchant's email", "example": "finance@example.com" }, "taxId": { "type": "string", "description": "Merchant's tax ID", "example": "TAX60" }, "iban": { "type": "string", "description": "Merchant's IBAN, for receiving payment by bank transfer", "example": "GB33BUKB20201555555555" }, "ukAccountDetails": { "$ref": "#/components/schemas/SortCodeAccountNumber" }, "usAchDetails": { "$ref": "#/components/schemas/UsAchDestination" }, "usWireDetails": { "$ref": "#/components/schemas/UsWireDestination" }, "caBankAccountDetails": { "$ref": "#/components/schemas/CanadianBankAccountDestination" }, "canadianInternationalDestination": { "$ref": "#/components/schemas/CanadianInternationalDestination" }, "australianDestination": { "$ref": "#/components/schemas/AustralianBankAccountDestination" }, "swedishBankgiroDestination": { "$ref": "#/components/schemas/SwedishBankgiroDestination" }, "logoUrl": { "type": "string", "description": "Merchant's logo image URL", "example": "logo" }, "legalCompanyName": { "type": "string", "description": "Merchant's legal company name", "example": "The Merchant" }, "primaryColour": { "type": "string", "description": "Merchant's primary colour (for invoice rendering)", "example": "#000000" }, "customFields": { "type": "array", "description": "merchantCustomFields", "example": [ { "key": "example-label", "value": "label-value" } ], "items": { "$ref": "#/components/schemas/KeyValuePair" } }, "includeBeneficiaryAddressInPaymentDetails": { "type": "boolean", "description": "Include beneficiary address in payment details on invoice", "example": false } } }, "SortCodeAccountNumber": { "required": [ "accountNumber", "sortCode" ], "type": "object", "description": "Merchant's UK bank account details, for receiving payment by UK bank transfer", "example": { "sortCode": "000000", "accountNumber": "12345678" }, "properties": { "sortCode": { "type": "string", "description": "UK sort code. 6 digits.", "example": "000000" }, "accountNumber": { "type": "string", "description": "UK account number. 8 digits.", "example": "12345678" } } }, "UsAchDestination": { "required": [ "accountName", "accountNumber", "bankName", "bankRoutingNumber" ], "type": "object", "description": "Merchant's US account details, for receiving payment by ACH", "example": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "properties": { "accountNumber": { "type": "string", "example": "12345678" }, "accountName": { "type": "string", "example": "John Doe" }, "bankName": { "type": "string", "example": "Chase" }, "bankRoutingNumber": { "type": "string", "example": "123456789" } } }, "UsWireDestination": { "required": [ "accountName", "accountNumber", "bankAddress", "bankName", "bankRoutingNumber", "swiftCode" ], "type": "object", "description": "Merchant's US account details, for receiving payment by wire transfer", "example": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "properties": { "accountNumber": { "type": "string", "example": "12345678" }, "accountName": { "type": "string", "example": "John Doe" }, "bankName": { "type": "string", "example": "Chase" }, "bankRoutingNumber": { "type": "string", "example": "123456789" }, "swiftCode": { "type": "string", "example": "CHASUS33" }, "bankAddress": { "$ref": "#/components/schemas/Address1" } } }, "CanadianBankAccountDestination": { "required": [ "accountNumber", "institutionNumber", "transitNumber" ], "type": "object", "description": "Merchant's Canadian account details, for receiving payment by Canadian bank transfer", "example": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "properties": { "transitNumber": { "type": "string", "example": "123" }, "institutionNumber": { "type": "string", "example": "12345" }, "accountNumber": { "type": "string", "example": "1234567" } } }, "CanadianInternationalDestination": { "required": [ "accountNumber", "bankAddress", "bankName", "institutionNumber", "legalName", "swiftCode", "transitNumber" ], "type": "object", "description": "Merchant's account details, for receiving payment to a Canadian bank via Wire transfer", "example": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "properties": { "legalName": { "type": "string", "example": "John Doe" }, "accountNumber": { "type": "string", "example": "12345678" }, "transitNumber": { "type": "string", "example": "12345" }, "bankName": { "type": "string", "example": "Chase" }, "bankAddress": { "$ref": "#/components/schemas/Address1" }, "institutionNumber": { "type": "string", "example": "123" }, "swiftCode": { "type": "string", "example": "CHASUS33" }, "intermediaryBank": { "$ref": "#/components/schemas/IntermediaryBank" } } }, "IntermediaryBank": { "required": [ "bankAddress", "bankName", "routingNumber", "swiftCode" ], "type": "object", "example": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" }, "properties": { "bankName": { "type": "string", "example": "Chase" }, "bankAddress": { "$ref": "#/components/schemas/Address1" }, "swiftCode": { "type": "string", "example": "CHASUS33" }, "routingNumber": { "type": "string", "example": "123456789" } } }, "AustralianBankAccountDestination": { "required": [ "accountNumber", "bsb", "legalName", "swiftCode" ], "type": "object", "description": "Merchant's account details, for receiving payment to a Canadian bank via Australian bank transfer", "example": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "properties": { "legalName": { "type": "string", "example": "John Doe" }, "accountNumber": { "type": "string", "example": "12345678" }, "swiftCode": { "type": "string", "example": "CHASUS33" }, "bsb": { "type": "string", "example": "123456" } } }, "SwedishBankgiroDestination": { "required": [ "accountName", "bankgiroNumber" ], "type": "object", "description": "Merchant's Swedish Bankgiro account details, for receiving payment by Swedish Bankgiro", "example": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "properties": { "bankgiroNumber": { "type": "string", "description": "Swedish Bankgiro number. 7-8 digits, formatted as 123-4567 or 1234-5678.", "example": "123-4567" }, "accountName": { "type": "string", "description": "Account holder name", "example": "The Merchant" } } }, "InvoiceDunningStatus": { "type": "string", "example": "SCHEDULED", "enum": [ "SCHEDULED", "OVERDUE_CHECK_SCHEDULED", "COMPLETED", "FAILED", "NOT_REQUIRED" ] }, "InvoiceRenderSettingsInlineAggregate": { "required": [ "paymentLinkDisplay" ], "type": "object", "description": "Settings that control how the invoice is rendered.", "example": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "properties": { "paymentLinkDisplay": { "description": "Payment link display preference. By default, the payment link is shown.", "$ref": "#/components/schemas/PaymentLinkDisplayOption" } } }, "PaymentLinkDisplayOption": { "type": "string", "example": "HIDE_PAYMENT_LINK", "enum": [ "SHOW_PAYMENT_LINK", "HIDE_PAYMENT_LINK" ] }, "AssetResponse1": { "required": [ "createdAt", "createdBy", "fileName", "fileSizeBytes", "format", "id", "type", "url" ], "type": "object", "example": { "id": "4b36a61e-425e-4640-aa26-6224c577b613", "createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b", "type": "DOCUMENT", "format": "PDF", "fileName": "my-document.pdf", "fileSizeBytes": 12345, "url": "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf", "createdAt": "2022-06-28T16:47:00Z" }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "4b36a61e-425e-4640-aa26-6224c577b613" }, "createdBy": { "type": "string", "description": "The Sequence user who created this asset", "example": "94703530-1293-479b-bd37-ccad42fd9c8b" }, "type": { "description": "Either image or document", "$ref": "#/components/schemas/AssetType1" }, "format": { "description": "Identifies the intended data format. Allowed formats are: jpg, jpeg, png, and pdf", "$ref": "#/components/schemas/AssetFormat1" }, "fileName": { "type": "string", "description": "Filename of the uploaded file", "example": "my-document.pdf" }, "fileSizeBytes": { "type": "integer", "description": "Size of the uploaded file in bytes", "format": "int32", "example": 12345 }, "url": { "type": "string", "description": "URL to download the asset", "example": "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf" }, "createdAt": { "type": "string", "description": "Creation timestamp. Formatted as an ISO 8601 timestamp.", "example": "2022-06-28T16:47:00Z" } } }, "AssetType1": { "type": "string", "example": "DOCUMENT", "enum": [ "IMAGE", "DOCUMENT", "BINARY" ] }, "AssetFormat1": { "type": "string", "example": "PDF", "enum": [ "JPEG", "JPG", "PNG", "PDF", "CSV", "TXT", "RTF", "MD", "XLS", "XLSX", "XLSM", "DOC", "DOCX", "ZIP", "ODT", "ODS" ] }, "IntegrationPaymentStatuses": { "type": "object", "description": "Payment or sync status per integration service", "example": { "stripe": "IN_PROGRESS", "goCardless": "CANCELLED" }, "properties": { "stripe": { "description": "Payment status for Stripe integration", "$ref": "#/components/schemas/IntegrationPaymentStatus" }, "goCardless": { "description": "Payment status for GoCardless integration", "$ref": "#/components/schemas/IntegrationPaymentStatus" } } }, "IntegrationPaymentStatus": { "type": "string", "example": "IN_PROGRESS", "enum": [ "PENDING", "IN_PROGRESS", "PAID", "FAILED", "CANCELLED", "REFUNDED" ] }, "AppliedCreditNoteResponse": { "required": [ "grossTotal", "id", "lineItems", "netTotal", "totalTax" ], "type": "object", "example": { "id": "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b", "creditNoteNumber": "CN00001", "netTotal": "41.67", "totalTax": "8.33", "grossTotal": "50.00", "lineItems": [ { "name": "Adjustment", "netTotal": "41.67", "grossTotal": "50.00", "invoiceLineItemIds": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ] } ] }, "properties": { "id": { "type": "string", "description": "The applied credit note's ID", "example": "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b" }, "creditNoteNumber": { "type": "string", "description": "The applied credit note's number", "example": "CN00001" }, "netTotal": { "type": "string", "description": "Net total of the credit note, in decimal format of the Invoice's currency", "example": "41.67" }, "totalTax": { "type": "string", "description": "Total tax of the credit note, in decimal format of the Invoice's currency", "example": "8.33" }, "grossTotal": { "type": "string", "description": "Gross total of the credit note, in decimal format of the Invoice's currency", "example": "50.00" }, "lineItems": { "type": "array", "description": "The applied credit note's line items", "example": [ { "name": "Adjustment", "netTotal": "41.67", "grossTotal": "50.00", "invoiceLineItemIds": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ] } ], "items": { "$ref": "#/components/schemas/AppliedCreditNoteLineItemResponse" } } } }, "AppliedCreditNoteLineItemResponse": { "required": [ "grossTotal", "invoiceLineItemIds", "name", "netTotal" ], "type": "object", "example": { "name": "Adjustment", "netTotal": "41.67", "grossTotal": "50.00", "invoiceLineItemIds": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ] }, "properties": { "name": { "type": "string", "description": "Line item name", "example": "Adjustment" }, "netTotal": { "type": "string", "description": "Net total of the line item, in decimal format of the Invoice's currency", "example": "41.67" }, "grossTotal": { "type": "string", "description": "Gross total of the line item, in decimal format of the Invoice's currency", "example": "50.00" }, "invoiceLineItemIds": { "type": "array", "description": "IDs of the invoice line item(s) to which this credit note line item relates", "example": [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ], "items": { "type": "string" } } } }, "AppliedCreditGrantResponse": { "required": [ "amount", "status" ], "type": "object", "example": { "creditGrantId": "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13", "creditGrantName": "Q3 prepaid credit", "amount": "820.00", "taxAmount": "164.00", "status": "APPLIED" }, "properties": { "creditGrantId": { "type": "string", "description": "The applied credit grant's ID. Null when the grant behind the credit could not be identified.", "example": "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13" }, "creditGrantName": { "type": "string", "description": "The applied credit grant's name. Null when the grant could not be identified or its name could not be read.", "example": "Q3 prepaid credit" }, "amount": { "type": "string", "description": "Credit applied from this grant, in decimal format of the Invoice's currency. Net of tax; tax credited alongside it is reported separately in `taxAmount`.", "example": "820.00" }, "taxAmount": { "type": "string", "description": "Tax credited alongside this grant's net amount, in decimal format of the Invoice's currency. Absent where no tax was credited; treat absent as zero when reconciling.", "example": "164.00" }, "status": { "description": "Whether this credit has been applied to the invoice or is only projected.", "$ref": "#/components/schemas/AppliedCreditGrantStatus" } } }, "AppliedCreditGrantStatus": { "type": "string", "example": "APPLIED", "enum": [ "APPLIED", "PROJECTED" ] }, "PaymentAllocationResponse": { "required": [ "allocatedAt", "amount", "origin", "paidAt", "paymentId" ], "type": "object", "example": { "paymentId": "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e", "amount": "50.00", "allocatedAt": "2022-10-30T00:00:00Z", "paidAt": "2022-10-29T00:00:00Z", "origin": "MANUAL" }, "properties": { "paymentId": { "type": "string", "description": "The ID of the payment allocated to the invoice", "example": "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e" }, "amount": { "type": "string", "description": "Amount allocated to the invoice, in decimal format of the Invoice's currency", "example": "50.00" }, "allocatedAt": { "type": "string", "description": "Time the allocation was recorded", "example": "2022-10-30T00:00:00Z" }, "paidAt": { "type": "string", "description": "Time the payment was made", "example": "2022-10-29T00:00:00Z" }, "origin": { "description": "Where the payment came from: recorded manually, or reported by a payment provider such as Stripe", "$ref": "#/components/schemas/Origin" } } }, "Origin": { "type": "string", "example": "MANUAL", "enum": [ "MANUAL", "STRIPE" ] }, "DueDateSource": { "type": "string", "example": "CALCULATED", "enum": [ "MANUAL", "CALCULATED" ] }, "CreateCreditNoteApplicationEndpointCreateCreditNoteApplicationRequestModel": { "required": [ "amount", "creditNoteBalanceVersion", "creditNoteId", "currency", "invoiceBalanceVersion", "invoiceId" ], "type": "object", "example": { "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "amount": 50, "currency": "USD", "creditNoteBalanceVersion": 3, "invoiceBalanceVersion": 7 }, "properties": { "creditNoteId": { "type": "string", "description": "The Credit Note to draw from", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "invoiceId": { "type": "string", "description": "The Invoice to apply credit to", "example": "61b083e0-1faa-47ca-9aeb-6205da8f6c47" }, "amount": { "type": "number", "description": "Amount to allocate from the Credit Note to the Invoice.", "example": 50 }, "currency": { "description": "Currency of the amount. Must match the Credit Note and Invoice currency.", "$ref": "#/components/schemas/Currency" }, "creditNoteBalanceVersion": { "type": "integer", "description": "Expected current balance version of the Credit Note (for OCC)", "format": "int64", "example": 3 }, "invoiceBalanceVersion": { "type": "integer", "description": "Expected current balance version of the Invoice (for OCC)", "format": "int64", "example": 7 } } }, "CreditNoteApplicationResponse": { "required": [ "amount", "appliedAt", "creditNoteBalance", "creditNoteId", "currency", "invoiceBalance", "invoiceId", "ledgerTransactionId" ], "type": "object", "example": { "ledgerTransactionId": "0192c1b6-7f3a-7000-8000-000000000001", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "amount": 50, "currency": "USD", "appliedAt": "2026-05-28T12:34:56Z", "invoiceBalance": { "value": 150, "currency": "USD", "version": 8 }, "creditNoteBalance": { "value": 50, "currency": "USD", "version": 4 } }, "properties": { "ledgerTransactionId": { "type": "string", "description": "Ledger transaction id that recorded the application", "example": "0192c1b6-7f3a-7000-8000-000000000001" }, "creditNoteId": { "type": "string", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "invoiceId": { "type": "string", "example": "61b083e0-1faa-47ca-9aeb-6205da8f6c47" }, "amount": { "type": "number", "description": "Amount applied", "example": 50 }, "currency": { "$ref": "#/components/schemas/Currency" }, "appliedAt": { "type": "string", "example": "2026-05-28T12:34:56Z" }, "invoiceBalance": { "$ref": "#/components/schemas/BalanceResponse" }, "creditNoteBalance": { "$ref": "#/components/schemas/BalanceResponse" } } }, "BalanceResponse": { "required": [ "currency", "value", "version" ], "type": "object", "example": { "value": 150, "currency": "USD", "version": 8 }, "properties": { "value": { "type": "number", "description": "Balance value", "example": 150 }, "currency": { "description": "Balance currency", "$ref": "#/components/schemas/Currency" }, "version": { "type": "integer", "description": "Balance version for optimistic concurrency control", "format": "int64", "example": 8 } } }, "VersionConflictResponse": { "required": [ "currentCreditNoteBalance", "currentInvoiceBalance", "message" ], "type": "object", "example": { "message": "Balance version mismatch. Re-read current versions and retry.", "currentInvoiceBalance": { "value": 150, "currency": "USD", "version": 8 }, "currentCreditNoteBalance": { "value": 50, "currency": "USD", "version": 4 } }, "properties": { "message": { "type": "string", "description": "Human-readable conflict explanation", "example": "Balance version mismatch. Re-read current versions and retry." }, "currentInvoiceBalance": { "$ref": "#/components/schemas/BalanceResponse" }, "currentCreditNoteBalance": { "$ref": "#/components/schemas/BalanceResponse" } } }, "ListCreditNoteLineItemEndpointProductListCreditNoteLineItemPaginatedResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "CreditNoteLineItems", "example": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } ], "items": { "$ref": "#/components/schemas/ListCreditNoteLineItemEndpointProductListCreditNoteLineItemResponseModel" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta5" } } }, "ListCreditNoteLineItemEndpointProductListCreditNoteLineItemResponseModel": { "required": [ "creditNoteId", "externalIds", "grossTotal", "id", "index", "netTotal", "quantity", "rate", "rateDisplay", "taxRate", "title", "totalTax" ], "type": "object", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "properties": { "id": { "type": "string", "description": "Credit Note Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "creditNoteId": { "type": "string", "description": "Credit Note Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "groupId": { "type": "string", "description": "Credit Note Line Item Group ID", "example": "cd11218d-fa00-4faa-8684-a43113d076a8" }, "lineItemId": { "type": "string", "description": "Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "title": { "type": "string", "description": "Item Title", "example": "Ferraris" }, "description": { "type": "string", "description": "Item Description", "example": "Red" }, "quantity": { "type": "string", "description": "Quantity", "example": "2" }, "rate": { "type": "string", "description": "Rate per Item", "example": "20000.10" }, "taxRate": { "type": "string", "description": "Tax Rate", "example": "0.2" }, "index": { "type": "integer", "description": "Index (for maintaining order)", "example": 2 }, "priceId": { "type": "string", "description": "Price ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "netTotal": { "type": "string", "description": "Net Total", "example": "20000.00" }, "totalTax": { "type": "string", "description": "Total Tax", "example": "2000.00" }, "grossTotal": { "type": "string", "description": "Gross Total", "example": "22000.00" }, "rateDisplay": { "description": "Determines whether rate is displayed as an absolute value or percentage", "$ref": "#/components/schemas/RateDisplay" }, "externalIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "key": "Xero", "value": "123" } ], "items": { "$ref": "#/components/schemas/IntegrationExternalIdentifier" } }, "servicePeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "revenueRecognitionMethod": { "description": "Revenue recognition method. Valid values are: STRAIGHT_LINE, POINT_IN_TIME", "$ref": "#/components/schemas/RevenueRecognitionMethod1" }, "revenueClassification": { "description": "Revenue classification", "$ref": "#/components/schemas/RevenueClassification" }, "productId": { "type": "string", "description": "Product ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } } }, "RateDisplay": { "type": "string", "example": "ABSOLUTE", "enum": [ "ABSOLUTE", "PERCENTAGE" ] }, "IntegrationExternalIdentifier": { "required": [ "key", "value" ], "type": "object", "example": { "key": "Xero", "value": "123" }, "properties": { "key": { "$ref": "#/components/schemas/IntegrationService" }, "value": { "type": "string", "example": "123" } } }, "RevenueRecognitionMethod1": { "type": "string", "example": "STRAIGHT_LINE", "enum": [ "STRAIGHT_LINE", "USAGE", "MILESTONE", "POINT_IN_TIME" ] }, "RevenueClassification": { "type": "string", "example": "EARNED", "enum": [ "PREPAYMENT", "EARNED", "BURNDOWN" ] }, "PaginationMeta5": { "type": "object", "description": "Results pagination", "example": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 }, "properties": { "after": { "type": "string", "description": "Cursor for the page after this (if it exists)", "example": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3" }, "before": { "type": "string", "description": "Cursor for the page before this (if it exists)", "example": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz" }, "totalResultSize": { "type": "integer", "description": "Total number of entries across all pages", "format": "int64", "example": 10 } } }, "Invoice": { "required": [ "accountingDate", "createdAt", "creditNoteIds", "currency", "customerBillingAddress", "customerEmails", "customerId", "customerLegalCompanyName", "customerShippingAddress", "grossTotal", "id", "isCustomerArchived", "linkedServices", "metadata", "netTotal", "paymentStatus", "renderSettings", "sequenceAccountId", "status", "totalTax", "updatedAt" ], "type": "object", "example": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" }, "properties": { "id": { "type": "string", "description": "Invoice ID", "example": "ba37a392-7054-4dae-ab37-6fee9e23fe06" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "af9b5988-1d7b-45f6-a188-326df5e59b24" }, "status": { "description": "Invoice status", "$ref": "#/components/schemas/InvoiceStatus" }, "currency": { "description": "Invoice currency", "$ref": "#/components/schemas/Currency" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "INV2" }, "dueDate": { "type": "string", "description": "Due date", "example": "2022-11-05" }, "purchaseOrderNumber": { "type": "string", "description": "Purchase order number", "example": "PO123" }, "reference": { "type": "string", "description": "Reference", "example": "ref" }, "customerEmails": { "type": "array", "description": "Customer email addresses, used for sending the Invoice if provided", "example": [ "customer@example.com" ], "items": { "type": "string" } }, "customerLegalCompanyName": { "type": "string", "description": "Customer's legal company name", "example": "Facebook" }, "customerBillingAddress": { "$ref": "#/components/schemas/Address1" }, "customerShippingAddress": { "$ref": "#/components/schemas/Address1" }, "memo": { "type": "string", "description": "Invoice memo", "example": "Thanks" }, "paymentOptions": { "type": "array", "description": "Invoice payment options", "example": [ "BANK_TRANSFER" ], "items": { "$ref": "#/components/schemas/InvoicePaymentOption" } }, "billingPeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "customerId": { "type": "string", "description": "The ID of the Customer this invoice is linked to", "example": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a" }, "totalTax": { "type": "string", "description": "Total tax, in decimal format of the Invoice's currency", "example": "2" }, "netTotal": { "type": "string", "description": "Net total, in decimal format of the Invoice's currency", "example": "12" }, "grossTotal": { "type": "string", "description": "Gross total, in decimal format of the Invoice's currency", "example": "10" }, "metadata": { "type": "array", "description": "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.", "example": [ { "key": "example-label", "value": "label-value" } ], "items": { "$ref": "#/components/schemas/KeyValuePair" } }, "paymentStatus": { "description": "Invoice payment status", "$ref": "#/components/schemas/InvoicePaymentStatus" }, "createdAt": { "type": "string", "description": "Creation time", "example": "2022-10-30T00:00:00Z" }, "creditNoteIds": { "type": "array", "description": "IDs of linked credit notes (if any)", "example": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "items": { "type": "string" } }, "linkedServices": { "type": "array", "description": "External services which are linked to this invoice", "example": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "items": { "$ref": "#/components/schemas/LinkInfo" } }, "merchantDetails": { "$ref": "#/components/schemas/InvoiceMerchantDetails" }, "accountingDate": { "type": "string", "description": "Accounting date", "example": "2022-10-05" }, "customerTaxStatus": { "description": "Customer tax status", "$ref": "#/components/schemas/TaxStatus" }, "renderSettings": { "$ref": "#/components/schemas/InvoiceRenderSettingsInlineAggregate" }, "isCustomerArchived": { "type": "boolean", "example": false }, "updatedAt": { "type": "string", "description": "Last updated time", "example": "2022-10-30T00:00:00Z" }, "billingScheduleId": { "type": "string", "description": "Billing Schedule ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "issueDate": { "type": "string", "description": "Issue date", "example": "2022-09-15" }, "customerTaxId": { "type": "string", "description": "Customer's tax ID", "example": "TAX123" }, "creditBalances": { "type": "string", "description": "Credit balances", "example": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)" }, "dunningStatus": { "description": "Dunning status", "$ref": "#/components/schemas/InvoiceDunningStatus" }, "calculatedAt": { "type": "string", "description": "Time this invoice was last calculated (applicable for invoices generated by billing engine only)", "example": "2022-09-30T00:00:00Z" } } }, "GetOrCreateInvoiceRenderSettingsEndpointProductCreateInvoiceRenderSettingsResponseModel": { "required": [ "currencyConversionDisplay", "id", "paymentLinkDisplay" ], "type": "object", "example": { "id": "385f41ab-51f9-49c2-8f25-358545106b88", "paymentLinkDisplay": "SHOW_PAYMENT_LINK", "currencyConversionDisplay": "SHOW_CURRENCY_CONVERSION" }, "properties": { "id": { "type": "string", "description": "Invoice settings ID", "example": "385f41ab-51f9-49c2-8f25-358545106b88" }, "paymentLinkDisplay": { "description": "Payment link display preference. By default, the payment link is shown.", "$ref": "#/components/schemas/PaymentLinkDisplayOption" }, "currencyConversionDisplay": { "description": "Whether invoices show the regulatory conversion of their totals into the customer's local currency. By default, the conversion is shown.", "$ref": "#/components/schemas/CurrencyConversionDisplayOption" } } }, "CurrencyConversionDisplayOption": { "type": "string", "example": "SHOW_CURRENCY_CONVERSION", "enum": [ "SHOW_CURRENCY_CONVERSION", "HIDE_CURRENCY_CONVERSION" ] }, "CreditNote": { "required": [ "currency", "customerBillingAddress", "customerEmails", "customerId", "customerLegalCompanyName", "customerShippingAddress", "grossTotal", "id", "linkedServices", "metadata", "netTotal", "sequenceAccountId", "settings", "status", "totalTax" ], "type": "object", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "FINAL", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" }, "properties": { "id": { "type": "string", "description": "Credit Note ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "68233908-402a-43b4-8952-1c2ab0ef0b25" }, "status": { "description": "Credit Note status", "$ref": "#/components/schemas/CreditNoteStatus" }, "invoiceId": { "type": "string", "description": "Invoice ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "invoiceNumber": { "type": "string", "description": "Invoice Number", "example": "INV00001" }, "billingScheduleId": { "type": "string", "description": "Subscription ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "currency": { "description": "Credit Note currency", "$ref": "#/components/schemas/Currency" }, "issueDate": { "type": "string", "description": "Issue date", "example": "2022-09-15" }, "billingPeriodStart": { "type": "string", "description": "Billing period start", "example": "2022-10-01T00:00:00Z" }, "billingPeriodEnd": { "type": "string", "description": "Billing period end", "example": "2022-10-30T00:00:00Z" }, "creditNoteNumber": { "type": "string", "description": "Credit Note number", "example": "CN00001" }, "purchaseOrderNumber": { "type": "string", "description": "Purchase order number", "example": "PO123" }, "customerId": { "type": "string", "description": "The ID of the Customer this Credit Note is linked to", "example": "61b083e0-1faa-47ca-9aeb-6205da8f6c47" }, "customerEmails": { "type": "array", "description": "Customer's email addresses, used for sending the Credit Note if provided", "example": [ "customer@example.com", "customer.alias@example.com" ], "items": { "type": "string" } }, "customerLegalCompanyName": { "type": "string", "description": "Customer's legal company name", "example": "Facebook" }, "customerBillingAddress": { "$ref": "#/components/schemas/Address1" }, "customerShippingAddress": { "$ref": "#/components/schemas/Address1" }, "memo": { "type": "string", "description": "Credit Note memo", "example": "Thanks" }, "totalTax": { "type": "string", "description": "Total tax, in decimal format of the Credit Note's currency", "example": "2.50" }, "netTotal": { "type": "string", "description": "Net total, in decimal format of the Credit Note's currency", "example": "51.20" }, "grossTotal": { "type": "string", "description": "Gross total, in decimal format of the Invoice's currency", "example": "101.23" }, "metadata": { "type": "array", "description": "Mapping of key-value pairs to attach to the Credit Note. These are not interpreted by Sequence; they are present for your use alone.", "example": [ { "key": "example-label", "value": "label-value" } ], "items": { "$ref": "#/components/schemas/KeyValuePair" } }, "customerTaxId": { "type": "string", "description": "Customer's tax ID", "example": "TAX123" }, "linkedServices": { "type": "array", "description": "External services which are linked to this credit note", "example": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "items": { "$ref": "#/components/schemas/LinkInfo" } }, "applicationStatus": { "description": "Application status derived from the ledger account balance. Omitted for credit notes that are not in a terminal status", "$ref": "#/components/schemas/CreditNoteApplicationStatus" }, "merchantDetails": { "$ref": "#/components/schemas/InvoiceMerchantDetails" }, "settings": { "$ref": "#/components/schemas/CreditNoteSettings" }, "accountingDate": { "type": "string", "description": "Accounting date", "example": "2022-09-30" } } }, "CreditNoteStatus": { "type": "string", "example": "DRAFT", "enum": [ "DRAFT", "FINAL", "IN_PROGRESS", "SENT", "VOIDED" ] }, "CreditNoteApplicationStatus": { "type": "string", "example": "UNAPPLIED", "enum": [ "UNAPPLIED", "PARTIALLY_APPLIED", "FULLY_APPLIED", "UNKNOWN" ] }, "CreditNoteSettings": { "required": [ "generateCashCreditGrant" ], "type": "object", "description": "Credit note settings", "example": { "generateCashCreditGrant": "ENABLED" }, "properties": { "generateCashCreditGrant": { "description": "Whether to generate a cash credit grant when sending this credit note", "$ref": "#/components/schemas/SettingPreference" } } }, "SettingPreference": { "type": "string", "example": "ENABLED", "enum": [ "ENABLED", "DISABLED" ] }, "CreateCreditNoteEndpointCreateCreditNoteRequestModel": { "required": [ "currency", "customerId" ], "type": "object", "example": { "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "currency": "GBP", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "accountingDate": "2025-08-29" }, "properties": { "invoiceId": { "type": "string", "description": "Invoice ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "currency": { "description": "Credit Note currency", "$ref": "#/components/schemas/Currency" }, "billingPeriodStart": { "type": "string", "description": "Billing period start", "example": "2022-10-01T00:00:00Z" }, "billingPeriodEnd": { "type": "string", "description": "Billing period end", "example": "2022-10-30T00:00:00Z" }, "purchaseOrderNumber": { "type": "string", "description": "Purchase order number", "example": "PO123" }, "customerId": { "type": "string", "description": "The ID of the Customer this Credit Note is linked to", "example": "61b083e0-1faa-47ca-9aeb-6205da8f6c47" }, "customerEmails": { "type": "array", "description": "Customer's email addresses, used for sending the Credit Note if provided", "example": [ "customer@example.com", "customer.alias@example.com" ], "items": { "type": "string" } }, "customerLegalCompanyName": { "type": "string", "description": "Customer's legal company name", "example": "Facebook" }, "customerBillingAddress": { "$ref": "#/components/schemas/Address1" }, "customerShippingAddress": { "$ref": "#/components/schemas/Address1" }, "memo": { "type": "string", "description": "Credit Note memo", "example": "Thanks" }, "metadata": { "type": "array", "description": "Mapping of key-value pairs to attach to the Credit Note. These are not interpreted by Sequence; they are present for your use alone.", "example": [ { "key": "example-label", "value": "label-value" } ], "items": { "$ref": "#/components/schemas/KeyValuePair" } }, "customerTaxId": { "type": "string", "description": "Customer's tax ID", "example": "TAX123" }, "accountingDate": { "type": "string", "description": "Accounting date", "example": "2025-08-29" } } }, "ListCreditNoteEndpointProductListCreditNotePaginatedResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "DRAFT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } }, "properties": { "items": { "type": "array", "description": "CreditNotes", "example": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "status": "DRAFT", "invoiceId": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceNumber": "INV00001", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "issueDate": "2022-09-15", "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "creditNoteNumber": "CN00001", "purchaseOrderNumber": "PO123", "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "applicationStatus": "UNAPPLIED", "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "12345678" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": true }, "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" } ], "items": { "$ref": "#/components/schemas/CreditNote" } }, "pagination": { "$ref": "#/components/schemas/PaginationResponse2" } } }, "PaginationResponse2": { "type": "object", "description": "Results pagination", "example": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 }, "properties": { "after": { "type": "string", "description": "Copy this value to the `after` parameter of your next request to retrieve the next page of results", "example": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==" }, "before": { "type": "string", "description": "Copy this value to the `before` parameter of your next request to retrieve the next page of results", "example": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND" }, "totalResultSize": { "type": "integer", "description": "Total number of entries across all pages", "format": "int64", "example": 100 } } }, "Stable20240101UpdateInvoiceRequest": { "type": "object", "example": { "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "metadata": [ { "key": "example-label", "value": "label-value" } ], "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "billingRunId": "53ff21c8-4872-46c4-83bf-517d54876945", "accountingDate": "2022-09-30", "attachmentAssetIds": [ "99874519-25ce-46ff-8823-093115aa7222" ], "currency": "GBP" }, "properties": { "dueDate": { "type": "string", "description": "Due date", "example": "2022-09-30" }, "purchaseOrderNumber": { "type": "string", "description": "Purchase order number", "example": "PO123" }, "reference": { "type": "string", "description": "Reference", "example": "ref" }, "customerEmails": { "type": "array", "description": "Customer email addresses, used for sending the Invoice if provided", "example": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "items": { "type": "string" } }, "customerLegalCompanyName": { "type": "string", "description": "Customer's legal company name", "example": "Facebook" }, "customerBillingAddress": { "$ref": "#/components/schemas/Address1" }, "customerShippingAddress": { "$ref": "#/components/schemas/Address1" }, "memo": { "type": "string", "description": "Invoice memo", "example": "Thanks" }, "paymentOptions": { "type": "array", "description": "Invoice payment options", "example": [ "BANK_TRANSFER" ], "items": { "$ref": "#/components/schemas/InvoicePaymentOption" } }, "billingPeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "metadata": { "type": "array", "description": "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.", "example": [ { "key": "example-label", "value": "label-value" } ], "items": { "$ref": "#/components/schemas/KeyValuePair" } }, "creditBalances": { "type": "string", "description": "Credit balances", "example": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)" }, "billingRunId": { "type": "string", "description": "Billing Run ID", "example": "53ff21c8-4872-46c4-83bf-517d54876945" }, "accountingDate": { "type": "string", "description": "Accounting date", "example": "2022-09-30" }, "attachmentAssetIds": { "type": "array", "description": "Attachment asset IDs", "example": [ "99874519-25ce-46ff-8823-093115aa7222" ], "items": { "type": "string" } }, "currency": { "description": "Invoice currency. Can only be updated while invoice status is DRAFT.", "$ref": "#/components/schemas/Currency" } } }, "UpdateInvoicePaymentStatusEndpointRequestModel": { "required": [ "paymentStatus" ], "type": "object", "example": { "paymentStatus": "PAID" }, "properties": { "paymentStatus": { "description": "Invoice payment status", "$ref": "#/components/schemas/InvoicePaymentStatus" } } }, "InvoiceListSummaryResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "invoiceNumber": "INV2", "status": "DRAFT", "paymentStatus": "UNPAID", "currency": "GBP", "grossTotal": "10", "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "customerLegalCompanyName": "Facebook", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "dueDate": "2022-11-05", "dueDateSource": "CALCULATED", "accountingDate": "2022-10-05", "links": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Invoice summaries", "example": [ { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "invoiceNumber": "INV2", "status": "DRAFT", "paymentStatus": "UNPAID", "currency": "GBP", "grossTotal": "10", "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "customerLegalCompanyName": "Facebook", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "dueDate": "2022-11-05", "dueDateSource": "CALCULATED", "accountingDate": "2022-10-05", "links": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ] } ], "items": { "$ref": "#/components/schemas/InvoiceListSummaryResponseItem" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta5" } } }, "InvoiceListSummaryResponseItem": { "required": [ "accountingDate", "currency", "customerId", "customerLegalCompanyName", "dueDateSource", "grossTotal", "id", "links", "paymentStatus", "status" ], "type": "object", "example": { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "invoiceNumber": "INV2", "status": "DRAFT", "paymentStatus": "UNPAID", "currency": "GBP", "grossTotal": "10", "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "customerLegalCompanyName": "Facebook", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "dueDate": "2022-11-05", "dueDateSource": "CALCULATED", "accountingDate": "2022-10-05", "links": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ] }, "properties": { "id": { "type": "string", "description": "Invoice ID", "example": "ba37a392-7054-4dae-ab37-6fee9e23fe06" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "INV2" }, "status": { "description": "Invoice status", "$ref": "#/components/schemas/InvoiceStatus" }, "paymentStatus": { "description": "Payment status (drives the Status column)", "$ref": "#/components/schemas/InvoicePaymentStatus" }, "currency": { "description": "Invoice currency", "$ref": "#/components/schemas/Currency" }, "grossTotal": { "type": "string", "description": "Gross total (the Amount column)", "example": "10" }, "customerId": { "type": "string", "description": "The ID of the Customer this invoice is linked to", "example": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a" }, "customerLegalCompanyName": { "type": "string", "description": "Customer's legal company name (the Customer column)", "example": "Facebook" }, "billingScheduleId": { "type": "string", "description": "The ID of the billing schedule this invoice was generated from, if any", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "billingPeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "dueDate": { "type": "string", "description": "Due date", "example": "2022-11-05" }, "dueDateSource": { "description": "Whether the due date was set manually or calculated from the payment terms", "$ref": "#/components/schemas/DueDateSource" }, "accountingDate": { "type": "string", "description": "Accounting date (the Date column)", "example": "2022-10-05" }, "links": { "type": "array", "description": "Linked external integration entities (the Links column)", "example": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "items": { "$ref": "#/components/schemas/LinkInfo" } } } }, "ReconcileInvoicesWithIntegrationEndpointReconcileInvoicesWithIntegrationRequest": { "required": [ "integrationService", "invoiceIds", "propertiesToCompare" ], "type": "object", "example": { "integrationService": "Xero", "invoiceIds": [], "propertiesToCompare": [ "INVOICE_NUMBER", "STATUS" ] }, "properties": { "integrationService": { "description": "Integration service", "$ref": "#/components/schemas/ReconcileInvoicesWithIntegrationEndpointSupportedIntegrationService" }, "invoiceIds": { "type": "array", "description": "Invoice IDs", "example": [], "items": { "type": "string" } }, "propertiesToCompare": { "type": "array", "description": "Property to compare", "example": [ "INVOICE_NUMBER", "STATUS" ], "items": { "$ref": "#/components/schemas/ReconcileInvoicesWithIntegrationEndpointPropertyToCompare" } } } }, "ReconcileInvoicesWithIntegrationEndpointSupportedIntegrationService": { "type": "string", "example": "Xero", "enum": [ "Xero" ] }, "ReconcileInvoicesWithIntegrationEndpointPropertyToCompare": { "type": "string", "example": "INVOICE_NUMBER", "enum": [ "INVOICE_NUMBER", "STATUS" ] }, "ListInvoiceEndpointListInvoicePaginatedResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "Invoices", "example": [ { "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06", "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV2", "dueDate": "2022-11-05", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "line2": "", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a", "totalTax": "2", "netTotal": "12", "grossTotal": "10", "metadata": [ { "key": "example-label", "value": "label-value" } ], "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "941272d1-f840-4e16-b698-0cd455c81e0e" ], "linkedServices": [ { "externalId": "ID", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "Flat 1", "line2": "123 Fake Street", "town": "New York", "state": "NY", "postcode": "AB1 2EF", "country": "US" }, "phoneNumber": "0800001066", "email": "donald@example.com", "taxId": "TAX", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "123456", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "swedishBankgiroDestination": { "bankgiroNumber": "123-4567", "accountName": "The Merchant" }, "legalCompanyName": "The Merchant", "customFields": [], "includeBeneficiaryAddressInPaymentDetails": false }, "accountingDate": "2022-10-05", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false, "updatedAt": "2022-10-30T00:00:00Z" } ], "items": { "$ref": "#/components/schemas/Invoice" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta5" } } }, "Stable20240101CreateCreditNoteLineItemRequestModel": { "required": [ "creditNoteId", "externalIds", "quantity", "rate", "taxRate", "title" ], "type": "object", "example": { "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "POINT_IN_TIME", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "invoiceLineItemIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ] }, "properties": { "creditNoteId": { "type": "string", "description": "Credit Note Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "groupId": { "type": "string", "description": "Credit Note Line Item Group ID", "example": "cd11218d-fa00-4faa-8684-a43113d076a8" }, "lineItemId": { "type": "string", "description": "Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "title": { "type": "string", "description": "Item Title", "example": "Ferraris" }, "description": { "type": "string", "description": "Item Description", "example": "Red" }, "quantity": { "type": "string", "description": "Quantity", "example": "2" }, "rate": { "type": "string", "description": "Rate per Item", "example": "20000.10" }, "taxRate": { "type": "string", "description": "Tax Rate", "example": "0.2" }, "rateDisplay": { "description": "Determines whether rate is displayed as an absolute value or percentage", "$ref": "#/components/schemas/RateDisplay" }, "externalIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "key": "Xero", "value": "123" } ], "items": { "$ref": "#/components/schemas/IntegrationExternalIdentifier" } }, "servicePeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "revenueRecognitionMethod": { "description": "Revenue recognition method. Valid values are: STRAIGHT_LINE, POINT_IN_TIME", "$ref": "#/components/schemas/RevenueRecognitionMethod1" }, "revenueClassification": { "description": "Revenue classification", "$ref": "#/components/schemas/RevenueClassification" }, "productId": { "type": "string", "description": "Product ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "invoiceLineItemIds": { "type": "array", "description": "Invoice line items that will be refunded by the created credit note line item. Defaults to list of lineItemId if left empty", "example": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "items": { "type": "string" } } } }, "Stable20240101ProductCreateCreditNoteLineItemResponseModel": { "required": [ "creditNoteId", "externalIds", "grossTotal", "id", "index", "netTotal", "quantity", "rate", "rateDisplay", "taxRate", "title", "totalTax" ], "type": "object", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "properties": { "id": { "type": "string", "description": "Credit Note Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "creditNoteId": { "type": "string", "description": "Credit Note Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "groupId": { "type": "string", "description": "Credit Note Line Item Group ID", "example": "cd11218d-fa00-4faa-8684-a43113d076a8" }, "lineItemId": { "type": "string", "description": "Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "title": { "type": "string", "description": "Item Title", "example": "Ferraris" }, "description": { "type": "string", "description": "Item Description", "example": "Red" }, "quantity": { "type": "string", "description": "Quantity", "example": "2" }, "rate": { "type": "string", "description": "Rate per Item", "example": "20000.10" }, "taxRate": { "type": "string", "description": "Tax Rate", "example": "0.2" }, "index": { "type": "integer", "description": "Index (for maintaining order)", "example": 2 }, "priceId": { "type": "string", "description": "Price ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "netTotal": { "type": "string", "description": "Net Total", "example": "20000.00" }, "totalTax": { "type": "string", "description": "Total Tax", "example": "2000.00" }, "grossTotal": { "type": "string", "description": "Gross Total", "example": "22000.00" }, "rateDisplay": { "description": "Determines whether rate is displayed as an absolute value or percentage", "$ref": "#/components/schemas/RateDisplay" }, "externalIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "key": "Xero", "value": "123" } ], "items": { "$ref": "#/components/schemas/IntegrationExternalIdentifier" } }, "servicePeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "revenueRecognitionMethod": { "description": "Revenue recognition method", "$ref": "#/components/schemas/RevenueRecognitionMethod1" }, "revenueClassification": { "description": "Revenue classification", "$ref": "#/components/schemas/RevenueClassification" }, "productId": { "type": "string", "description": "Product ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } } }, "DeleteCreditNoteLineItemEndpointProductDeleteCreditNoteLineItemResponseModel": { "required": [ "creditNoteId", "externalIds", "grossTotal", "id", "index", "netTotal", "quantity", "rate", "rateDisplay", "taxRate", "title", "totalTax" ], "type": "object", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ] }, "properties": { "id": { "type": "string", "description": "Credit Note Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "creditNoteId": { "type": "string", "description": "Credit Note Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "groupId": { "type": "string", "description": "Credit Note Line Item Group ID", "example": "cd11218d-fa00-4faa-8684-a43113d076a8" }, "lineItemId": { "type": "string", "description": "Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "title": { "type": "string", "description": "Item Title", "example": "Ferraris" }, "description": { "type": "string", "description": "Item Description", "example": "Red" }, "quantity": { "type": "string", "description": "Quantity", "example": "2" }, "rate": { "type": "string", "description": "Rate per Item", "example": "20000.10" }, "taxRate": { "type": "string", "description": "Tax Rate", "example": "0.2" }, "index": { "type": "integer", "description": "Index (for maintaining order)", "example": 2 }, "priceId": { "type": "string", "description": "Price ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "netTotal": { "type": "string", "description": "Net Total", "example": "20000.00" }, "totalTax": { "type": "string", "description": "Total Tax", "example": "2000.00" }, "grossTotal": { "type": "string", "description": "Gross Total", "example": "22000.00" }, "rateDisplay": { "description": "Determines whether rate is displayed as an absolute value or percentage", "$ref": "#/components/schemas/RateDisplay" }, "externalIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "key": "Xero", "value": "123" } ], "items": { "$ref": "#/components/schemas/IntegrationExternalIdentifier" } } } }, "UpdateCreditNoteLineItemEndpointUpdateCreditNoteLineItemRequestModel": { "required": [ "externalIds", "quantity", "rate", "taxRate", "title" ], "type": "object", "example": { "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "properties": { "title": { "type": "string", "description": "Item Title", "example": "Ferraris" }, "description": { "type": "string", "description": "Item Description", "example": "Red" }, "quantity": { "type": "string", "description": "Quantity", "example": "2" }, "rate": { "type": "string", "description": "Rate per Item", "example": "20000.10" }, "taxRate": { "type": "string", "description": "Tax Rate", "example": "0.2" }, "rateDisplay": { "description": "Determines whether rate is displayed as an absolute value or percentage", "$ref": "#/components/schemas/RateDisplay" }, "externalIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "key": "Xero", "value": "123" } ], "items": { "$ref": "#/components/schemas/IntegrationExternalIdentifier" } }, "servicePeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "revenueRecognitionMethod": { "description": "Revenue recognition method. Valid values are: STRAIGHT_LINE, POINT_IN_TIME", "$ref": "#/components/schemas/RevenueRecognitionMethod1" }, "revenueClassification": { "description": "Revenue classification", "$ref": "#/components/schemas/RevenueClassification" }, "productId": { "type": "string", "description": "Product ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } } }, "UpdateCreditNoteLineItemEndpointProductUpdateCreditNoteLineItemResponseModel": { "required": [ "creditNoteId", "externalIds", "grossTotal", "id", "index", "netTotal", "quantity", "rate", "rateDisplay", "taxRate", "title", "totalTax" ], "type": "object", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "lineItemId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "index": 2, "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "netTotal": "20000.00", "totalTax": "2000.00", "grossTotal": "22000.00", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "servicePeriod": { "start": "2025-10-01", "endInclusive": "2025-10-30" }, "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "productId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "properties": { "id": { "type": "string", "description": "Credit Note Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "creditNoteId": { "type": "string", "description": "Credit Note Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "groupId": { "type": "string", "description": "Credit Note Line Item Group ID", "example": "cd11218d-fa00-4faa-8684-a43113d076a8" }, "lineItemId": { "type": "string", "description": "Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "title": { "type": "string", "description": "Item Title", "example": "Ferraris" }, "description": { "type": "string", "description": "Item Description", "example": "Red" }, "quantity": { "type": "string", "description": "Quantity", "example": "2" }, "rate": { "type": "string", "description": "Rate per Item", "example": "20000.10" }, "taxRate": { "type": "string", "description": "Tax Rate", "example": "0.2" }, "index": { "type": "integer", "description": "Index (for maintaining order)", "example": 2 }, "priceId": { "type": "string", "description": "Price ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "netTotal": { "type": "string", "description": "Net Total", "example": "20000.00" }, "totalTax": { "type": "string", "description": "Total Tax", "example": "2000.00" }, "grossTotal": { "type": "string", "description": "Gross Total", "example": "22000.00" }, "rateDisplay": { "description": "Determines whether rate is displayed as an absolute value or percentage", "$ref": "#/components/schemas/RateDisplay" }, "externalIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "key": "Xero", "value": "123" } ], "items": { "$ref": "#/components/schemas/IntegrationExternalIdentifier" } }, "servicePeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "revenueRecognitionMethod": { "description": "Revenue recognition method", "$ref": "#/components/schemas/RevenueRecognitionMethod1" }, "revenueClassification": { "description": "Revenue classification", "$ref": "#/components/schemas/RevenueClassification" }, "productId": { "type": "string", "description": "Product ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" } } }, "UpdateInvoiceRenderSettingsEndpointUpdateInvoiceRenderSettingsRequestModel": { "required": [ "paymentLinkDisplay" ], "type": "object", "example": { "paymentLinkDisplay": "SHOW_PAYMENT_LINK", "currencyConversionDisplay": "SHOW_CURRENCY_CONVERSION" }, "properties": { "paymentLinkDisplay": { "description": "Payment link display preference. By default, the payment link is shown.", "$ref": "#/components/schemas/PaymentLinkDisplayOption" }, "currencyConversionDisplay": { "description": "Whether invoices show the regulatory conversion of their totals into the customer's local currency. Omit to leave the current preference unchanged.", "$ref": "#/components/schemas/CurrencyConversionDisplayOption" } } }, "UpdateInvoiceRenderSettingsEndpointProductUpdateInvoiceRenderSettingsResponseModel": { "required": [ "currencyConversionDisplay", "id", "paymentLinkDisplay" ], "type": "object", "example": { "id": "385f41ab-51f9-49c2-8f25-358545106b88", "paymentLinkDisplay": "SHOW_PAYMENT_LINK", "currencyConversionDisplay": "SHOW_CURRENCY_CONVERSION" }, "properties": { "id": { "type": "string", "description": "Invoice settings ID", "example": "385f41ab-51f9-49c2-8f25-358545106b88" }, "paymentLinkDisplay": { "description": "Payment link display preference. By default, the payment link is shown.", "$ref": "#/components/schemas/PaymentLinkDisplayOption" }, "currencyConversionDisplay": { "description": "Whether invoices show the regulatory conversion of their totals into the customer's local currency. By default, the conversion is shown.", "$ref": "#/components/schemas/CurrencyConversionDisplayOption" } } }, "UpdateLineItemGroupRequestModel": { "required": [ "title" ], "type": "object", "example": { "title": "Users", "description": "Charges for users", "taxCategoryId": "28227c88-6dba-455f-9b30-b9c76957e610", "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "servicePeriod": { "start": "2022-10-20", "endInclusive": "2022-10-24" }, "index": 10 }, "properties": { "title": { "type": "string", "description": "Line Item Group Title", "example": "Users" }, "description": { "type": "string", "description": "Line Item Group Description", "example": "Charges for users" }, "taxCategoryId": { "type": "string", "description": "The tax category for all line items in this line item group", "example": "28227c88-6dba-455f-9b30-b9c76957e610" }, "revenueRecognitionMethod": { "description": "The revenue recognition method for all line items in this line item group", "$ref": "#/components/schemas/RevenueRecognitionMethod1" }, "revenueClassification": { "description": "The revenue classification for all line items in this line item group", "$ref": "#/components/schemas/RevenueClassification" }, "servicePeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "index": { "type": "integer", "description": "Index (for maintaining order)", "example": 10 } } }, "LineItemGroupResponseModel": { "required": [ "grossTotal", "id", "index", "invoiceId", "netTotal", "title", "totalTax" ], "type": "object", "example": { "id": "941272d1-f840-4e16-b698-0cd455c81e0e", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Cars", "description": "Charges for cars", "index": 1, "netTotal": "200000", "totalTax": "10", "grossTotal": "22000", "taxCategory": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" } }, "properties": { "id": { "type": "string", "description": "Line Item Group ID", "example": "941272d1-f840-4e16-b698-0cd455c81e0e" }, "invoiceId": { "type": "string", "description": "Invoice ID", "example": "cd11218d-fa00-4faa-8684-a43113d076a8" }, "title": { "type": "string", "description": "Line Item Group Title", "example": "Cars" }, "description": { "type": "string", "description": "Line Item Group Description", "example": "Charges for cars" }, "index": { "type": "integer", "description": "Index (for maintaining order)", "example": 1 }, "netTotal": { "type": "string", "description": "Net total, in decimal format of the Invoice's currency", "example": "200000" }, "totalTax": { "type": "string", "description": "Total tax, in decimal format of the Invoice's currency", "example": "10" }, "grossTotal": { "type": "string", "description": "Gross total, in decimal format of the Invoice's currency", "example": "22000" }, "taxCategory": { "$ref": "#/components/schemas/TaxCategoryResponse" } } }, "TaxCategoryResponse": { "required": [ "id", "name" ], "type": "object", "description": "The tax category for all line items in this line item group", "example": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" }, "properties": { "id": { "type": "string", "description": "Tax Category ID", "example": "28227c88-6dba-455f-9b30-b9c76957e610" }, "name": { "type": "string", "description": "Tax Category name", "example": "VAT" } } }, "UpdateCreditNoteEndpointUpdateCreditNoteRequestModel": { "type": "object", "example": { "billingPeriodStart": "2022-10-01T00:00:00Z", "billingPeriodEnd": "2022-10-30T00:00:00Z", "purchaseOrderNumber": "PO123", "customerEmails": [ "customer@example.com", "customer.alias@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "settings": { "generateCashCreditGrant": "ENABLED" }, "accountingDate": "2022-09-30" }, "properties": { "billingPeriodStart": { "type": "string", "description": "Billing period start", "example": "2022-10-01T00:00:00Z" }, "billingPeriodEnd": { "type": "string", "description": "Billing period end", "example": "2022-10-30T00:00:00Z" }, "purchaseOrderNumber": { "type": "string", "description": "Purchase order number", "example": "PO123" }, "customerEmails": { "type": "array", "description": "Customer's email addresses, used for sending the Credit Note if provided", "example": [ "customer@example.com", "customer.alias@example.com" ], "items": { "type": "string" } }, "customerLegalCompanyName": { "type": "string", "description": "Customer's legal company name", "example": "Facebook" }, "customerBillingAddress": { "$ref": "#/components/schemas/Address1" }, "customerShippingAddress": { "$ref": "#/components/schemas/Address1" }, "memo": { "type": "string", "description": "Credit Note memo", "example": "Thanks" }, "metadata": { "type": "array", "description": "Mapping of key-value pairs to attach to the Credit Note. These are not interpreted by Sequence; they are present for your use alone.", "example": [ { "key": "example-label", "value": "label-value" } ], "items": { "$ref": "#/components/schemas/KeyValuePair" } }, "customerTaxId": { "type": "string", "description": "Customer's tax ID", "example": "TAX123" }, "settings": { "$ref": "#/components/schemas/CreditNoteSettings" }, "accountingDate": { "type": "string", "description": "Accounting date", "example": "2022-09-30" } } }, "UpdateCreditNoteLineItemGroupEndpointUpdateCreditNoteLineItemGroupRequestModel": { "required": [ "title" ], "type": "object", "example": { "title": "Users", "description": "Credit note for users" }, "properties": { "title": { "type": "string", "description": "Credit Note Line Item Group Title", "example": "Users" }, "description": { "type": "string", "description": "Credit Note Line Item Group Description", "example": "Credit note for users" } } }, "UpdateCreditNoteLineItemGroupEndpointProductUpdateCreditNoteLineItemGroupResponseModel": { "required": [ "creditNoteId", "grossTotal", "id", "index", "netTotal", "title", "totalTax" ], "type": "object", "example": { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" }, "properties": { "id": { "type": "string", "description": "Credit Note Line Item Group ID", "example": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec" }, "creditNoteId": { "type": "string", "description": "Credit Note ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "lineItemGroupId": { "type": "string", "description": "Line Item Group ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "title": { "type": "string", "description": "Credit Note Line Item Group Title", "example": "Users" }, "description": { "type": "string", "description": "Credit Note Line Item Group Description", "example": "Credit note for users" }, "index": { "type": "integer", "description": "Index (for maintaining order)", "example": 2 }, "netTotal": { "type": "string", "description": "Net total", "example": "51.20" }, "totalTax": { "type": "string", "description": "Total tax", "example": "2.50" }, "grossTotal": { "type": "string", "description": "Gross total", "example": "101.23" } } }, "PatchSentInvoiceEndpointPatchSentInvoiceRequest": { "type": "object", "example": { "purchaseOrderNumber": "PO-12345", "dueDate": "2026-09-29" }, "properties": { "purchaseOrderNumber": { "type": "string", "example": "PO-12345" }, "dueDate": { "type": "string", "example": "2026-09-29" } } }, "ListCreditNoteLineItemGroupEndpointProductListCreditNoteLineItemGroupPaginatedResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "CreditNoteLineItemGroups", "example": [ { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" } ], "items": { "$ref": "#/components/schemas/ListCreditNoteLineItemGroupEndpointProductListCreditNoteLineItemGroupResponseModel" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta5" } } }, "ListCreditNoteLineItemGroupEndpointProductListCreditNoteLineItemGroupResponseModel": { "required": [ "creditNoteId", "grossTotal", "id", "index", "netTotal", "title", "totalTax" ], "type": "object", "example": { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" }, "properties": { "id": { "type": "string", "description": "Credit Note Line Item Group ID", "example": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec" }, "creditNoteId": { "type": "string", "description": "Credit Note ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "lineItemGroupId": { "type": "string", "description": "Line Item Group ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "title": { "type": "string", "description": "Credit Note Line Item Group Title", "example": "Users" }, "description": { "type": "string", "description": "Credit Note Line Item Group Description", "example": "Credit note for users" }, "index": { "type": "integer", "description": "Index (for maintaining order)", "example": 2 }, "netTotal": { "type": "string", "description": "Net total", "example": "51.20" }, "totalTax": { "type": "string", "description": "Total tax", "example": "2.50" }, "grossTotal": { "type": "string", "description": "Gross total", "example": "101.23" } } }, "DeleteCreditNoteLineItemGroupEndpointProductDeleteCreditNoteLineItemGroupResponseModel": { "required": [ "creditNoteId", "grossTotal", "id", "index", "netTotal", "title", "totalTax" ], "type": "object", "example": { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" }, "properties": { "id": { "type": "string", "description": "Credit Note Line Item Group ID", "example": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec" }, "creditNoteId": { "type": "string", "description": "Credit Note ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "lineItemGroupId": { "type": "string", "description": "Line Item Group ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "title": { "type": "string", "description": "Credit Note Line Item Group Title", "example": "Users" }, "description": { "type": "string", "description": "Credit Note Line Item Group Description", "example": "Credit note for users" }, "index": { "type": "integer", "description": "Index (for maintaining order)", "example": 2 }, "netTotal": { "type": "string", "description": "Net total", "example": "51.20" }, "totalTax": { "type": "string", "description": "Total tax", "example": "2.50" }, "grossTotal": { "type": "string", "description": "Gross total", "example": "101.23" } } }, "Stable20240101LineItemResponse": { "required": [ "externalIds", "grossTotal", "id", "index", "invoiceId", "netTotal", "quantity", "rate", "rateDisplay", "taxRate", "title", "totalTax" ], "type": "object", "example": { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "index": 2, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110", "revenueRecognitionMethod": "USAGE" }, "properties": { "id": { "type": "string", "description": "Line Item ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "invoiceId": { "type": "string", "description": "Invoice ID", "example": "cd11218d-fa00-4faa-8684-a43113d076a8" }, "title": { "type": "string", "description": "Item Title", "example": "Ferraris" }, "description": { "type": "string", "description": "Item Description", "example": "Red" }, "quantity": { "type": "string", "description": "Quantity", "example": "2" }, "rate": { "type": "string", "description": "Price per Item", "example": "20000.10" }, "taxRate": { "type": "string", "description": "Tax Rate", "example": "0.2" }, "servicePeriodStart": { "type": "string", "description": "Start of the service period (the time period in which the service was provided)", "example": "2022-10-20T00:00:00Z" }, "servicePeriodEnd": { "type": "string", "description": "End of the service period (the time period in which the service was provided)", "example": "2022-10-24T00:00:00Z" }, "servicePeriod": { "$ref": "#/components/schemas/DateRange" }, "index": { "type": "integer", "description": "Index (for maintaining order)", "example": 2 }, "groupId": { "type": "string", "description": "Line Item Group ID", "example": "cd11218d-fa00-4faa-8684-a43113d076a8" }, "netTotal": { "type": "string", "description": "Net total, in decimal format of the Invoice's currency", "example": "51.20" }, "totalTax": { "type": "string", "description": "Total tax, in decimal format of the Invoice's currency", "example": "2.50" }, "grossTotal": { "type": "string", "description": "Gross total, in decimal format of the Invoice's currency", "example": "101.23" }, "priceId": { "type": "string", "description": "Price ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "rateDisplay": { "description": "Determines whether rate is displayed as an absolute value or percentage", "$ref": "#/components/schemas/RateDisplay" }, "externalIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "key": "Xero", "value": "123" } ], "items": { "$ref": "#/components/schemas/IntegrationExternalIdentifier" } }, "revenueClassification": { "description": "Revenue classification", "$ref": "#/components/schemas/RevenueClassification" }, "creditGrantId": { "type": "string", "description": "Credit Grant ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "productId": { "type": "string", "description": "Product ID", "example": "dd55bf30-3b97-4644-a9fc-b15e0f59a110" }, "revenueRecognitionMethod": { "description": "Revenue recognition method", "$ref": "#/components/schemas/RevenueRecognitionMethod1" } } }, "DateRange": { "required": [ "endDate", "startDate" ], "type": "object", "description": "Service Period", "example": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "properties": { "startDate": { "type": "string", "example": "2022-10-20" }, "endDate": { "type": "string", "example": "2022-10-24" } } }, "Stable20240101CreateInvoiceRequest": { "required": [ "currency", "customerId" ], "type": "object", "example": { "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "currency": "GBP", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "metadata": [ { "key": "example-label", "value": "label-value" } ], "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "billingRunId": "53ff21c8-4872-46c4-83bf-517d54876945", "accountingDate": "2022-09-30", "attachmentAssetIds": [ "99874519-25ce-46ff-8823-093115aa7222" ] }, "properties": { "billingScheduleId": { "type": "string", "description": "Billing Schedule ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "currency": { "description": "Invoice currency", "$ref": "#/components/schemas/Currency" }, "dueDate": { "type": "string", "description": "Due date", "example": "2022-09-30" }, "purchaseOrderNumber": { "type": "string", "description": "Purchase order number", "example": "PO123" }, "reference": { "type": "string", "description": "Reference", "example": "ref" }, "customerEmails": { "type": "array", "description": "Customer email addresses, used for sending the Invoice if provided", "example": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "items": { "type": "string" } }, "customerLegalCompanyName": { "type": "string", "description": "Customer's legal company name", "example": "Facebook" }, "customerBillingAddress": { "$ref": "#/components/schemas/Address1" }, "customerShippingAddress": { "$ref": "#/components/schemas/Address1" }, "memo": { "type": "string", "description": "Invoice memo", "example": "Thanks" }, "paymentOptions": { "type": "array", "description": "Invoice payment options", "example": [ "BANK_TRANSFER" ], "items": { "$ref": "#/components/schemas/InvoicePaymentOption" } }, "billingPeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "customerId": { "type": "string", "description": "The ID of the Customer this invoice is linked to", "example": "61b083e0-1faa-47ca-9aeb-6205da8f6c47" }, "metadata": { "type": "array", "description": "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.", "example": [ { "key": "example-label", "value": "label-value" } ], "items": { "$ref": "#/components/schemas/KeyValuePair" } }, "creditBalances": { "type": "string", "description": "Credit balances", "example": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)" }, "billingRunId": { "type": "string", "description": "Billing Run ID", "example": "53ff21c8-4872-46c4-83bf-517d54876945" }, "accountingDate": { "type": "string", "description": "Accounting date", "example": "2022-09-30" }, "attachmentAssetIds": { "type": "array", "description": "Attachment asset IDs", "example": [ "99874519-25ce-46ff-8823-093115aa7222" ], "items": { "type": "string" } } } }, "Stable20240101PatchInvoiceRequest": { "type": "object", "example": { "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "metadata": [ { "key": "example-label", "value": "label-value" } ], "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "billingRunId": "53ff21c8-4872-46c4-83bf-517d54876945", "accountingDate": "2022-09-30", "attachmentAssetIds": [ "99874519-25ce-46ff-8823-093115aa7222" ] }, "properties": { "dueDate": { "type": "string", "description": "Due date", "example": "2022-09-30" }, "purchaseOrderNumber": { "type": "string", "description": "Purchase order number", "example": "PO123" }, "reference": { "type": "string", "description": "Reference", "example": "ref" }, "customerEmails": { "type": "array", "description": "Customer email addresses, used for sending the Invoice if provided", "example": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "items": { "type": "string" } }, "customerLegalCompanyName": { "type": "string", "description": "Customer's legal company name", "example": "Facebook" }, "customerBillingAddress": { "$ref": "#/components/schemas/Address1" }, "customerShippingAddress": { "$ref": "#/components/schemas/Address1" }, "memo": { "type": "string", "description": "Invoice memo", "example": "Thanks" }, "paymentOptions": { "type": "array", "description": "Invoice payment options", "example": [ "BANK_TRANSFER" ], "items": { "$ref": "#/components/schemas/InvoicePaymentOption" } }, "billingPeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "metadata": { "type": "array", "description": "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.", "example": [ { "key": "example-label", "value": "label-value" } ], "items": { "$ref": "#/components/schemas/KeyValuePair" } }, "creditBalances": { "type": "string", "description": "Credit balances", "example": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)" }, "billingRunId": { "type": "string", "description": "Billing Run ID", "example": "53ff21c8-4872-46c4-83bf-517d54876945" }, "accountingDate": { "type": "string", "description": "Accounting date", "example": "2022-09-30" }, "attachmentAssetIds": { "type": "array", "description": "Attachment asset IDs", "example": [ "99874519-25ce-46ff-8823-093115aa7222" ], "items": { "type": "string" } } } }, "ListLineItemEndpointPaginatedLineItemResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "index": 2, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110", "revenueRecognitionMethod": "USAGE" } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "LineItems", "example": [ { "id": "af60cab3-812d-4250-a051-0fb7133a00c7", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "index": 2, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110", "revenueRecognitionMethod": "USAGE" } ], "items": { "$ref": "#/components/schemas/Stable20240101LineItemResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta5" } } }, "DeleteInvoiceEndpointProductDeleteInvoiceResponseModel": { "required": [ "accountingDate", "createdAt", "creditNoteIds", "currency", "customerBillingAddress", "customerEmails", "customerId", "customerLegalCompanyName", "customerShippingAddress", "grossTotal", "id", "isCustomerArchived", "linkedServices", "metadata", "netTotal", "paymentStatus", "renderSettings", "sequenceAccountId", "status", "totalTax" ], "type": "object", "example": { "id": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9", "sequenceAccountId": "68233908-402a-43b4-8952-1c2ab0ef0b25", "billingScheduleId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "status": "DRAFT", "currency": "GBP", "invoiceNumber": "INV00001", "issueDate": "2022-09-15", "dueDate": "2022-09-30", "purchaseOrderNumber": "PO123", "reference": "ref", "customerEmails": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "customerLegalCompanyName": "Facebook", "customerBillingAddress": { "line1": "Flat 1", "line2": "15 Yemen Road", "town": "Yemen", "state": "CA", "postcode": "YE1 2YE", "country": "YE" }, "customerShippingAddress": { "line1": "742 Evergreen Terrace", "town": "Springfield", "state": "CA", "postcode": "12345", "country": "US" }, "memo": "Thanks", "paymentOptions": [ "BANK_TRANSFER" ], "billingPeriod": { "start": "2022-10-01", "endInclusive": "2022-10-30" }, "customerId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47", "totalTax": "2.50", "netTotal": "51.20", "grossTotal": "101.23", "metadata": [ { "key": "example-label", "value": "label-value" } ], "customerTaxId": "TAX123", "paymentStatus": "UNPAID", "createdAt": "2022-10-30T00:00:00Z", "creditNoteIds": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "linkedServices": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "merchantDetails": { "address": { "line1": "The White House", "line2": "1600 Pennsylvania Avenue", "town": "Washington, D.C.", "state": "CA", "postcode": "20500", "country": "US" }, "phoneNumber": "0800001066", "email": "finance@example.com", "taxId": "TAX60", "iban": "GB33BUKB20201555555555", "ukAccountDetails": { "sortCode": "000000", "accountNumber": "12345678" }, "usAchDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789" }, "usWireDetails": { "accountNumber": "12345678", "accountName": "John Doe", "bankName": "Chase", "bankRoutingNumber": "123456789", "swiftCode": "CHASUS33", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" } }, "caBankAccountDetails": { "transitNumber": "123", "institutionNumber": "12345", "accountNumber": "1234567" }, "canadianInternationalDestination": { "legalName": "John Doe", "accountNumber": "12345678", "transitNumber": "12345", "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "institutionNumber": "123", "swiftCode": "CHASUS33", "intermediaryBank": { "bankName": "Chase", "bankAddress": { "line1": "JP Morgan Chase", "town": "New York City", "state": "NY", "postcode": "10017", "country": "US" }, "swiftCode": "CHASUS33", "routingNumber": "123456789" } }, "australianDestination": { "legalName": "John Doe", "accountNumber": "12345678", "swiftCode": "CHASUS33", "bsb": "123456" }, "logoUrl": "logo", "legalCompanyName": "The Merchant", "primaryColour": "#000000", "customFields": [ { "key": "example-label", "value": "label-value" } ], "includeBeneficiaryAddressInPaymentDetails": false }, "creditBalances": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)", "dunningStatus": "SCHEDULED", "accountingDate": "2022-09-30", "calculatedAt": "2022-09-30T00:00:00Z", "customerTaxStatus": "TAXED", "renderSettings": { "paymentLinkDisplay": "HIDE_PAYMENT_LINK" }, "isCustomerArchived": false }, "properties": { "id": { "type": "string", "description": "Invoice ID", "example": "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account ID", "example": "68233908-402a-43b4-8952-1c2ab0ef0b25" }, "billingScheduleId": { "type": "string", "description": "Billing Schedule ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "status": { "description": "Invoice status", "$ref": "#/components/schemas/InvoiceStatus" }, "currency": { "description": "Invoice currency", "$ref": "#/components/schemas/Currency" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "INV00001" }, "issueDate": { "type": "string", "description": "Issue date", "example": "2022-09-15" }, "dueDate": { "type": "string", "description": "Due date", "example": "2022-09-30" }, "purchaseOrderNumber": { "type": "string", "description": "Purchase order number", "example": "PO123" }, "reference": { "type": "string", "description": "Reference", "example": "ref" }, "customerEmails": { "type": "array", "description": "Customer email addresses, used for sending the Invoice if provided", "example": [ "customer.user.a@example.com", "customer.user.b@example.com" ], "items": { "type": "string" } }, "customerLegalCompanyName": { "type": "string", "description": "Customer's legal company name", "example": "Facebook" }, "customerBillingAddress": { "$ref": "#/components/schemas/Address1" }, "customerShippingAddress": { "$ref": "#/components/schemas/Address1" }, "memo": { "type": "string", "description": "Invoice memo", "example": "Thanks" }, "paymentOptions": { "type": "array", "description": "Invoice payment options", "example": [ "BANK_TRANSFER" ], "items": { "$ref": "#/components/schemas/InvoicePaymentOption" } }, "billingPeriod": { "$ref": "#/components/schemas/InclusiveDateRange" }, "customerId": { "type": "string", "description": "The ID of the Customer this invoice is linked to", "example": "61b083e0-1faa-47ca-9aeb-6205da8f6c47" }, "totalTax": { "type": "string", "description": "Total tax, in decimal format of the Invoice's currency", "example": "2.50" }, "netTotal": { "type": "string", "description": "Net total, in decimal format of the Invoice's currency", "example": "51.20" }, "grossTotal": { "type": "string", "description": "Gross total, in decimal format of the Invoice's currency", "example": "101.23" }, "metadata": { "type": "array", "description": "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.", "example": [ { "key": "example-label", "value": "label-value" } ], "items": { "$ref": "#/components/schemas/KeyValuePair" } }, "customerTaxId": { "type": "string", "description": "Customer's tax ID", "example": "TAX123" }, "paymentStatus": { "description": "Invoice payment status", "$ref": "#/components/schemas/InvoicePaymentStatus" }, "createdAt": { "type": "string", "description": "Creation time", "example": "2022-10-30T00:00:00Z" }, "creditNoteIds": { "type": "array", "description": "IDs of linked credit notes (if any)", "example": [ "af60cab3-812d-4250-a051-0fb7133a00c7" ], "items": { "type": "string" } }, "linkedServices": { "type": "array", "description": "External services which are linked to this invoice", "example": [ { "externalId": "123", "externalService": "Xero", "syncTime": "2022-06-28T16:47:00Z", "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504" } ], "items": { "$ref": "#/components/schemas/LinkInfo" } }, "merchantDetails": { "$ref": "#/components/schemas/InvoiceMerchantDetails" }, "creditBalances": { "type": "string", "description": "Credit balances", "example": "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)" }, "dunningStatus": { "description": "Dunning status", "$ref": "#/components/schemas/InvoiceDunningStatus" }, "accountingDate": { "type": "string", "description": "Accounting date", "example": "2022-09-30" }, "calculatedAt": { "type": "string", "description": "Time this invoice was last calculated (applicable for invoices generated by billing engine only)", "example": "2022-09-30T00:00:00Z" }, "customerTaxStatus": { "description": "Customer tax status", "$ref": "#/components/schemas/TaxStatus" }, "renderSettings": { "$ref": "#/components/schemas/InvoiceRenderSettingsInlineAggregate" }, "isCustomerArchived": { "type": "boolean", "description": "isCustomerArchived", "example": false } } }, "MergeInvoicesEndpointRequestBody": { "required": [ "invoiceIds" ], "type": "object", "example": { "invoiceIds": [ "bd39e664-a4a2-4515-bd7e-6bc91d484498", "6582c475-7e29-4ea4-b8f8-f071032573a0" ] }, "properties": { "invoiceIds": { "type": "array", "example": [ "bd39e664-a4a2-4515-bd7e-6bc91d484498", "6582c475-7e29-4ea4-b8f8-f071032573a0" ], "items": { "type": "string" } } } }, "Stable20240101CreateOrUpdateLineItem": { "required": [ "externalIds", "quantity", "rate", "taxRate", "title" ], "type": "object", "example": { "title": "Ferraris", "description": "Red", "quantity": "2", "rate": "20000.10", "taxRate": "0.2", "servicePeriodStart": "2022-10-20T00:00:00Z", "servicePeriodEnd": "2022-10-24T00:00:00Z", "servicePeriod": { "startDate": "2022-10-20", "endDate": "2022-10-24" }, "groupId": "cd11218d-fa00-4faa-8684-a43113d076a8", "priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "rateDisplay": "ABSOLUTE", "externalIds": [ { "key": "Xero", "value": "123" } ], "revenueClassification": "EARNED", "creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95", "revenueRecognitionMethod": "STRAIGHT_LINE" }, "properties": { "title": { "type": "string", "description": "Item Title", "example": "Ferraris" }, "description": { "type": "string", "description": "Item Description", "example": "Red" }, "quantity": { "type": "string", "description": "Quantity", "example": "2" }, "rate": { "type": "string", "description": "Price per Item", "example": "20000.10" }, "taxRate": { "type": "string", "description": "Tax Rate", "example": "0.2" }, "servicePeriodStart": { "type": "string", "description": "Start of the service period (the time period in which the service was provided)", "example": "2022-10-20T00:00:00Z" }, "servicePeriodEnd": { "type": "string", "description": "End of the service period (the time period in which the service was provided)", "example": "2022-10-24T00:00:00Z" }, "servicePeriod": { "$ref": "#/components/schemas/DateRange" }, "groupId": { "type": "string", "description": "Line Item Group ID", "example": "cd11218d-fa00-4faa-8684-a43113d076a8" }, "priceId": { "type": "string", "description": "Price ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "rateDisplay": { "description": "Determines whether rate is displayed as an absolute value or percentage", "$ref": "#/components/schemas/RateDisplay" }, "externalIds": { "type": "array", "description": "IDs in external integrations", "example": [ { "key": "Xero", "value": "123" } ], "items": { "$ref": "#/components/schemas/IntegrationExternalIdentifier" } }, "revenueClassification": { "description": "Revenue classification", "$ref": "#/components/schemas/RevenueClassification" }, "creditGrantId": { "type": "string", "description": "Credit Grant ID", "example": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95" }, "revenueRecognitionMethod": { "description": "Revenue recognition method", "$ref": "#/components/schemas/RevenueRecognitionMethod1" } } }, "InvoiceSummaryResponse": { "required": [ "totalsByCurrency" ], "type": "object", "example": { "totalsByCurrency": [ { "currency": "GBP", "invoiceCount": 12, "grossTotal": 15400 }, { "currency": "USD", "invoiceCount": 3, "grossTotal": 980.5 } ] }, "properties": { "totalsByCurrency": { "type": "array", "description": "Aggregate totals for the invoices matching the supplied filters, grouped by currency.", "example": [ { "currency": "GBP", "invoiceCount": 12, "grossTotal": 15400 }, { "currency": "USD", "invoiceCount": 3, "grossTotal": 980.5 } ], "items": { "$ref": "#/components/schemas/InvoiceSummaryResponseCurrencyTotals" } } } }, "InvoiceSummaryResponseCurrencyTotals": { "required": [ "currency", "grossTotal", "invoiceCount" ], "type": "object", "example": { "currency": "GBP", "invoiceCount": 12, "grossTotal": 15400 }, "properties": { "currency": { "description": "The currency these totals are denominated in.", "$ref": "#/components/schemas/Currency" }, "invoiceCount": { "type": "integer", "description": "The number of invoices matching the filters in this currency.", "format": "int64", "example": 12 }, "grossTotal": { "type": "number", "description": "The sum of the gross totals of the matching invoices in this currency.", "example": 15400 } } }, "InvoiceCurrencyConversionsListResponse": { "required": [ "items" ], "type": "object", "example": { "items": [ { "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d", "invoiceId": "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f", "currency": "GBP", "totalTax": "20.00", "netTotal": "100.00", "grossTotal": "120.00", "exchangeRate": "0.79", "updatedAt": "2024-01-15T10:30:00Z" } ] }, "properties": { "items": { "type": "array", "description": "List of currency conversions for the invoice", "example": [ { "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d", "invoiceId": "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f", "currency": "GBP", "totalTax": "20.00", "netTotal": "100.00", "grossTotal": "120.00", "exchangeRate": "0.79", "updatedAt": "2024-01-15T10:30:00Z" } ], "items": { "$ref": "#/components/schemas/InvoiceCurrencyConversionResponse" } } } }, "InvoiceCurrencyConversionResponse": { "required": [ "currency", "exchangeRate", "grossTotal", "id", "invoiceId", "netTotal", "totalTax", "updatedAt" ], "type": "object", "example": { "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d", "invoiceId": "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f", "currency": "GBP", "totalTax": "20.00", "netTotal": "100.00", "grossTotal": "120.00", "exchangeRate": "0.79", "updatedAt": "2024-01-15T10:30:00Z" }, "properties": { "id": { "type": "string", "description": "The unique identifier for the currency conversion", "example": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d" }, "invoiceId": { "type": "string", "description": "The invoice this conversion belongs to", "example": "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f" }, "currency": { "description": "The target currency for the conversion", "$ref": "#/components/schemas/Currency" }, "totalTax": { "type": "string", "description": "The total tax amount in the converted currency", "example": "20.00" }, "netTotal": { "type": "string", "description": "The net total amount in the converted currency", "example": "100.00" }, "grossTotal": { "type": "string", "description": "The gross total amount in the converted currency", "example": "120.00" }, "exchangeRate": { "type": "string", "description": "The exchange rate used for the conversion", "example": "0.79" }, "updatedAt": { "type": "string", "description": "The last update timestamp", "example": "2024-01-15T10:30:00Z" } } }, "ListLineItemGroupEndpointProductListLineItemGroupPaginatedResponseModel": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "941272d1-f840-4e16-b698-0cd455c81e0e", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Cars", "description": "Charges for cars", "index": 1, "netTotal": "200000", "totalTax": "10", "grossTotal": "22000", "taxCategory": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" } } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "description": "LineItemGroups", "example": [ { "id": "941272d1-f840-4e16-b698-0cd455c81e0e", "invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8", "title": "Cars", "description": "Charges for cars", "index": 1, "netTotal": "200000", "totalTax": "10", "grossTotal": "22000", "taxCategory": { "id": "28227c88-6dba-455f-9b30-b9c76957e610", "name": "VAT" } } ], "items": { "$ref": "#/components/schemas/LineItemGroupResponseModel" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta5" } } }, "CreateCreditNoteLineItemGroupEndpointCreateCreditNoteLineItemGroupRequestModel": { "required": [ "title" ], "type": "object", "example": { "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users" }, "properties": { "lineItemGroupId": { "type": "string", "description": "Line Item Group ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "title": { "type": "string", "description": "Credit Note Line Item Group Title", "example": "Users" }, "description": { "type": "string", "description": "Credit Note Line Item Group Description", "example": "Credit note for users" } } }, "CreateCreditNoteLineItemGroupEndpointProductCreateCreditNoteLineItemGroupResponseModel": { "required": [ "creditNoteId", "grossTotal", "id", "index", "netTotal", "title", "totalTax" ], "type": "object", "example": { "id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec", "creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7", "lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7", "title": "Users", "description": "Credit note for users", "index": 2, "netTotal": "51.20", "totalTax": "2.50", "grossTotal": "101.23" }, "properties": { "id": { "type": "string", "description": "Credit Note Line Item Group ID", "example": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec" }, "creditNoteId": { "type": "string", "description": "Credit Note ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "lineItemGroupId": { "type": "string", "description": "Line Item Group ID", "example": "af60cab3-812d-4250-a051-0fb7133a00c7" }, "title": { "type": "string", "description": "Credit Note Line Item Group Title", "example": "Users" }, "description": { "type": "string", "description": "Credit Note Line Item Group Description", "example": "Credit note for users" }, "index": { "type": "integer", "description": "Index (for maintaining order)", "example": 2 }, "netTotal": { "type": "string", "description": "Net total", "example": "51.20" }, "totalTax": { "type": "string", "description": "Total tax", "example": "2.50" }, "grossTotal": { "type": "string", "description": "Gross total", "example": "101.23" } } }, "CreateLineItemGroupRequestModel": { "required": [ "title" ], "type": "object", "example": { "title": "Users", "description": "Charges for users", "taxCategoryId": "28227c88-6dba-455f-9b30-b9c76957e610", "revenueRecognitionMethod": "STRAIGHT_LINE", "revenueClassification": "EARNED", "servicePeriod": { "start": "2022-10-20", "endInclusive": "2022-10-24" } }, "properties": { "title": { "type": "string", "description": "Line Item Group Title", "example": "Users" }, "description": { "type": "string", "description": "Line Item Group Description", "example": "Charges for users" }, "taxCategoryId": { "type": "string", "description": "The tax category for all line items in this line item group", "example": "28227c88-6dba-455f-9b30-b9c76957e610" }, "revenueRecognitionMethod": { "description": "The revenue recognition method for all line items in this line item group", "$ref": "#/components/schemas/RevenueRecognitionMethod1" }, "revenueClassification": { "description": "The revenue classification for all line items in this line item group", "$ref": "#/components/schemas/RevenueClassification" }, "servicePeriod": { "$ref": "#/components/schemas/InclusiveDateRange" } } }, "ActivityLogListResponse": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "aa0e8400-e29b-41d4-a716-446655440005", "sequenceAccountId": "bb0e8400-e29b-41d4-a716-446655440006", "activityType": "NOTIFICATION", "apiVersion": "V1", "origin": "API", "traceId": "f26ad30d3be41b2f64fa7dbfb22ba5fd", "createdAt": "2024-01-01T10:00:00Z", "activityLogItems": [ { "id": "880e8400-e29b-41d4-a716-446655440003", "activityLogId": "990e8400-e29b-41d4-a716-446655440004", "verb": "CREATED", "name": "Invoice Created", "summary": "A new invoice was created for customer", "reason": "New billing cycle started", "metadata": [], "activityLogActor": { "id": "550e8400-e29b-41d4-a716-446655440000", "entityType": "USER", "entityId": "550e8400-e29b-41d4-a716-446655440123", "email": "john.doe@sequencehq.com" }, "activityLogObject": { "id": "660e8400-e29b-41d4-a716-446655440001", "entityType": "INVOICE", "entityId": "550e8400-e29b-41d4-a716-446655440456" }, "activityLogTarget": { "id": "770e8400-e29b-41d4-a716-446655440002", "entityType": "SEQUENCE_USER", "entityId": "550e8400-e29b-41d4-a716-446655440789" } } ] } ], "pagination": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 } }, "properties": { "items": { "type": "array", "example": [ { "id": "aa0e8400-e29b-41d4-a716-446655440005", "sequenceAccountId": "bb0e8400-e29b-41d4-a716-446655440006", "activityType": "NOTIFICATION", "apiVersion": "V1", "origin": "API", "traceId": "f26ad30d3be41b2f64fa7dbfb22ba5fd", "createdAt": "2024-01-01T10:00:00Z", "activityLogItems": [ { "id": "880e8400-e29b-41d4-a716-446655440003", "activityLogId": "990e8400-e29b-41d4-a716-446655440004", "verb": "CREATED", "name": "Invoice Created", "summary": "A new invoice was created for customer", "reason": "New billing cycle started", "metadata": [], "activityLogActor": { "id": "550e8400-e29b-41d4-a716-446655440000", "entityType": "USER", "entityId": "550e8400-e29b-41d4-a716-446655440123", "email": "john.doe@sequencehq.com" }, "activityLogObject": { "id": "660e8400-e29b-41d4-a716-446655440001", "entityType": "INVOICE", "entityId": "550e8400-e29b-41d4-a716-446655440456" }, "activityLogTarget": { "id": "770e8400-e29b-41d4-a716-446655440002", "entityType": "SEQUENCE_USER", "entityId": "550e8400-e29b-41d4-a716-446655440789" } } ] } ], "items": { "$ref": "#/components/schemas/ActivityLogResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMeta6" } } }, "ActivityLogResponse": { "required": [ "activityLogItems", "activityType", "createdAt", "id", "origin", "sequenceAccountId" ], "type": "object", "example": { "id": "aa0e8400-e29b-41d4-a716-446655440005", "sequenceAccountId": "bb0e8400-e29b-41d4-a716-446655440006", "activityType": "NOTIFICATION", "apiVersion": "V1", "origin": "API", "traceId": "f26ad30d3be41b2f64fa7dbfb22ba5fd", "createdAt": "2024-01-01T10:00:00Z", "activityLogItems": [ { "id": "880e8400-e29b-41d4-a716-446655440003", "activityLogId": "990e8400-e29b-41d4-a716-446655440004", "verb": "CREATED", "name": "Invoice Created", "summary": "A new invoice was created for customer", "reason": "New billing cycle started", "metadata": [], "activityLogActor": { "id": "550e8400-e29b-41d4-a716-446655440000", "entityType": "USER", "entityId": "550e8400-e29b-41d4-a716-446655440123", "email": "john.doe@sequencehq.com" }, "activityLogObject": { "id": "660e8400-e29b-41d4-a716-446655440001", "entityType": "INVOICE", "entityId": "550e8400-e29b-41d4-a716-446655440456" }, "activityLogTarget": { "id": "770e8400-e29b-41d4-a716-446655440002", "entityType": "SEQUENCE_USER", "entityId": "550e8400-e29b-41d4-a716-446655440789" } } ] }, "properties": { "id": { "type": "string", "example": "aa0e8400-e29b-41d4-a716-446655440005" }, "sequenceAccountId": { "type": "string", "example": "bb0e8400-e29b-41d4-a716-446655440006" }, "activityType": { "type": "string", "example": "NOTIFICATION" }, "apiVersion": { "type": "string", "example": "V1" }, "origin": { "type": "string", "example": "API" }, "traceId": { "type": "string", "example": "f26ad30d3be41b2f64fa7dbfb22ba5fd" }, "createdAt": { "type": "string", "format": "date-time", "example": "2024-01-01T10:00:00Z" }, "activityLogItems": { "type": "array", "example": [ { "id": "880e8400-e29b-41d4-a716-446655440003", "activityLogId": "990e8400-e29b-41d4-a716-446655440004", "verb": "CREATED", "name": "Invoice Created", "summary": "A new invoice was created for customer", "reason": "New billing cycle started", "metadata": [], "activityLogActor": { "id": "550e8400-e29b-41d4-a716-446655440000", "entityType": "USER", "entityId": "550e8400-e29b-41d4-a716-446655440123", "email": "john.doe@sequencehq.com" }, "activityLogObject": { "id": "660e8400-e29b-41d4-a716-446655440001", "entityType": "INVOICE", "entityId": "550e8400-e29b-41d4-a716-446655440456" }, "activityLogTarget": { "id": "770e8400-e29b-41d4-a716-446655440002", "entityType": "SEQUENCE_USER", "entityId": "550e8400-e29b-41d4-a716-446655440789" } } ], "items": { "$ref": "#/components/schemas/ActivityLogItemResponse" } } } }, "ActivityLogItemResponse": { "required": [ "activityLogActor", "activityLogId", "activityLogObject", "id", "name", "summary", "verb" ], "type": "object", "example": { "id": "880e8400-e29b-41d4-a716-446655440003", "activityLogId": "990e8400-e29b-41d4-a716-446655440004", "verb": "CREATED", "name": "Invoice Created", "summary": "A new invoice was created for customer", "reason": "New billing cycle started", "metadata": [], "activityLogActor": { "id": "550e8400-e29b-41d4-a716-446655440000", "entityType": "USER", "entityId": "550e8400-e29b-41d4-a716-446655440123", "email": "john.doe@sequencehq.com" }, "activityLogObject": { "id": "660e8400-e29b-41d4-a716-446655440001", "entityType": "INVOICE", "entityId": "550e8400-e29b-41d4-a716-446655440456" }, "activityLogTarget": { "id": "770e8400-e29b-41d4-a716-446655440002", "entityType": "SEQUENCE_USER", "entityId": "550e8400-e29b-41d4-a716-446655440789" } }, "properties": { "id": { "type": "string", "example": "880e8400-e29b-41d4-a716-446655440003" }, "activityLogId": { "type": "string", "example": "990e8400-e29b-41d4-a716-446655440004" }, "verb": { "type": "string", "example": "CREATED" }, "name": { "type": "string", "example": "Invoice Created" }, "summary": { "type": "string", "example": "A new invoice was created for customer" }, "reason": { "type": "string", "example": "New billing cycle started" }, "metadata": { "type": "array", "example": [], "items": {} }, "activityLogActor": { "$ref": "#/components/schemas/ActivityLogActorResponse" }, "activityLogObject": { "$ref": "#/components/schemas/ActivityLogObjectResponse" }, "activityLogTarget": { "$ref": "#/components/schemas/ActivityLogTargetResponse" } } }, "ActivityLogActorResponse": { "required": [ "entityType", "id" ], "type": "object", "example": { "id": "550e8400-e29b-41d4-a716-446655440000", "entityType": "USER", "entityId": "550e8400-e29b-41d4-a716-446655440123", "email": "john.doe@sequencehq.com" }, "properties": { "id": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440000" }, "entityType": { "type": "string", "example": "USER" }, "entityId": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440123" }, "email": { "type": "string", "example": "john.doe@sequencehq.com" } } }, "ActivityLogObjectResponse": { "required": [ "entityType", "id" ], "type": "object", "example": { "id": "660e8400-e29b-41d4-a716-446655440001", "entityType": "INVOICE", "entityId": "550e8400-e29b-41d4-a716-446655440456" }, "properties": { "id": { "type": "string", "example": "660e8400-e29b-41d4-a716-446655440001" }, "entityType": { "type": "string", "example": "INVOICE" }, "entityId": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440456" } } }, "ActivityLogTargetResponse": { "required": [ "entityType", "id" ], "type": "object", "example": { "id": "770e8400-e29b-41d4-a716-446655440002", "entityType": "SEQUENCE_USER", "entityId": "550e8400-e29b-41d4-a716-446655440789" }, "properties": { "id": { "type": "string", "example": "770e8400-e29b-41d4-a716-446655440002" }, "entityType": { "type": "string", "example": "SEQUENCE_USER" }, "entityId": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440789" } } }, "PaginationMeta6": { "type": "object", "example": { "after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3", "before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz", "totalResultSize": 10 }, "properties": { "after": { "type": "string", "description": "Cursor for the page after this (if it exists)", "example": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3" }, "before": { "type": "string", "description": "Cursor for the page before this (if it exists)", "example": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz" }, "totalResultSize": { "type": "integer", "description": "Total number of entries across all pages", "format": "int64", "example": 10 } } }, "NotificationPolicy": { "required": [ "channel", "createdAt", "id", "name", "recipients", "sequenceAccountId" ], "type": "object", "example": { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com", "operations@example.com" ], "channel": "EMAIL" }, "properties": { "id": { "type": "string", "description": "Unique ID", "example": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133" }, "createdAt": { "type": "string", "description": "Created at", "example": "2022-06-28T16:47:00Z" }, "sequenceAccountId": { "type": "string", "description": "Sequence Account which this policy matches", "example": "c4602d51-0fb4-4b48-b689-6ba28f540d1e" }, "name": { "type": "string", "description": "Human-readable name", "example": "Finance team emails" }, "notificationTypes": { "type": "array", "description": "Set of notification types that this policy matches. If not present this policy will cover all notification types.", "example": [ "CUSTOMER_CREATED" ], "items": { "$ref": "#/components/schemas/NotificationType" } }, "recipients": { "type": "array", "description": "The webhook URLs or email addresses which will receive notifications, depending on the channel", "example": [ "finance@example.com", "operations@example.com" ], "items": { "type": "string" } }, "channel": { "description": "Notification channel", "$ref": "#/components/schemas/NotificationChannel" }, "webhookSecret": { "type": "string", "description": "Webhook secret used to generate a signature header that's sent with an outbound webhook.It can be used to verify the authenticity of received Sequence webhooks. Only available for webhook channel policies.", "example": "whsec_AutoGeneratedSecret01234567890ab" } } }, "NotificationType": { "type": "string", "example": "CUSTOMER_CREATED", "enum": [ "CUSTOMER_CREATED", "CUSTOMER_UPDATED", "CUSTOMER_ARCHIVED", "INVOICE_CREATED", "INVOICE_ISSUED", "INVOICE_UPDATED", "INTEGRATION_SYNC_COMPLETED", "INTEGRATION_WEBHOOK_HANDLED", "MERCHANT_UPDATED", "BILLING_SCHEDULE_CREATED", "BILLING_SCHEDULE_UPDATED", "BILLING_SCHEDULE_ARCHIVED", "CREDIT_NOTE_CREATED", "CREDIT_NOTE_UPDATED", "CREDIT_NOTE_ISSUED", "QUOTE_PUBLISHED", "QUOTE_ACCEPTED", "QUOTE_SIGNED", "INVOICE_REMINDER_SENT", "WATCHTOWER_TASK_ASSIGNED" ] }, "NotificationChannel": { "type": "string", "example": "EMAIL", "enum": [ "WEBHOOK", "EMAIL" ] }, "DatabaseErrors": { "required": [ "errors" ], "type": "object", "example": { "errors": [] }, "properties": { "errors": { "type": "array", "example": [], "items": {} } } }, "AddNotificationTypesToPolicyRequest": { "required": [ "notificationTypes" ], "type": "object", "example": { "notificationTypes": [ "CUSTOMER_CREATED" ] }, "properties": { "notificationTypes": { "type": "array", "description": "The notification types to add to this policy", "example": [ "CUSTOMER_CREATED" ], "items": { "$ref": "#/components/schemas/NotificationType" } } } }, "CreateNotificationPolicyRequest": { "required": [ "channel", "name", "recipients" ], "type": "object", "example": { "name": "Dev team integration webhooks", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "https://api.company.com/webhooks" ], "channel": "WEBHOOK", "webhookSecret": "whsec_UserSubmittedSecret1234567890abc" }, "properties": { "name": { "type": "string", "description": "Human-readable name", "example": "Dev team integration webhooks" }, "notificationTypes": { "type": "array", "description": "Set of notification types that this policy matches. If not provided, then this policy will apply to all notification types.", "example": [ "CUSTOMER_CREATED" ], "items": { "$ref": "#/components/schemas/NotificationType" } }, "recipients": { "type": "array", "description": "The webhook URLs or email addresses which will receive notifications, depending on the channel", "example": [ "https://api.company.com/webhooks" ], "items": { "type": "string" } }, "channel": { "description": "Notification channel", "$ref": "#/components/schemas/NotificationChannel" }, "webhookSecret": { "type": "string", "description": "Webhook secret used to generate a signature header that's sent with an outbound webhook.It can be used to verify the authenticity of received Sequence webhooks. Only available for webhook channel policies.", "example": "whsec_UserSubmittedSecret1234567890abc" } } }, "NotificationPolicies": { "required": [ "items", "pagination" ], "type": "object", "example": { "items": [ { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com" ], "channel": "EMAIL" } ], "pagination": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 } }, "properties": { "items": { "type": "array", "description": "Notification policies", "example": [ { "id": "9c4c54e7-59da-44ae-9cc5-7fd81be7c133", "createdAt": "2022-06-28T16:47:00Z", "sequenceAccountId": "c4602d51-0fb4-4b48-b689-6ba28f540d1e", "name": "Finance team emails", "notificationTypes": [ "CUSTOMER_CREATED" ], "recipients": [ "finance@example.com" ], "channel": "EMAIL" } ], "items": { "$ref": "#/components/schemas/NotificationPolicy" } }, "pagination": { "$ref": "#/components/schemas/PaginationResponse3" } } }, "PaginationResponse3": { "type": "object", "description": "Results pagination", "example": { "after": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==", "before": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND", "totalResultSize": 100 }, "properties": { "after": { "type": "string", "description": "Copy this value to the `after` parameter of your next request to retrieve the next page of results", "example": "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==" }, "before": { "type": "string", "description": "Copy this value to the `before` parameter of your next request to retrieve the next page of results", "example": "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND" }, "totalResultSize": { "type": "integer", "description": "Total number of entries across all pages", "format": "int64", "example": 100 } } }, "AddRecipientsToPolicyRequest": { "required": [ "recipients" ], "type": "object", "example": { "recipients": [ "operations@example.com" ] }, "properties": { "recipients": { "type": "array", "description": "The webhook URLs or email addresses to add to the policy, depending on its channel", "example": [ "operations@example.com" ], "items": { "type": "string" } } } } }, "requestBodies": {} } }