From 6e4600371308bc49865038dd366eebc15febac14 Mon Sep 17 00:00:00 2001 From: Nate Stewart Date: Fri, 27 Sep 2024 09:59:51 -0400 Subject: [PATCH] Combine B2B invoice, payments, and receipt specs (#539) This enables the specs to be organized under "Invoice Management" in the dev center. Once this is merged and devcenter updates, we can remove the separate invoice, payment, and receipt files. --------- Co-authored-by: Traci Porter --- .../specs/api-v3/invoice-management.yaml | 4385 +++++++++++++++++ 1 file changed, 4385 insertions(+) create mode 100644 docs/b2b-edition/specs/api-v3/invoice-management.yaml diff --git a/docs/b2b-edition/specs/api-v3/invoice-management.yaml b/docs/b2b-edition/specs/api-v3/invoice-management.yaml new file mode 100644 index 000000000..4346d7302 --- /dev/null +++ b/docs/b2b-edition/specs/api-v3/invoice-management.yaml @@ -0,0 +1,4385 @@ +openapi: '3.0.1' +info: + title: BigCommerce B2B Edition API + description: API for Invoices, Payments, and Receipts in BigCommerce B2B Edition + version: v3 + termsOfService: 'https://www.bigcommerce.com/terms' + contact: + name: BigCommerce + url: 'https://www.bigcommerce.com' + email: support@bigcommerce.com +servers: + - url: "https://api-b2b.bigcommerce.com/api/v3/io/ip" +security: + - authToken: [] +tags: + - name: Invoice + description: Invoice + - name: Payments + description: Payments + - name: Receipt + description: Receipt +components: + responses: + "Invoice404": + description: Example response + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + errMsg: + type: string + minLength: 1 + required: + - errMsg + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 404 + data: + errMsg: Invoice does not exist + meta: + message: Not Found Error + examples: + example-1: + value: + code: 404 + data: + errMsg: Invoice does not exist + meta: + message: Not Found Error + "Payment400": + description: Example response + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + errMsg: + type: string + minLength: 1 + required: + - errMsg + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 400 + data: + errMsg: The payment operation is not allowed. + meta: + message: Not Found Error + examples: + example-1: + value: + code: 400 + data: + errMsg: The payment operation is not allowed. + meta: + message: Not Found Error + example-2: + value: + code: 400 + data: + errMsg: The payment processing status is not allowed. + meta: + message: Not Found Error + "Payment404": + description: Example response + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + errMsg: + type: string + minLength: 1 + required: + - errMsg + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 404 + data: + errMsg: Payment does not exist + meta: + message: Not Found Error + examples: + example: + value: + code: 404 + data: + errMsg: Payment does not exist + meta: + message: Not Found Error + "Payment422": + description: Example response + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 422 + meta: + message: Parameter Error + data: + lineItems: + - This field is required. + properties: + code: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + data: + type: object + required: + - currency + properties: + currency: + type: array + items: + type: string + required: + - code + - meta + - data + examples: + example: + value: + code: 422 + meta: + message: Parameter Error + data: + currency: [USD] + "Receipt404": + description: Example response + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + errMsg: + type: string + minLength: 1 + required: + - errMsg + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 404 + data: + errMsg: Receipt does not exist + meta: + message: Not Found Error + examples: + example-1: + value: + code: 404 + data: + errMsg: Receipt does not exist + meta: + message: Not Found Error + schemas: {} + securitySchemes: + authToken: + name: authToken + description: Include the `authToken` in a header parameter. + type: apiKey + in: header +paths: + "/invoices/{invoiceId}": + parameters: + - schema: + type: string + name: invoiceId + in: path + required: true + description: invoice id + get: + summary: Get invoice detail + operationId: get-invoices-invoiceId + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + allOf: + - $ref: '../../models/invoice_portal/invoice.yaml' + - $ref: '../../models/extra_fields/extra_field_values.yaml' + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - meta + examples: + "200": + value: + code: 200 + data: + id: 9 + customerId: "95075" + externalId: "23" + externalCustomerId: "123" + invoiceNumber: "00000009" + type: Invoice on Shipment + dueDate: 1617675497 + status: 1 + orderNumber: "104" + purchaseOrderNumber: "123" + details: + type: StandardInvoiceDetails + header: + costLines: + - amount: + code: USD + value: "349.5000" + description: Subtotal + - amount: + code: USD + value: "0.0000" + description: Freight + - amount: + code: USD + value: "0.0000" + description: Sales Tax + orderDate: 1616809386 + billingAddress: + city: 成都 + state: District of Columbia + country: United States + street1: tianfuwujie + street2: ruanjianyuan + zipCode: "123" + lastName: xu + firstName: stanton + customFields: {} + customerFields: {} + shippingAddresses: + - city: 成都 + state: District of Columbia + country: United States + street1: tianfuwujie + street2: ruanjianyuan + zipCode: "123" + lastName: xu + firstName: stanton + customFields: {} + details: + shipments: + - addressIndex: string + shipDate: string + shipVia: string + trackingNumber: string + comments: string + customFields: {} + lineItems: + - sku: DPB + type: physical + comments: "physical item" + quantity: "10" + unitPrice: + code: USD + value: "34.95" + description: "[Sample] Dustpan & Brush" + customFields: {} + unitDiscount: + code: USD + value: "12" + - sku: DD + type: product + comments: "product DD" + quantity: "10" + unitPrice: + code: USD + value: "3" + description: "[Sample] Dustpan " + customFields: {} + unitDiscount: + code: USD + value: "1" + isPendingPayment: 1 + source: 0 + originalBalance: + code: USD + value: "349.5000" + openBalance: + code: USD + value: "913.4300" + customerName: silk + meta: + message: SUCCESS + example-1: + value: + code: 0 + data: + id: 0 + customerId: string + externalCustomerId: string + externalId: string + invoiceNumber: string + type: string + dueDate: 0 + status: 0 + orderNumber: string + purchaseOrderNumber: string + details: + type: string + header: + costLines: + - amount: + code: string + value: string + description: string + orderDate: 0 + billingAddress: + city: string + state: string + country: string + street1: string + street2: string + zipCode: string + lastName: string + firstName: string + customFields: {} + customerFields: {} + shippingAddresses: + - city: string + state: string + country: string + street1: string + street2: string + zipCode: string + lastName: string + firstName: string + customFields: {} + details: + shipments: + - addressIndex: string + shipDate: string + shipVia: string + trackingNumber: string + comments: string + customFields: {} + lineItems: + - sku: string + type: string + comments: string + quantity: string + unitPrice: + code: USA + value: string + description: string + customFields: {} + unitDiscount: + code: string + value: string + isPendingPayment: 0 + source: 0 + originalBalance: + code: string + value: string + openBalance: + code: string + value: string + customerName: string + createdAt: string + updatedAt: string + channelId: "1" + channelName: string + meta: + message: string + "404": + $ref: "#/components/responses/Invoice404" + description: get invoice detail + parameters: [] + tags: + - Invoice + put: + summary: Update an invoice + operationId: put-invoices-invoiceId + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - id + properties: + id: + type: number + description: Invoice ID + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 33 + meta: + message: SUCCESS + "400": + value: + code: 400 + meta: + message: Bad Requests Error + errors: "Please enter a valid number; " + data: + id: 33 + description: update an invoice + parameters: [] + requestBody: + content: + application/json: + schema: + description: "" + x-examples: + example-1: + id: 0 + customerId: string + externalCustomerId: string + externalId: string + invoiceNumber: string + type: string + dueDate: 0 + status: 0 + orderNumber: string + purchaseOrderNumber: string + details: + type: string + header: + costLines: + - amount: + code: string + value: string + description: string + orderDate: 0 + billingAddress: + city: string + state: string + country: string + street1: string + street2: string + zipCode: string + lastName: string + firstName: string + customFields: {} + customerFields: string + shippingAddresses: + - city: string + state: string + country: string + street1: string + street2: string + zipCode: string + lastName: string + firstName: string + customFields: {} + details: + shipments: + - addressIndex: string + shipDate: string + shipVia: string + trackingNumber: string + comments: string + customFields: {} + lineItems: + - sku: string + type: string + comments: string + quantity: string + unitPrice: + code: USA + value: string + description: string + customFields: {} + unitDiscount: + code: string + value: string + isPendingPayment: 0 + source: 0 + originalBalance: + code: string + value: string + openBalance: + code: string + value: string + customerName: string + createdAt: string + updatedAt: string + allOf: + - type: object + properties: + customerId: + type: string + minLength: 1 + description: B2B Edition Company ID + externalCustomerId: + type: string + minLength: 1 + description: Ext Customer ID + externalId: + type: string + minLength: 1 + description: Ext Invoice ID + invoiceNumber: + type: string + minLength: 1 + description: "Invoice Number, must be unique" + type: + type: string + minLength: 1 + dueDate: + type: number + description: Invoice due date + status: + type: number + description: "invoice status, noted status will be auto set to 2 when open balance is <= 0" + purchaseOrderNumber: + type: string + minLength: 1 + description: PO Number + details: + type: object + description: "Details that will show on the invoice. When updating this field, the new value will completely replace the existing details. To preserve existing details while making updates, retrieve the current details first, and make your edits to that object before submitting the changes." + properties: + header: + type: object + properties: + costLines: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + amount: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + description: + type: string + minLength: 1 + required: + - amount + - description + billingAddress: + type: object + properties: + city: + type: string + minLength: 1 + state: + type: string + minLength: 1 + country: + type: string + minLength: 1 + street1: + type: string + minLength: 1 + street2: + type: string + minLength: 1 + zipCode: + type: string + minLength: 1 + lastName: + type: string + minLength: 1 + firstName: + type: string + minLength: 1 + customFields: + type: string + required: + - city + - state + - country + - street1 + - street2 + - zipCode + - lastName + - firstName + - customFields + shippingAddresses: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + city: + type: string + minLength: 1 + state: + type: string + minLength: 1 + country: + type: string + minLength: 1 + street1: + type: string + minLength: 1 + street2: + type: string + minLength: 1 + zipCode: + type: string + minLength: 1 + lastName: + type: string + minLength: 1 + firstName: + type: string + minLength: 1 + required: + - city + - state + - country + - street1 + - street2 + - zipCode + - lastName + - firstName + details: + type: object + properties: + shipments: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + addressIndex: + type: string + minLength: 1 + shipDate: + type: string + minLength: 1 + shipVia: + type: string + minLength: 1 + trackingNumber: + type: string + minLength: 1 + comments: + type: string + minLength: 1 + required: + - addressIndex + - shipDate + - shipVia + - trackingNumber + - comments + lineItems: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + sku: + type: string + minLength: 1 + type: + type: string + minLength: 1 + comments: + type: string + minLength: 1 + quantity: + type: string + minLength: 1 + unitPrice: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + description: + type: string + description: Product description or product name. This field is required for custom product. + minLength: 1 + unitDiscount: + type: object + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + required: + - sku + - quantity + - unitPrice + source: + type: number + description: "Mark the source of the invoice, 0 for B2B Edition, 1 for external." + originalBalance: + type: object + description: Invoice original balance + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + openBalance: + type: object + description: Invoice balance awaiting for payment + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + createdAt: + type: integer + externalPdfUrl: + type: string + description: The URL of an externally hosted PDF file to be associated with this invoice. The file size must not exceed 5 MB. Ensure that the file hosting service supports Cross-Origin Resource Sharing (CORS) to allow our system to access the file. To remove an existing PDF link, use an empty string. + - $ref: '../../models/extra_fields/extra_field_values.yaml' + examples: + Update body with details field: + value: + customerId: "3" + dueDate: 1619826907 + details: + header: + costLines: + - amount: + code: USD + value: "400.0000" + description: Subtotal + - amount: + code: USD + value: "0.0000" + description: Freight + - amount: + code: USD + value: "0.0000" + description: Sales Tax + details: + lineItems: + - sku: CLC + type: physical + comments: "item comments" + quantity: "2" + unitPrice: + code: USD + value: "200.0000" + description: "[Sample] Canvas Laundry Cart" + openBalance: + code: USD + value: "12.0000" + Update body without details field: + value: + openBalance: + code: USD + value: "12.0000" + tags: + - Invoice + delete: + summary: Delete an invoice + operationId: delete-invoices-invoiceId + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + id: + type: number + description: Invoice ID + meta: + type: object + required: + - message + properties: + message: + type: string + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 12 + meta: + message: Success + "404": + $ref: "#/components/responses/Invoice404" + description: delete an invoice + parameters: [] + tags: + - Invoice + /invoices: + post: + summary: Create Invoice + operationId: post-invoices + description: Create Invoice + parameters: [] + requestBody: + content: + application/json: + schema: + allOf: + - type: object + properties: + invoiceNumber: + type: string + description: Invoice no. + type: + type: string + default: Invoice + description: Invoice type + dueDate: + type: integer + description: "The due date for this invoice, specified as a Unix timestamp. If left empty, it will be set to the current date plus a pre-configured number of days (set in your B2B Edition control panel settings)." + status: + type: integer + default: 0 + enum: + - 0 + - 1 + - 2 + description: |- + Invoice status. Possible values: + 0: Open (default) + 1: Partially paid + 2: Completed + + The status will automatically be set to Completed (2) when the open balance becomes zero or negative. + orderNumber: + type: string + description: BigCommerce order ID associated with this invoice. + purchaseOrderNumber: + type: string + description: PO Number + originalBalance: + type: object + description: Original balance + required: + - code + - value + properties: + code: + type: string + description: Currency code + example: USD + value: + type: number + description: Amount + openBalance: + type: object + description: "Open balance , when it is <= 0, status will be auto set to 2" + required: + - code + - value + properties: + code: + type: string + description: Currency code + example: USD + value: + type: number + description: Amount + issuedAt: + type: number + description: When the invoice was created. The current timestamp is the default. + details: + type: object + description: Invoice details + properties: + header: + type: object + properties: + costLines: + type: array + description: "Invoice cost information. This field is optional. If provided, it should contain an array of cost line items. The information in this field will be displayed on the invoice detail page." + items: + type: object + properties: + amount: + type: object + description: cost amount + required: + - code + - value + properties: + code: + type: string + description: currency code + value: + type: string + description: amount + description: + type: string + description: Price description, e.g., subtotal or other types of prices or fees. + required: + - amount + - description + billingAddress: + type: object + description: "Invoice billing address. This field is optional. If provided, it should contain an object with address details." + properties: + city: + type: string + state: + type: string + country: + type: string + street1: + type: string + street2: + type: string + zipCode: + type: string + lastName: + type: string + firstName: + type: string + required: + - city + - state + - country + - street1 + - street2 + - zipCode + - lastName + - firstName + shippingAddresses: + type: array + description: "Invoice shipping address. This field is optional. If provided, it should contain an object with address details." + items: + type: object + properties: + city: + type: string + state: + type: string + country: + type: string + street1: + type: string + street2: + type: string + zipCode: + type: string + lastName: + type: string + firstName: + type: string + required: + - city + - state + - country + - street1 + - street2 + - zipCode + - lastName + - firstName + details: + type: object + properties: + shipments: + type: array + description: "Invoice shipments. This field is optional. If provided, it should contain an array of shipments. Required fields within each shipment object can be an empty string." + items: + type: object + properties: + addressIndex: + type: string + description: address ID + shipDate: + type: string + description: shipment time + shipVia: + type: string + trackingNumber: + type: string + description: tracking number + comments: + type: string + required: + - addressIndex + - shipDate + - shipVia + - trackingNumber + - comments + lineItems: + type: array + description: "Products within the invoice. This field is optional. If provided, it should contain an array of products." + items: + type: object + properties: + sku: + type: string + description: product sku + type: + type: string + description: product type + comments: + type: string + quantity: + type: string + description: product quantity + unitPrice: + type: object + description: product unit price + required: + - code + - value + properties: + code: + type: string + description: currency code + value: + type: string + description: amount + description: + type: string + description: Product description or product name. This field is required for custom product. + unitDiscount: + type: object + description: "Product level discount details. This field is optional. If provided, it should contain a discount object." + properties: + code: + type: string + description: currency code + value: + type: string + description: amount + required: + - code + - value + required: + - sku + - quantity + - unitPrice + source: + type: number + default: 0 + description: |- + The source of the invoice. Possible values: + 0: B2B Edition + 1: External + enum: + - 0 + - 1 + customerId: + type: string + description: B2B Edition Company ID + externalId: + type: string + description: ERP Invoice ID + externalCustomerId: + type: string + description: ERP Customer ID + channelId: + type: integer + description: BigCommerce Channel ID + externalPdfUrl: + type: string + description: The URL of an externally hosted PDF file to be associated with this invoice. The file size must not exceed 5 MB. Ensure that the file hosting service supports Cross-Origin Resource Sharing (CORS) to allow our system to access the file. + termsConditions: + type: string + description: Terms & Conditions. Visible on the default Invoice PDF. + required: + - invoiceNumber + - originalBalance + - openBalance + - customerId + - $ref: '../../models/extra_fields/extra_field_values.yaml' + examples: + Invoice body with details info: + value: + invoiceNumber: "0000001" + dueDate: 1619161808 + status: 0 + originalBalance: + code: USD + value: 100 + openBalance: + code: USD + value: 100 + issuedAt: 1619161808 + details: + header: + costLines: + - amount: + code: USD + value: "90.00" + description: Subtotal + - amount: + code: USD + value: "10.00" + description: Freight + - amount: + code: USD + value: "0.00" + description: Sales Tax + billingAddress: + city: Chengdu + state: Sichuan + country: China + street1: TianFuWuJie + street2: "" + zipCode: "12345" + lastName: Test + firstName: B2B + shippingAddresses: + - city: Chengdu + state: Sichuan + country: China + street1: TianFuWuJie + street2: "" + zipCode: "12345" + lastName: Test + firstName: B2B + details: + lineItems: + - sku: Test-1 + quantity: "2" + unitPrice: + code: USD + value: "40.00" + description: A custom product requires a description. + customerId: "12345" + channelId: 1 + Invoice body without details info: + value: + invoiceNumber: "0000001" + originalBalance: + code: USD + value: 100 + openBalance: + code: USD + value: 100 + customerId: "12345" + channelId: 1 + description: "" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + description: "200" + data: + type: object + properties: + id: + type: number + description: Invoice ID + meta: + type: object + properties: + message: + type: string + description: Success + errors: + type: string + examples: + "200": + value: + code: 200 + data: + id: 12 + meta: + message: Success + "400": + value: + code: 400 + data: + errMsg: The invoice number already exists. + meta: + message: Bad Requests Error + tags: + - Invoice + parameters: [] + get: + summary: Get invoices + operationId: get-invoices + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + allOf: + - $ref: '../../models/invoice_portal/invoice.yaml' + - $ref: '../../models/extra_fields/extra_field_values.yaml' + meta: + type: object + x-stoplight: + id: pht8y928miqy9 + properties: + message: + type: string + x-stoplight: + id: 2jm99sqmjeuty + pagination: + type: object + x-stoplight: + id: mqkl3sn242e8h + properties: + totalCount: + type: integer + x-stoplight: + id: 9mfisvvpi367o + limit: + type: integer + x-stoplight: + id: orpbdnwbh09j8 + offset: + type: integer + x-stoplight: + id: hhcd4o48fb5k6 + examples: + example: + value: + code: 200 + data: + - id: 33 + customerId: "3" + externalId: "123" + externalCustomerId: "123" + invoiceNumber: "00000033" + type: Invoice on Shipment + dueDate: 1619826907 + status: 0 + orderNumber: "132" + purchaseOrderNumber: "123" + details: + type: StandardInvoiceDetails + header: + costLines: + - amount: + code: USD + value: "400.0000" + description: Subtotal + - amount: + code: USD + value: "0.0000" + description: Freight + - amount: + code: USD + value: "0.0000" + description: Sales Tax + orderDate: 1618246864 + billingAddress: + city: montreal + state: California + country: United States + street1: test + street2: test + zipCode: "111111" + lastName: test + firstName: test + customFields: {} + customerFields: {} + shippingAddresses: + - city: montreal + state: California + country: United States + street1: test + street2: test + zipCode: "111111" + lastName: test + firstName: test + customFields: {} + details: + lineItems: + - sku: CLC + type: physical + comments: "item comments" + quantity: "2" + unitPrice: + code: USD + value: "200.0000" + description: "[Sample] Canvas Laundry Cart" + customFields: {} + unitDiscount: + code: USD + value: "0" + shipments: + - addressIndex: string + shipDate: string + shipVia: string + trackingNumber: string + comments: string + customFields: {} + isPendingPayment: 1 + source: 0 + originalBalance: + code: USD + value: "400.0000" + openBalance: + code: USD + value: "400.0000" + customerName: ABC123 + channelId: "1" + channelName: string + description: get invoices + parameters: + - schema: + type: number + in: query + name: offset + - schema: + type: number + in: query + name: limit + - schema: + type: string + enum: + - DESC + - ASC + example: DESC + in: query + name: orderBy + description: '"DESC" or "ASC"' + - schema: + type: string + enum: + - invoiceNumber + - createdAt + - customerId + - externalCustomerId + - dueDate + - updatedAt + - isPendingPayment + - openBalance + - originalBalance + - status + example: invoiceNumber + in: query + name: sortBy + description: Sort by the field value + - schema: + type: string + enum: + - invoiceNumber + - type + - orderNumber + - purchaseOrderNumber + - customerId + - externalCustomerId + example: invoiceNumber + in: query + name: searchBy + description: Filter by a field + - schema: + type: string + in: query + name: q + description: 'You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".' + - schema: + type: string + in: query + name: customerName + description: Query by invoice B2B Edition company name + - schema: + type: string + in: query + name: customerId + description: Query by invoice B2B Edition company ID + - schema: + type: integer + enum: + - 0 + - 1 + - 2 + example: 1 + in: query + name: status + description: Query by invoice status + - schema: + type: string + in: query + name: beginDateAt + description: 'Query by the created timestamp, along with the "endDateAt" parameter' + - schema: + type: string + in: query + name: endDateAt + description: 'Query by the created timestamp, along with the with the "beginDateAt" parameter' + - schema: + type: array + items: + type: number + in: query + name: "externalId[]" + description: Query by the invoice external ID + - schema: + type: string + enum: + - "0" + - "1" + in: query + name: isIncludeExtraFields + description: Determine if extra fields should show in the response + - schema: + type: array + items: + type: number + in: query + name: channelIds + description: BigCommerce Channel IDs + tags: + - Invoice + /invoices/export: {} + "/orders/{orderId}/invoices": + parameters: + - schema: + type: number + name: orderId + in: path + required: true + description: B2B Edition order ID + post: + summary: Create invoice from order + tags: + - Invoice + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - invoiceNumber + - invoiceId + properties: + invoiceNumber: + type: string + minLength: 1 + description: Invoice number + invoiceId: + type: number + description: Invoice ID + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + invoiceNumber: "00000036" + invoiceId: 36 + meta: + message: SUCCESS + "404": + value: + code: 404 + data: + invoiceId: 36 + invoiceNumber: "00000036" + errMsg: Order does not exist + meta: + message: Not Found Error + operationId: post-orders-orderId-invoices + description: create invoice from B2B Edition order + parameters: [] + "/invoices/{invoiceId}/download-pdf": + parameters: + - schema: + type: string + name: invoiceId + in: path + required: true + get: + summary: invoice download pdf + operationId: get-invoices-invoiceId-download-pdf + description: Get invoice download PDF + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: integer + data: + type: object + properties: + url: + type: string + externalPdfUrl: + type: string + description: The URL of an externally hosted PDF file to be associated with this invoice. The file size must not exceed 5 MB. Ensure that the file hosting service supports Cross-Origin Resource Sharing (CORS) to allow our system to access the file. + meta: + type: object + properties: + message: + type: string + x-examples: + example-1: + code: 200 + data: + url: "https://s3-us-west-2.amazonaws.com/bundleb2b-v2.0-quote-staging/B3_V3_dev_00000012.pdf" + meta: + message: SUCCESS + examples: {} + "404": + description: Not Found + content: + application/json: + schema: + type: object + properties: + code: + type: integer + data: + type: object + properties: + errMsg: + type: string + meta: + type: object + properties: + message: + type: string + x-examples: + example-1: + code: 404 + data: + errMsg: Invoice does not exist + meta: + message: Not Found Error + tags: + - Invoice + "/invoices/{invoiceId}/send-mail": + parameters: + - schema: + type: string + name: invoiceId + in: path + required: true + /invoices/extra-fields: + get: + summary: Get invoice extra field configs + tags: + - Invoice + responses: + "200": + description: OK + content: + application/json: + schema: + allOf: + - $ref: '../../models/utils/response-object.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../../models/extra_fields/extra_fields.yaml' + meta: + $ref: '../../models/utils/pagination.yaml' + operationId: get-invoices-extra-fields + description: Get invoice extra field configs + parameters: + - $ref: '../../specs/api-v3/user/user.yaml#/components/parameters/offset' + - $ref: '../../specs/api-v3/user/user.yaml#/components/parameters/limit' + + /payments: + get: + summary: Get Payments + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + x-examples: + example-1: + code: 200 + data: + - id: 117 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + payerName: Check + payerCustomerId: "6041" + details: + memo: k + moduleName: payments_offline + fees: [] + moduleData: + transactions: + - memo: k + type: OfflineTransaction + rawTransaction: null + processingStatus: 3 + appliedStatus: 1 + fundingStatus: 2 + total: + code: GBP + value: "0.7800" + lineItems: + - paymentId: 117 + invoiceId: 141 + invoiceNumber: "00000141" + amount: + code: GBP + value: "0.7800" + customerName: "" + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + payerName: + type: string + minLength: 1 + payerCustomerId: + type: string + minLength: 1 + details: + type: object + properties: + memo: + type: string + minLength: 1 + required: + - memo + moduleName: + type: string + minLength: 1 + fees: + type: array + items: + type: number + moduleData: + type: object + properties: + transactions: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + memo: + type: string + minLength: 1 + type: + type: string + minLength: 1 + rawTransaction: + type: array + nullable: true + items: {} + required: + - memo + - type + required: + - transactions + processingStatus: + type: number + appliedStatus: + type: number + fundingStatus: + type: number + total: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + lineItems: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + paymentId: + type: number + invoiceId: + type: number + invoiceNumber: + type: string + minLength: 1 + amount: + type: object + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + required: + - paymentId + - invoiceId + - invoiceNumber + customerName: + type: string + allowedOperations: + type: array + items: + type: number + allowedStatuses: + type: array + items: + type: number + channelId: + type: string + description: BigCommerce Channel ID + channelName: + type: string + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - payerName + - payerCustomerId + - moduleName + - processingStatus + - appliedStatus + - fundingStatus + - total + - lineItems + - customerName + meta: + type: object + required: + - pagination + - message + properties: + pagination: + type: object + required: + - totalCount + - offset + - limit + properties: + totalCount: + type: number + offset: + type: number + limit: + type: number + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + - id: 70 + createdAt: 1618800393 + updatedAt: 1618803026 + storeHash: jexy81vb0h + customerId: "95075" + externalId: null + externalCustomerId: null + payerName: Store offline payment + payerCustomerId: "95075" + details: + memo: "memo" + moduleName: payments_offline + fees: [] + moduleData: + transactions: + - memo: k + type: OfflineTransaction + rawTransaction: null + processingStatus: 3 + appliedStatus: 1 + fundingStatus: 2 + total: + code: USD + value: "6.0000" + lineItems: + - paymentId: 70 + invoiceId: 26 + invoiceNumber: "00000141" + amount: + code: USD + value: "6.0000" + customerName: silk + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + - id: 66 + createdAt: 1618590401 + updatedAt: 1618797215 + storeHash: jexy81vb0h + customerId: "3" + externalId: null + externalCustomerId: null + payerName: Store offline payment + payerCustomerId: "3" + details: + memo: "Check#:12345" + moduleName: payments_offline + fees: [] + moduleData: + transactions: + - memo: k + type: OfflineTransaction + rawTransaction: null + processingStatus: 2 + appliedStatus: 1 + fundingStatus: 2 + total: + code: USD + value: "30.0000" + lineItems: + - paymentId: 66 + invoiceId: 30 + invoiceNumber: "00000141" + amount: + code: USD + value: "10.0000" + - paymentId: 66 + invoiceId: 28 + invoiceNumber: "00000141" + amount: + code: USD + value: "20.0000" + customerName: ABC123 + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + - id: 65 + createdAt: 1618502653 + updatedAt: 1618502653 + storeHash: jexy81vb0h + customerId: "3" + externalId: null + externalCustomerId: null + payerName: Store offline payment + payerCustomerId: "3" + details: + memo: "123456" + moduleName: payments_offline + fees: [] + moduleData: + transactions: + - memo: k + type: OfflineTransaction + rawTransaction: null + processingStatus: 3 + appliedStatus: 1 + fundingStatus: 2 + total: + code: USD + value: "30.0000" + lineItems: + - paymentId: 65 + invoiceId: 30 + invoiceNumber: "00000141" + amount: + code: USD + value: "10.0000" + - paymentId: 65 + invoiceId: 28 + invoiceNumber: "00000141" + amount: + code: USD + value: "20.0000" + customerName: ABC123 + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + channelId: "1" + channelName: string + meta: + pagination: + totalCount: 59 + offset: 0 + limit: 10 + message: SUCCESS + operationId: get-payments + description: Get payment list + parameters: + - schema: + type: number + in: query + name: offset + description: Pagination offset + - schema: + type: number + in: query + name: limit + description: Pagination limit + - schema: + type: string + enum: + - DESC + - ASC + example: DESC + in: query + name: orderBy + description: '"DESC" or "ASC"' + - schema: + type: string + example: createdAt + enum: + - moduleName + - processingStatus + - appliedStatus + - createdAt + - customerId + - externalCustomerId + - fundingStatus + - updatedAt + - totalAmount + in: query + name: sortBy + description: Sort by the field value + - schema: + type: string + enum: + - id + - customerId + - externalId + - externalCustomerId + in: query + name: searchBy + description: Filter by a field + - schema: + type: string + in: query + name: q + description: 'You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".' + - schema: + type: string + in: query + name: customerName + description: Query by invoice B2B Edition company name + - schema: + type: number + in: query + name: invoiceId + description: Query by Invoice ID + - schema: + type: number + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + example: 3 + in: query + name: processingStatus + description: 'payment processing status(0="Incomplete", 1="Awaiting Processing", 2="Processing", 3="Completed", 4="Refunded")' + - schema: + type: array + items: + type: number + in: query + name: channelIds + description: Query by BigCommerce Channel IDs. This parameter is not needed if you don't have multiple storefront channels. + "/payments/{paymentId}": + parameters: + - schema: + type: number + name: paymentId + in: path + required: true + description: Payment ID + get: + summary: Get Payment Detail + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + x-examples: + example-1: + code: 200 + data: + id: 117 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + payerName: Check + payerCustomerId: "6041" + details: + memo: k + moduleName: payments_offline + fees: [] + moduleData: + transactions: + - memo: k + type: OfflineTransaction + rawTransaction: null + processingStatus: 3 + appliedStatus: 1 + fundingStatus: 2 + total: + code: GBP + value: "0.7800" + lineItems: + - paymentId: 117 + invoiceId: 141 + invoiceNumber: "00000141" + amount: + code: GBP + value: "0.7800" + customerName: "" + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + meta: + message: SUCCESS + properties: + code: + type: number + data: + type: object + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - payerName + - payerCustomerId + - details + - moduleName + - fees + - moduleData + - processingStatus + - appliedStatus + - fundingStatus + - total + - lineItems + - customerName + - allowedOperations + - allowedStatuses + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + payerName: + type: string + minLength: 1 + payerCustomerId: + type: string + minLength: 1 + details: + type: object + properties: + memo: + type: string + minLength: 1 + moduleName: + type: string + minLength: 1 + fees: + type: array + items: + type: number + moduleData: + type: object + required: + - transactions + properties: + transactions: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + memo: + type: string + minLength: 1 + type: + type: string + minLength: 1 + rawTransaction: {} + required: + - type + processingStatus: + type: number + appliedStatus: + type: number + fundingStatus: + type: number + total: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + lineItems: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + paymentId: + type: number + invoiceId: + type: number + invoiceNumber: + type: string + minLength: 1 + amount: + type: object + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + required: + - paymentId + - invoiceId + - invoiceNumber + customerName: + type: string + allowedOperations: + type: array + description: |- + Allowed payment actions: + (0, "Apply to Invoice Balances"), + (1, "Revert Invoice Balances"), + (2, "Pull Updates From Order"), + items: + type: number + allowedStatuses: + type: array + description: |- + Allowed payment status: + (1, 'Awaiting Processing'), + (2, 'Processing'), + (3, 'Completed'), + (4, 'Refunded'), + items: + type: number + channelId: + type: string + description: BigCommerce Channel ID + channelName: + type: string + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 20 + createdAt: 1617761431 + updatedAt: 1617762957 + storeHash: jexy81vb0h + customerId: "95075" + externalId: null + externalCustomerId: null + payerName: Hannah Admin + payerCustomerId: "95075" + details: + memo: "memo" + moduleName: payments_bigcommerce_sales_order + fees: [] + moduleData: + cartId: d0afeab8-ff76-4b4e-867a-0675c0ea6e6e + orderId: 121 + transactions: + - type: UnknownTransaction + rawTransaction: null + processingStatus: 4 + appliedStatus: 0 + fundingStatus: 2 + total: + code: USD + value: "11.0000" + lineItems: + - paymentId: 20 + invoiceId: 9 + invoiceNumber: "00000141" + amount: + code: USD + value: "11.0000" + customerName: silk + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + channelId: "1" + channelName: string + meta: + message: SUCCESS + "404": + $ref: "#/components/responses/Payment404" + operationId: get-payments-paymentId + description: Get payment detail + parameters: [] + delete: + summary: Delete a Payment + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - id + properties: + id: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 1 + meta: + message: SUCCESS + "404": + $ref: "#/components/responses/Payment404" + operationId: delete-a-payment + description: Delete a payment + parameters: [] + "/payments/{paymentId}/operations": + parameters: + - schema: + type: number + name: paymentId + in: path + required: true + description: Payment ID + get: + summary: Get a Payment Operation + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - allowedOperations + - allowedStatuses + properties: + allowedOperations: + type: array + description: A list of allowable action codes for current payments. + items: {} + allowedStatuses: + type: array + description: The current payment method allows for the modification of the states listed. + items: {} + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + allowedOperations: [] + allowedStatuses: + - "1" + - "2" + - "3" + - "4" + meta: + message: Success + "404": + $ref: "#/components/responses/Payment404" + operationId: get-payment-operations-operations + description: Get a payment for all operations + parameters: [] + post: + summary: Performing Payment Operation + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - id + properties: + id: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 4 + meta: + message: SUCCESS + "400": + $ref: "#/components/responses/Payment400" + operationId: post-payments-paymentId-operations + description: Performing payment operation + parameters: [] + requestBody: + content: + application/json: + schema: + description: "" + type: object + properties: + operationCode: + type: number + description: "Payment operation code. The list of allowed operations for this payment." + enum: + - 0 + - 1 + - 2 + - 3 + example: 0 + required: + - operationCode + examples: + "200": + value: + operationCode: 0 + description: "" + "/payments/{paymentId}/processing-status": + parameters: + - schema: + type: number + name: paymentId + in: path + required: true + description: Payment ID + put: + summary: Update Payment Processing Status + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - id + properties: + id: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 2 + meta: + message: SUCCESS + "400": + $ref: "#/components/responses/Payment400" + operationId: put-payments-paymentId-processing-status + description: Update payment processing status + parameters: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + processingStatus: + type: number + description: 'payment processing status(1="Awaiting Processing", 2="Processing", 3="Completed", 4="Refunded")' + required: + - processingStatus + "/payments/{paymentId}/transactions": + parameters: + - schema: + type: number + name: paymentId + in: path + required: true + description: Payment ID + get: + summary: Get Payment Transactions + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + - type: CreditCardTransaction + gateway: test + transactionId: "521263" + authCode: null + event: capture + card: + type: Visa + last4: "1111" + expiryYear: 2050 + expiryMonth: 12 + rawTransaction: null + meta: + message: SUCCESS + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + description: "The array contains payment transaction information that varies and depends on the payment gateway." + items: + type: object + properties: + type: + type: string + minLength: 1 + gateway: + type: string + minLength: 1 + transactionId: + type: string + minLength: 1 + authCode: + type: string + event: + type: string + minLength: 1 + card: + type: object + properties: + type: + type: string + minLength: 1 + last4: + type: string + minLength: 1 + expiryYear: + type: number + expiryMonth: + type: number + rawTransaction: + type: string + required: + - type + - rawTransaction + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + - type: CreditCardTransaction + gateway: test + transactionId: "521263" + authCode: "" + event: capture + card: + type: Visa + last4: "1111" + expiryYear: 2050 + expiryMonth: 12 + rawTransaction: "" + meta: + message: SUCCESS + "404": + $ref: "#/components/responses/Payment404" + operationId: get-payments-paymentId-transactions + description: Get payment transactions + parameters: [] + "/payments/offline": + post: + summary: Create Offline Payment + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - paymentId + properties: + paymentId: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + paymentId: 112 + meta: + message: SUCCESS + "422": + $ref: "#/components/responses/Payment422" + operationId: post-payments-offline + description: Create offline payment + parameters: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + lineItems: + type: array + items: + type: object + properties: + invoiceId: + type: number + amount: + type: string + required: + - invoiceId + - amount + currency: + type: string + details: + type: object + properties: + memo: + type: string + externalId: + type: string + customerId: + type: string + description: B2B Edition Company ID + externalCustomerId: + type: string + payerName: + type: string + default: Store offline payment + description: Default is "Store Offline Payment " if no value is passed in. + payerCustomerId: + type: string + description: The default value is the same as the customerId. + processingStatus: + type: number + default: 3 + enum: + - 1 + - 2 + - 3 + - 4 + example: 3 + description: "payment status, 3 is the default " + channelId: + type: integer + description: BigCommerce channel ID + required: + - lineItems + - currency + - details + - customerId + examples: + example: + value: + lineItems: + - invoiceId: 13 + amount: "20.00" + currency: USD + details: + memo: Test + customerId: "113" + payerName: Store offline payment + payerCustomerId: "113" + processingStatus: 3 + fundingStatus: "2" + "/payments/offline/{paymentId}": + parameters: + - schema: + type: number + name: paymentId + in: path + required: true + description: Payment ID + put: + summary: Update an Offline Payment + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + paymentId: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + paymentId: 112 + meta: + message: SUCCESS + "422": + $ref: "#/components/responses/Payment422" + operationId: put-payments-offline-paymentId + description: Update offline payment + parameters: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + lineItems: + type: array + items: + type: object + properties: + invoiceId: + type: number + amount: + type: string + required: + - invoiceId + - amount + currency: + type: string + details: + type: object + properties: + memo: + type: string + externalId: + type: string + customerId: + type: string + description: B2B Edition Company ID + externalCustomerId: + type: string + payerName: + type: string + default: Store offline payment + description: Default is "Store Offline Payment " if no value is passed in. + payerCustomerId: + type: string + description: The default is the same as the customerId. + processingStatus: + type: number + default: 3 + enum: + - 1 + - 2 + - 3 + - 4 + example: 3 + fundingStatus: + type: number + default: 2 + enum: + - 0 + - 1 + - 2 + - 3 + required: + - lineItems + - currency + - details + - customerId + examples: + example: + value: + lineItems: + - invoiceId: 13 + amount: "20.00" + currency: USD + details: + memo: Test + customerId: "113" + payerName: Store offline payment + payerCustomerId: "113" + processingStatus: 3 + fundingStatus: 2 + + /receipts: + get: + summary: Get receipts + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + - id: 101 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + payerName: Check + payerCustomerId: "6041" + details: + paymentDetails: + memo: k + transactionType: Paid + paymentType: Offline + referenceNumber: k + paymentId: 117 + total: + code: GBP + value: "0.7800" + - id: 100 + createdAt: 1634785181 + updatedAt: 1634785181 + storeHash: rtmh8fqr05 + customerId: "6046" + externalId: null + externalCustomerId: null + payerName: Check + payerCustomerId: "6046" + details: + paymentDetails: + memo: "1" + transactionType: Paid + paymentType: Offline + referenceNumber: "1" + paymentId: 116 + total: + code: USD + value: "1.0000" + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + payerName: + type: string + minLength: 1 + payerCustomerId: + type: string + minLength: 1 + details: + type: object + properties: + paymentDetails: + type: object + required: + - memo + properties: + memo: + type: string + minLength: 1 + required: + - paymentDetails + transactionType: + type: string + minLength: 1 + paymentType: + type: string + minLength: 1 + referenceNumber: + type: string + minLength: 1 + paymentId: + type: number + total: + type: object + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - payerName + - payerCustomerId + - transactionType + - paymentType + - referenceNumber + - paymentId + meta: + type: object + required: + - pagination + - message + properties: + pagination: + type: object + required: + - totalCount + - offset + - limit + properties: + totalCount: + type: number + offset: + type: number + limit: + type: number + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + example-1: + value: + code: 200 + data: + - id: 85 + createdAt: 1630658187 + updatedAt: 1630658187 + storeHash: 1i6zpxpe3g + customerId: "5485" + externalId: "" + externalCustomerId: "" + payerName: k Admin + payerCustomerId: "5485" + details: + paymentDetails: + memo: "payment memo" + transactionType: Paid + paymentType: Visa ending in 1111 + referenceNumber: "375026" + paymentId: 92 + total: + code: USD + value: "122.9500" + - id: 84 + createdAt: 1630638069 + updatedAt: 1630638069 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + payerName: Cash + payerCustomerId: "5707" + details: + paymentDetails: + memo: test + transactionType: Paid + paymentType: Offline + referenceNumber: test + paymentId: 91 + total: + code: CNY + value: "0.8900" + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + operationId: get-ip-receipts + parameters: + - schema: + type: integer + exclusiveMinimum: true + minimum: 0 + in: query + name: offset + description: "Pagination offset default: 0" + style: form + - schema: + type: integer + default: 10 + minimum: 1 + maximum: 250 + in: query + name: limit + description: "Pagination limit default: 10" + - schema: + type: string + default: DESC + enum: + - DESC + - ASC + in: query + name: orderBy + description: "Allow: 'DESC', 'ASC'" + - schema: + type: string + default: createdAt + enum: + - customerId + - externalCustomerId + - paymentId + - total + - transactionType + - referenceNumber + - createdAt + - updatedAt + in: query + name: sortBy + description: The response sorted by which field + - schema: + type: string + in: query + name: q + description: 'You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".' + - schema: + type: string + enum: + - payerName + - referenceNumber + - customerId + - externalId + - externalCustomerId + in: query + name: searchBy + description: The response search by which field + - schema: + type: array + items: + type: number + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + in: query + name: "paymentStatus[]" + description: "Payment processing status. 0 means ‘Incomplete’ status, 1 means ‘Awaiting Processing’ status, 2 means ‘Processing’ status, 3 means ‘Completed’ status, 4 means ‘Refunded' status" + description: "Get receipts, with pagination data" + tags: + - Receipt + "/receipts/{receiptId}": + parameters: + - schema: + type: string + name: receiptId + in: path + required: true + description: The unique ID of the receipt. + get: + summary: Get a receipt + tags: + - Receipt + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + id: 101 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + payerName: Check + payerCustomerId: "6041" + details: + paymentDetails: + memo: k + transactionType: Paid + paymentType: Offline + referenceNumber: k + paymentId: 117 + total: + code: GBP + value: "0.7800" + meta: + message: SUCCESS + properties: + code: + type: number + data: + type: object + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - externalId + - externalCustomerId + - payerName + - payerCustomerId + - details + - transactionType + - paymentType + - referenceNumber + - paymentId + - total + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + payerName: + type: string + minLength: 1 + payerCustomerId: + type: string + minLength: 1 + details: + type: object + required: + - paymentDetails + properties: + paymentDetails: + type: object + required: + - memo + properties: + memo: + type: string + minLength: 1 + transactionType: + type: string + minLength: 1 + paymentType: + type: string + minLength: 1 + referenceNumber: + type: string + minLength: 1 + paymentId: + type: number + total: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + example-1: + value: + code: 200 + data: + id: 83 + createdAt: 1630570416 + updatedAt: 1630570416 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + payerName: Cash + payerCustomerId: "5707" + details: + paymentDetails: + memo: test + transactionType: Paid + paymentType: Offline + referenceNumber: test + paymentId: 90 + total: + code: CNY + value: "1.2000" + meta: + message: SUCCESS + "404": + $ref: "#/components/responses/Receipt404" + operationId: get-ip-receipts-receiptId + description: Get a receipt detail + delete: + summary: Delete a receipt + tags: + - Receipt + operationId: delete-ip-receipts-receiptId + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + description: Response code of a successful request. + data: + type: object + properties: + id: + type: integer + description: The unique receipt ID. + meta: + type: object + properties: + message: + type: string + description: Response message of a request + examples: + example-1: + value: + code: 200 + data: + id: 3 + meta: + message: SUCCESS + "404": + $ref: "#/components/responses/Receipt404" + description: Delete a receipt + /receipt-lines: + get: + summary: Get all receipt lines + tags: + - Receipt + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + - id: 114 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + receiptId: 101 + invoiceId: 141 + amount: + code: GBP + value: "0.7800" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000141" + paymentId: 117 + referenceNumber: k + transactionType: Paid + - id: 113 + createdAt: 1634785181 + updatedAt: 1634785181 + storeHash: rtmh8fqr05 + customerId: "6046" + externalId: null + externalCustomerId: null + receiptId: 100 + invoiceId: 134 + amount: + code: USD + value: "1.0000" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000134" + paymentId: 116 + referenceNumber: "1" + transactionType: Paid + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + receiptId: + type: number + invoiceId: + type: number + amount: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + paymentStatus: + type: number + paymentType: + type: string + minLength: 1 + invoiceNumber: + type: string + minLength: 1 + paymentId: + type: number + referenceNumber: + type: string + minLength: 1 + transactionType: + type: string + minLength: 1 + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - externalId + - externalCustomerId + - receiptId + - invoiceId + - amount + - paymentStatus + - paymentType + - invoiceNumber + - paymentId + - referenceNumber + - transactionType + meta: + type: object + required: + - pagination + - message + properties: + pagination: + type: object + required: + - totalCount + - offset + - limit + properties: + totalCount: + type: number + offset: + type: number + limit: + type: number + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + example-1: + value: + code: 200 + data: + - id: 95 + createdAt: 1630658187 + updatedAt: 1630658187 + storeHash: 1i6zpxpe3g + customerId: "5485" + externalId: "" + externalCustomerId: "" + receiptId: 85 + invoiceId: 38 + amount: + code: USD + value: "122.9500" + paymentStatus: 1 + paymentType: Visa ending in 1111 + invoiceNumber: "00000038" + paymentId: 92 + referenceNumber: "375026" + transactionType: Paid + - id: 94 + createdAt: 1630638069 + updatedAt: 1630638069 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + receiptId: 84 + invoiceId: 14 + amount: + code: CNY + value: "0.0900" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000014" + paymentId: 91 + referenceNumber: test + transactionType: Paid + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + operationId: get-ip-receipt-lines + parameters: + - schema: + type: integer + minimum: 0 + in: query + name: offset + description: "Pagination offset default: 0" + - schema: + type: integer + minimum: 1 + maximum: 250 + default: 10 + in: query + name: limit + description: "Pagination limit default: 10" + - schema: + type: string + enum: + - DESC + - ASC + default: DESC + in: query + name: orderBy + description: "Allow: 'DESC', 'ASC'" + - schema: + type: array + items: + type: number + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + in: query + name: "paymentStatus[]" + description: "Payment processing status. 0 means ‘Incomplete’ status, 1 means ‘Awaiting Processing’ status, 2 means ‘Processing’ status, 3 means ‘Completed’ status, 4 means ‘Refunded' status" + - schema: + type: string + in: query + name: q + description: 'You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".' + - schema: + type: string + enum: + - customerId + - externalId + - externalCustomerId + - payerName + - payerCustomerId + - referenceNumber + - invoiceId + in: query + name: searchBy + description: The response search by which field + - schema: + type: string + default: createdAt + enum: + - customerId + - externalCustomerId + - receiptId + - invoiceId + - amount + - createdAt + - updatedAt + in: query + name: sortBy + description: The response sorted by which field + description: "Get all receipt lines, with pagination data" + "/receipts/{receiptId}/lines": + get: + summary: Get lines of a receipt + tags: + - Receipt + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + - id: 114 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + receiptId: 101 + invoiceId: 141 + amount: + code: GBP + value: "0.7800" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000141" + paymentId: 117 + referenceNumber: k + transactionType: Paid + meta: + pagination: + totalCount: 1 + offset: 0 + limit: 10 + message: SUCCESS + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + receiptId: + type: number + invoiceId: + type: number + amount: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + paymentStatus: + type: number + paymentType: + type: string + minLength: 1 + invoiceNumber: + type: string + minLength: 1 + paymentId: + type: number + referenceNumber: + type: string + minLength: 1 + transactionType: + type: string + minLength: 1 + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - externalId + - externalCustomerId + - receiptId + - invoiceId + - amount + - paymentStatus + - paymentType + - invoiceNumber + - paymentId + - referenceNumber + - transactionType + meta: + type: object + required: + - pagination + - message + properties: + pagination: + type: object + required: + - totalCount + - offset + - limit + properties: + totalCount: + type: number + offset: + type: number + limit: + type: number + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + example-1: + value: + code: 200 + data: + - id: 92 + createdAt: 1630570416 + updatedAt: 1630570416 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + receiptId: 83 + invoiceId: 19 + amount: + code: CNY + value: "0.7000" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000019" + paymentId: 90 + referenceNumber: test + transactionType: Paid + - id: 91 + createdAt: 1630570416 + updatedAt: 1630570416 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + receiptId: 83 + invoiceId: 22 + amount: + code: CNY + value: "0.5000" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000022" + paymentId: 90 + referenceNumber: test + transactionType: Paid + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + "404": + $ref: "#/components/responses/Receipt404" + operationId: get-ip-lines-of-receipt + parameters: + - schema: + type: integer + minimum: 0 + in: query + name: offset + description: "Pagination offset default: 0" + - schema: + type: integer + minimum: 1 + maximum: 250 + default: 10 + in: query + name: limit + description: "Pagination limit default: 10" + - schema: + type: string + enum: + - DESC + - ASC + default: DESC + in: query + name: orderBy + description: "Allow: 'DESC', 'ASC'" + - schema: + type: array + items: + type: number + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + in: query + name: "paymentStatus[]" + description: "Payment processing status. 0 means ‘Incomplete’ status, 1 means ‘Awaiting Processing’ status, 2 means ‘Processing’ status, 3 means ‘Completed’ status, 4 means ‘Refunded' status" + - schema: + type: string + in: query + name: q + description: 'You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".' + - schema: + type: string + enum: + - customerId + - externalId + - externalCustomerId + - payerName + - payerCustomerId + - referenceNumber + - invoiceId + in: query + name: searchBy + description: The response search by which field + - schema: + type: string + default: createdAt + enum: + - customerId + - externalCustomerId + - receiptId + - invoiceId + - amount + - createdAt + - updatedAt + in: query + name: sortBy + description: The response sorted by which field + description: "Get lines of a receipt, with pagination data" + parameters: + - schema: + type: string + name: receiptId + in: path + required: true + description: The unique ID of the receipt. + "/receipts/{receiptId}/lines/{receiptLineId}": + parameters: + - schema: + type: string + name: receiptId + in: path + required: true + description: The unique ID of the receipt. + - schema: + type: string + name: receiptLineId + in: path + required: true + description: The unique ID of the receipt line. + get: + summary: Get a receipt line detail + tags: + - Receipt + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + id: 114 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + receiptId: 101 + invoiceId: 141 + amount: + code: GBP + value: "0.7800" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000141" + paymentId: 117 + referenceNumber: k + transactionType: Paid + meta: + message: SUCCESS + properties: + code: + type: number + data: + type: object + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - externalId + - externalCustomerId + - receiptId + - invoiceId + - amount + - paymentStatus + - paymentType + - invoiceNumber + - paymentId + - referenceNumber + - transactionType + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + receiptId: + type: number + invoiceId: + type: number + amount: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + paymentStatus: + type: number + paymentType: + type: string + minLength: 1 + invoiceNumber: + type: string + minLength: 1 + paymentId: + type: number + referenceNumber: + type: string + minLength: 1 + transactionType: + type: string + minLength: 1 + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + example-1: + value: + code: 200 + data: + id: 92 + createdAt: 1630570416 + updatedAt: 1630570416 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + receiptId: 83 + invoiceId: 19 + amount: + code: CNY + value: "0.7000" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000019" + paymentId: 90 + referenceNumber: test + transactionType: Paid + meta: + message: SUCCESS + operationId: get-ip-receipts-receiptId-lines-receiptLineId + description: Get a receipt line detail + delete: + summary: Delete a receipt line + tags: + - Receipt + operationId: delete-ip-receipts-receiptId-lines-receiptLineId + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + description: Response code of a successful request. + data: + type: object + properties: + id: + type: integer + description: The unique ID of the receipt line. + meta: + type: object + properties: + message: + type: string + description: Response message of the request + examples: + example-1: + value: + code: 200 + data: + id: 92 + meta: + message: SUCCESS + description: Delete a receipt line