diff --git a/docs/b2b-edition/models/utils/pagination.yaml b/docs/b2b-edition/models/utils/pagination.yaml index c47b4b23e..21d343e24 100644 --- a/docs/b2b-edition/models/utils/pagination.yaml +++ b/docs/b2b-edition/models/utils/pagination.yaml @@ -1,30 +1,30 @@ -title: Pagination -type: object -description: Used to response pagination information -properties: - pagination: - type: object - properties: - limit: - type: integer - maximum: 250 - exclusiveMaximum: true - minimum: 1 - exclusiveMinimum: true - description: 'Pagination limit default: 10' - example: 10 - offset: - type: integer - minimum: 0 - description: 'Pagination offset default: 0' - example: 0 - totalCount: - type: integer - example: 998 - description: The total number of the all data -example: - pagination: - limit: 10 - offset: 0 - totalCount: 1 -x-internal: false +title: Pagination +type: object +description: Used to response pagination information +properties: + pagination: + type: object + properties: + limit: + type: integer + maximum: 250 + exclusiveMaximum: true + minimum: 1 + exclusiveMinimum: true + description: 'Pagination limit default: 10' + example: 10 + offset: + type: integer + minimum: 0 + description: 'Pagination offset default: 0' + example: 0 + totalCount: + type: integer + example: 998 + description: The total number of the all data +example: + pagination: + limit: 10 + offset: 0 + totalCount: 1 +x-internal: false diff --git a/docs/b2b-edition/specs/api-v3/invoice_management/config/config.yaml b/docs/b2b-edition/specs/api-v3/invoice_management/config/config.yaml index e78193cf1..abebfc483 100644 --- a/docs/b2b-edition/specs/api-v3/invoice_management/config/config.yaml +++ b/docs/b2b-edition/specs/api-v3/invoice_management/config/config.yaml @@ -1,364 +1,364 @@ -openapi: 3.0.1 -info: - title: Config - description: BigCommerce B2B Edition Invoice Config - contact: {} - version: v3 -servers: - - url: 'https://api-b2b.bigcommerce.com/api/v3/io/ip' -security: - - authToken: [] -tags: - - name: Config - description: Config -components: - securitySchemes: - authToken: - name: authToken - type: apiKey - in: header -paths: - /config: - get: - summary: Get Invoice Portal Configs - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - properties: - code: - type: number - data: - type: object - required: - - allMethods - - invoiceEmailTemplate - - isPaymentProcessingEnabled - - payments - - paymentsBigcommerceSalesOrder - - paymentsMinibc - - paymentsOffline - - paymentsTest - - storesBundleb2b - properties: - allMethods: - type: array - uniqueItems: true - minItems: 1 - description: Allow payment methods - items: - type: object - properties: - code: - type: string - minLength: 1 - name: - type: string - minLength: 1 - testMode: - type: boolean - required: - - code - - name - - testMode - invoiceEmailTemplate: - type: object - properties: - html: - type: string - isEnabled: - type: number - title: - type: string - isPaymentProcessingEnabled: - type: object - properties: - isEnabled: - type: number - isStorefrontMethod: - type: number - payments: - type: object - required: - - paymentHoldPolicy - - generalPaymentFees - - statusAfterPaymentIsMade - - invoiceBalanceUpdatePolicy - - onlinePaymentAutomaticInvoiceGeneration - - offlinePaymentAutomaticInvoiceGeneration - properties: - paymentHoldPolicy: - type: number - generalPaymentFees: - type: array - items: - type: object - statusAfterPaymentIsMade: - type: number - invoiceBalanceUpdatePolicy: - type: number - onlinePaymentAutomaticInvoiceGeneration: - type: number - offlinePaymentAutomaticInvoiceGeneration: - type: number - paymentsBigcommerceSalesOrder: - type: object - description: Pay Invoice Online - required: - - isEnabled - - productId - - variantId - - displayName - - allowedMethods - - isStorefrontMethod - properties: - isEnabled: - type: number - productId: - type: number - variantId: - type: number - displayName: - type: string - minLength: 1 - allowedMethods: - type: array - items: - type: object - isStorefrontMethod: - type: number - paymentsMinibc: - type: object - description: '' - required: - - apiKey - - rootUrl - - isEnabled - - displayName - - authorizeOnly - - isStorefrontMethod - properties: - apiKey: - type: string - minLength: 1 - rootUrl: - type: string - minLength: 1 - isEnabled: - type: number - displayName: - type: string - minLength: 1 - authorizeOnly: - type: number - isStorefrontMethod: - type: number - storeId: - type: string - token: - type: string - paymentsOffline: - type: object - description: '' - required: - - isEnabled - - displayName - - isStorefrontMethod - properties: - isEnabled: - type: number - displayName: - type: string - minLength: 1 - isStorefrontMethod: - type: number - paymentsTest: - type: object - description: Test Payment Gateway - required: - - isEnabled - - displayName - - isStorefrontMethod - properties: - isEnabled: - type: number - displayName: - type: string - minLength: 1 - isStorefrontMethod: - type: number - storesBundleb2b: - type: object - required: - - apiKey - - isEnabled - - internalEmail - - internalPassword - properties: - apiKey: - type: string - isEnabled: - type: number - internalEmail: - type: string - internalPassword: - type: string - meta: - type: object - required: - - message - properties: - message: - type: string - minLength: 1 - required: - - code - - data - - meta - examples: - '200': - value: - code: 200 - data: - paymentsOffline: - isEnabled: 1 - displayName: Offline Payment - isStorefrontMethod: 0 - paymentsTest: - isEnabled: 0 - displayName: Test Payment Gateway123 - isStorefrontMethod: 1 - payments: - paymentHoldPolicy: 0 - generalPaymentFees: [] - statusAfterPaymentIsMade: 3 - invoiceBalanceUpdatePolicy: 1 - onlinePaymentAutomaticInvoiceGeneration: 0 - offlinePaymentAutomaticInvoiceGeneration: 0 - paymentsBigcommerceSalesOrder: - isEnabled: 1 - productId: 113 - variantId: 78 - displayName: Pay with BigCommerce - allowedMethods: - - testgateway - - cheque - isStorefrontMethod: 1 - storesBundleb2b: - apiKey: '' - isEnabled: 0 - internalEmail: '' - internalPassword: '' - paymentsMinibc: - apiKey: MTIxNy5hcGlfNWYwNGI5xxxxxxxxOTYuMjkxMDAxNTAuMTU5NDE0NTE0NA== - rootUrl: 'https://apps.minibc.com/api/apps/recurring/v1' - isEnabled: 1 - displayName: Credit / Debit Card - authorizeOnly: 0 - isStorefrontMethod: 1 - allMethods: - - code: cheque - name: Check - testMode: false - - code: testgateway - name: Test Payment Gateway - testMode: true - invoiceEmailTemplate: - html: '

Dear Customer,

A new invoice for your {store_name} order has been issued.

Order Number: {order_number}

Invoice Number: {invoice_number}

View Invoice: {invoice_detail _url}

sssss

Thank you,

' - title: You Have a New Store Name Invoice - isEnabled: 1 - isPaymentProcessingEnabled: - isEnabled: 1 - isStorefrontMethod: 0 - meta: - message: SUCCESS - operationId: get-ip-config - description: Get invoice portal configs - parameters: [] - tags: - - Config - x-internal: true - put: - summary: Update Invoice Portal Config - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - properties: - code: - type: number - data: - type: array - items: - type: object - meta: - type: object - required: - - message - properties: - message: - type: string - minLength: 1 - errors: - type: string - required: - - code - - data - - meta - examples: - '200': - value: - code: 200 - data: [] - meta: - message: SUCCESS - operationId: put-ip-config - description: Update invoice portal config - parameters: [] - requestBody: - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - type: object - properties: - visibilityLevel: - type: number - example: 1 - description: 'Reserved field, Default value is "1"' - default: 1 - path: - type: string - description: config name - value: - type: object - description: config value - required: - - visibilityLevel - - path - - value - examples: - example: - value: - data: - - visibilityLevel: 1 - path: test-config - value: - testValue: 1 - description: '' - tags: - - Config - x-internal: true -x-internal: true +openapi: 3.0.1 +info: + title: Config + description: BigCommerce B2B Edition Invoice Config + contact: {} + version: v3 +servers: + - url: 'https://api-b2b.bigcommerce.com/api/v3/io/ip' +security: + - authToken: [] +tags: + - name: Config + description: Config +components: + securitySchemes: + authToken: + name: authToken + type: apiKey + in: header +paths: + /config: + get: + summary: Get Invoice Portal Configs + responses: + '200': + description: OK + content: + application/json: + schema: + description: '' + type: object + properties: + code: + type: number + data: + type: object + required: + - allMethods + - invoiceEmailTemplate + - isPaymentProcessingEnabled + - payments + - paymentsBigcommerceSalesOrder + - paymentsMinibc + - paymentsOffline + - paymentsTest + - storesBundleb2b + properties: + allMethods: + type: array + uniqueItems: true + minItems: 1 + description: Allow payment methods + items: + type: object + properties: + code: + type: string + minLength: 1 + name: + type: string + minLength: 1 + testMode: + type: boolean + required: + - code + - name + - testMode + invoiceEmailTemplate: + type: object + properties: + html: + type: string + isEnabled: + type: number + title: + type: string + isPaymentProcessingEnabled: + type: object + properties: + isEnabled: + type: number + isStorefrontMethod: + type: number + payments: + type: object + required: + - paymentHoldPolicy + - generalPaymentFees + - statusAfterPaymentIsMade + - invoiceBalanceUpdatePolicy + - onlinePaymentAutomaticInvoiceGeneration + - offlinePaymentAutomaticInvoiceGeneration + properties: + paymentHoldPolicy: + type: number + generalPaymentFees: + type: array + items: + type: object + statusAfterPaymentIsMade: + type: number + invoiceBalanceUpdatePolicy: + type: number + onlinePaymentAutomaticInvoiceGeneration: + type: number + offlinePaymentAutomaticInvoiceGeneration: + type: number + paymentsBigcommerceSalesOrder: + type: object + description: Pay Invoice Online + required: + - isEnabled + - productId + - variantId + - displayName + - allowedMethods + - isStorefrontMethod + properties: + isEnabled: + type: number + productId: + type: number + variantId: + type: number + displayName: + type: string + minLength: 1 + allowedMethods: + type: array + items: + type: object + isStorefrontMethod: + type: number + paymentsMinibc: + type: object + description: '' + required: + - apiKey + - rootUrl + - isEnabled + - displayName + - authorizeOnly + - isStorefrontMethod + properties: + apiKey: + type: string + minLength: 1 + rootUrl: + type: string + minLength: 1 + isEnabled: + type: number + displayName: + type: string + minLength: 1 + authorizeOnly: + type: number + isStorefrontMethod: + type: number + storeId: + type: string + token: + type: string + paymentsOffline: + type: object + description: '' + required: + - isEnabled + - displayName + - isStorefrontMethod + properties: + isEnabled: + type: number + displayName: + type: string + minLength: 1 + isStorefrontMethod: + type: number + paymentsTest: + type: object + description: Test Payment Gateway + required: + - isEnabled + - displayName + - isStorefrontMethod + properties: + isEnabled: + type: number + displayName: + type: string + minLength: 1 + isStorefrontMethod: + type: number + storesBundleb2b: + type: object + required: + - apiKey + - isEnabled + - internalEmail + - internalPassword + properties: + apiKey: + type: string + isEnabled: + type: number + internalEmail: + type: string + internalPassword: + type: string + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + '200': + value: + code: 200 + data: + paymentsOffline: + isEnabled: 1 + displayName: Offline Payment + isStorefrontMethod: 0 + paymentsTest: + isEnabled: 0 + displayName: Test Payment Gateway123 + isStorefrontMethod: 1 + payments: + paymentHoldPolicy: 0 + generalPaymentFees: [] + statusAfterPaymentIsMade: 3 + invoiceBalanceUpdatePolicy: 1 + onlinePaymentAutomaticInvoiceGeneration: 0 + offlinePaymentAutomaticInvoiceGeneration: 0 + paymentsBigcommerceSalesOrder: + isEnabled: 1 + productId: 113 + variantId: 78 + displayName: Pay with BigCommerce + allowedMethods: + - testgateway + - cheque + isStorefrontMethod: 1 + storesBundleb2b: + apiKey: '' + isEnabled: 0 + internalEmail: '' + internalPassword: '' + paymentsMinibc: + apiKey: MTIxNy5hcGlfNWYwNGI5xxxxxxxxOTYuMjkxMDAxNTAuMTU5NDE0NTE0NA== + rootUrl: 'https://apps.minibc.com/api/apps/recurring/v1' + isEnabled: 1 + displayName: Credit / Debit Card + authorizeOnly: 0 + isStorefrontMethod: 1 + allMethods: + - code: cheque + name: Check + testMode: false + - code: testgateway + name: Test Payment Gateway + testMode: true + invoiceEmailTemplate: + html: '

Dear Customer,

A new invoice for your {store_name} order has been issued.

Order Number: {order_number}

Invoice Number: {invoice_number}

View Invoice: {invoice_detail _url}

sssss

Thank you,

' + title: You Have a New Store Name Invoice + isEnabled: 1 + isPaymentProcessingEnabled: + isEnabled: 1 + isStorefrontMethod: 0 + meta: + message: SUCCESS + operationId: get-ip-config + description: Get invoice portal configs + parameters: [] + tags: + - Config + x-internal: true + put: + summary: Update Invoice Portal Config + responses: + '200': + description: OK + content: + application/json: + schema: + description: '' + type: object + properties: + code: + type: number + data: + type: array + items: + type: object + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + '200': + value: + code: 200 + data: [] + meta: + message: SUCCESS + operationId: put-ip-config + description: Update invoice portal config + parameters: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + type: object + properties: + visibilityLevel: + type: number + example: 1 + description: 'Reserved field, Default value is "1"' + default: 1 + path: + type: string + description: config name + value: + type: object + description: config value + required: + - visibilityLevel + - path + - value + examples: + example: + value: + data: + - visibilityLevel: 1 + path: test-config + value: + testValue: 1 + description: '' + tags: + - Config + x-internal: true +x-internal: true diff --git a/docs/b2b-edition/specs/api-v3/invoice_management/invoice/invoice.yaml b/docs/b2b-edition/specs/api-v3/invoice_management/invoice/invoice.yaml index 7de5cf4b2..66858e7cc 100644 --- a/docs/b2b-edition/specs/api-v3/invoice_management/invoice/invoice.yaml +++ b/docs/b2b-edition/specs/api-v3/invoice_management/invoice/invoice.yaml @@ -1,1551 +1,1551 @@ -openapi: 3.0.1 -info: - title: Invoices - description: BigCommerce B2B Edition Invoice - contact: {} - version: v3 -servers: - - url: 'https://api-b2b.bigcommerce.com/api/v3/io/ip' -security: - - authToken: [] -tags: - - name: Invoice - description: Invoice -components: - securitySchemes: - authToken: - name: authToken - description: Required to authenticate requests. Include the token in a header parameter called `authToken`. - type: apiKey - in: header - responses: - '404': - 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 -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: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/invoice.yaml - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/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: [] - lineItems: - - sku: DPB - type: physical - comments: '' - quantity: '10' - unitPrice: - code: USD - value: '34.95' - description: '[Sample] Dustpan & Brush' - customFields: {} - unitDiscount: - code: USD - value: '12' - - sku: DD - type: product - comments: '' - 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/404' - 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 - data: - id: 33 - meta: - message: Bad Requests Error - errors: 'Please enter a valid number; ' - 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: {} - 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: - "key": string - "value": string - 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 will be auto-set to 2 when the open balance is <= 0.' - purchaseOrderNumber: - type: string - minLength: 1 - description: PO Number - details: - type: object - description: 'Updating will override the invoice details; therefore, ensure you get the original values before updating all the data.' - 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: object - 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: The product description or product name is a requirement for a custom product. - minLength: 1 - customFields: - type: object - description: Adds custom information to the product. - properties: - key: - type: string - description: The custom field name. - example: Back-ordered - value: - type: string - description: The custom field value. - example: 'No' - 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 your external PDF file. The recommended file size should not exceed 5 MB. Please make sure that your file service has processed CORS. Using empty value if you want to delete it. - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/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: 'Sample' - quantity: '2' - unitPrice: - code: USD - value: '200.0000' - description: '[Sample] Canvas Laundry Cart' - customFields: - key: 'Back-ordered' - value: 'No' - 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/404' - 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: 'Due date, if empty, it will be set to the default due date which is the current date + pre-configured due days.' - status: - type: integer - default: 0 - enum: - - 0 - - 1 - - 2 - description: 'Invoice status 0=Open, 1=Partial paid, 2=Completed, 0 as default, will be auto set to 2 when open balance is <= 0' - orderNumber: - type: string - description: ID in BC of the order to which the current 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: The creation timestamp of the invoice. The current timestamp is the default. - details: - type: object - description: Invoice details - properties: - header: - type: object - properties: - costLines: - type: array - description: 'Invoice cost information is not required,but some of the sub-fields will be required if it exists. Invoice cost information is 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 is not required,but if it exists, some sub-fields will be required.' - 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 addresses is not required,but if exists, some of the following sub-fields will be required, but an empty string is allowed.' - 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 shipment information is not required,but if exists, some of the following sub-fields will be required, but an empty string is allowed.' - items: - type: object - properties: - addressIndex: - type: string - description: address ID - shipDate: - type: string - description: shipment - shipVia: - type: string - trackingNumber: - type: string - description: tracking number - comments: - type: string - required: - - addressIndex - - shipDate - - shipVia - - trackingNumber - - comments - lineItems: - type: array - description: 'Invoice products information is not required,but if exists, some of the following sub-fields will be required.' - 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: The product description or product name is a requirement for a custom product. - unitDiscount: - type: object - description: 'The product unit discount is not required,but if exists, some of the following sub-fields will be required.' - 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: 'Source of the invoice. Mark the source of the invoice, 0 for B2B Edition, 1 for 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 your external PDF file. The recommended file size should not exceed 5 MB. Please make sure that your file service has processed CORS. - termsConditions: - type: string - description: Terms & Conditions. Visible on the default Invoice PDF. - required: - - invoiceNumber - - originalBalance - - openBalance - - customerId - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/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: The description is a requirement for a custom product. - 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: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/invoice.yaml - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/extra_fields/extra_field_values.yaml - meta: - type: object - properties: - message: - type: string - pagination: - type: object - properties: - totalCount: - type: integer - limit: - type: integer - offset: - type: integer - 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: "123 Main Street" - street2: "Suite 200" - zipCode: '111111' - lastName: "Doe" - firstName: "John" - customFields: {} - customerFields: {} - shippingAddresses: - - city: montreal - state: California - country: United States - street1: "123 Main Street" - street2: "Suite 200" - zipCode: '111111' - lastName: "Doe" - firstName: "John" - customFields: {} - details: - lineItems: - - sku: CLC - type: physical - comments: '' - quantity: 2 - unitPrice: - code: USD - value: '200.0000' - description: '[Sample] Canvas Laundry Cart' - customFields: {} - unitDiscount: - code: USD - value: 0 - shipments: [] - 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: 'Keyword queries are performed 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 period, with the "endDateAt" parameter.' - - schema: - type: string - in: query - name: endDateAt - description: 'Query by the created period, 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: Is show extra fields 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 no. - 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: - invoiceNumber: '00000036' - invoiceId: 36 - 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 invoiceId download - 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 your external PDF file. The recommended file size should not exceed 5 Mb. Please make sure that your file service has processed CORS. - meta: - type: object - properties: - message: - type: string - 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 - '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: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/utils/response-object.yaml - - type: object - properties: - data: - type: array - items: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/extra_fields/extra_fields.yaml - meta: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/utils/pagination.yaml - operationId: get-invoices-extra-fields - description: Get invoice extra field configs - parameters: - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/specs/api-v3/user/user.yaml#/components/parameters/offset - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/specs/api-v3/user/user.yaml#/components/parameters/limit +openapi: 3.0.1 +info: + title: Invoices + description: BigCommerce B2B Edition Invoice + contact: {} + version: v3 +servers: + - url: 'https://api-b2b.bigcommerce.com/api/v3/io/ip' +security: + - authToken: [] +tags: + - name: Invoice + description: Invoice +components: + securitySchemes: + authToken: + name: authToken + description: Required to authenticate requests. Include the token in a header parameter called `authToken`. + type: apiKey + in: header + responses: + '404': + 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 +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: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/invoice.yaml + - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/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: [] + lineItems: + - sku: DPB + type: physical + comments: '' + quantity: '10' + unitPrice: + code: USD + value: '34.95' + description: '[Sample] Dustpan & Brush' + customFields: {} + unitDiscount: + code: USD + value: '12' + - sku: DD + type: product + comments: '' + 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/404' + 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 + data: + id: 33 + meta: + message: Bad Requests Error + errors: 'Please enter a valid number; ' + 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: {} + 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: + "key": string + "value": string + 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 will be auto-set to 2 when the open balance is <= 0.' + purchaseOrderNumber: + type: string + minLength: 1 + description: PO Number + details: + type: object + description: 'Updating will override the invoice details; therefore, ensure you get the original values before updating all the data.' + 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: object + 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: The product description or product name is a requirement for a custom product. + minLength: 1 + customFields: + type: object + description: Adds custom information to the product. + properties: + key: + type: string + description: The custom field name. + example: Back-ordered + value: + type: string + description: The custom field value. + example: 'No' + 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 your external PDF file. The recommended file size should not exceed 5 MB. Please make sure that your file service has processed CORS. Using empty value if you want to delete it. + - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/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: 'Sample' + quantity: '2' + unitPrice: + code: USD + value: '200.0000' + description: '[Sample] Canvas Laundry Cart' + customFields: + key: 'Back-ordered' + value: 'No' + 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/404' + 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: 'Due date, if empty, it will be set to the default due date which is the current date + pre-configured due days.' + status: + type: integer + default: 0 + enum: + - 0 + - 1 + - 2 + description: 'Invoice status 0=Open, 1=Partial paid, 2=Completed, 0 as default, will be auto set to 2 when open balance is <= 0' + orderNumber: + type: string + description: ID in BC of the order to which the current 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: The creation timestamp of the invoice. The current timestamp is the default. + details: + type: object + description: Invoice details + properties: + header: + type: object + properties: + costLines: + type: array + description: 'Invoice cost information is not required,but some of the sub-fields will be required if it exists. Invoice cost information is 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 is not required,but if it exists, some sub-fields will be required.' + 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 addresses is not required,but if exists, some of the following sub-fields will be required, but an empty string is allowed.' + 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 shipment information is not required,but if exists, some of the following sub-fields will be required, but an empty string is allowed.' + items: + type: object + properties: + addressIndex: + type: string + description: address ID + shipDate: + type: string + description: shipment + shipVia: + type: string + trackingNumber: + type: string + description: tracking number + comments: + type: string + required: + - addressIndex + - shipDate + - shipVia + - trackingNumber + - comments + lineItems: + type: array + description: 'Invoice products information is not required,but if exists, some of the following sub-fields will be required.' + 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: The product description or product name is a requirement for a custom product. + unitDiscount: + type: object + description: 'The product unit discount is not required,but if exists, some of the following sub-fields will be required.' + 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: 'Source of the invoice. Mark the source of the invoice, 0 for B2B Edition, 1 for 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 your external PDF file. The recommended file size should not exceed 5 MB. Please make sure that your file service has processed CORS. + termsConditions: + type: string + description: Terms & Conditions. Visible on the default Invoice PDF. + required: + - invoiceNumber + - originalBalance + - openBalance + - customerId + - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/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: The description is a requirement for a custom product. + 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: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/invoice.yaml + - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/extra_fields/extra_field_values.yaml + meta: + type: object + properties: + message: + type: string + pagination: + type: object + properties: + totalCount: + type: integer + limit: + type: integer + offset: + type: integer + 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: "123 Main Street" + street2: "Suite 200" + zipCode: '111111' + lastName: "Doe" + firstName: "John" + customFields: {} + customerFields: {} + shippingAddresses: + - city: montreal + state: California + country: United States + street1: "123 Main Street" + street2: "Suite 200" + zipCode: '111111' + lastName: "Doe" + firstName: "John" + customFields: {} + details: + lineItems: + - sku: CLC + type: physical + comments: '' + quantity: 2 + unitPrice: + code: USD + value: '200.0000' + description: '[Sample] Canvas Laundry Cart' + customFields: {} + unitDiscount: + code: USD + value: 0 + shipments: [] + 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: 'Keyword queries are performed 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 period, with the "endDateAt" parameter.' + - schema: + type: string + in: query + name: endDateAt + description: 'Query by the created period, 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: Is show extra fields 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 no. + 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: + invoiceNumber: '00000036' + invoiceId: 36 + 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 invoiceId download + 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 your external PDF file. The recommended file size should not exceed 5 Mb. Please make sure that your file service has processed CORS. + meta: + type: object + properties: + message: + type: string + 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 + '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: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/utils/response-object.yaml + - type: object + properties: + data: + type: array + items: + $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/extra_fields/extra_fields.yaml + meta: + $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/utils/pagination.yaml + operationId: get-invoices-extra-fields + description: Get invoice extra field configs + parameters: + - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/specs/api-v3/user/user.yaml#/components/parameters/offset + - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/specs/api-v3/user/user.yaml#/components/parameters/limit diff --git a/docs/b2b-edition/specs/api-v3/invoice_management/payment/payment.yaml b/docs/b2b-edition/specs/api-v3/invoice_management/payment/payment.yaml index 5915721e9..f8e85d04b 100644 --- a/docs/b2b-edition/specs/api-v3/invoice_management/payment/payment.yaml +++ b/docs/b2b-edition/specs/api-v3/invoice_management/payment/payment.yaml @@ -1,1541 +1,1541 @@ -openapi: '3.0.1' -info: - title: PaymentMethod - description: BigCommerce B2B Edition PaymentMethod - contact: {} - version: v3 -servers: - - url: 'https://api-b2b.bigcommerce.com/api/v3/io/ip' -security: - - authToken: [] -components: - securitySchemes: - authToken: - name: authToken - description: Required to authenticate requests. Include the token in a header parameter called `authToken`. - type: apiKey - in: header - responses: - '400': - 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 - '404': - 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 - '422': - 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: - - errMsg - properties: - errMsg: - type: string - required: - - code - - meta - - data - examples: - example: - value: - code: 422 - meta: - message: Parameter Error - data: - errMsg: Invalid request data -paths: - /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: object - 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: 'payment' - 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: '00000142' - 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: '00000142' - 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: 'Keyword queries are performed 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: BigCommerce channel IDs. Do not use this parameter if you do not have an opened multi-storefront. - '/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: object - properties: - type: - type: string - description: - type: string - amount: - 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 - operation code map as - (0, "Apply to Invoice Balances"), - (1, "Revert Invoice Balances"), - (2, "Pull Updates From Order"), - items: - type: number - allowedStatuses: - type: array - description: |- - allowed payment status - status code should be following - (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: 'payment' - 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/404' - 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/404' - 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 Operations - 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 list of states that the current payment allows to modify. - 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/404' - operationId: get-payment-operations-operations - description: Get a payment 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/400' - 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, list of allowed operations of this payment.' - enum: - - 0 - - 1 - - 2 - - 3 - example: 1 - 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/400' - 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: 'Contains payment transaction information, depends and varies on 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/404' - 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/422' - 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 is the same as the customerId - processingStatus: - type: number - default: 3 - enum: - - 1 - - 2 - - 3 - - 4 - example: 3 - description: 'payment status, 3 is 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 a 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/422' - 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 -tags: - - name: Payments +openapi: '3.0.1' +info: + title: PaymentMethod + description: BigCommerce B2B Edition PaymentMethod + contact: {} + version: v3 +servers: + - url: 'https://api-b2b.bigcommerce.com/api/v3/io/ip' +security: + - authToken: [] +components: + securitySchemes: + authToken: + name: authToken + description: Required to authenticate requests. Include the token in a header parameter called `authToken`. + type: apiKey + in: header + responses: + '400': + 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 + '404': + 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 + '422': + 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: + - errMsg + properties: + errMsg: + type: string + required: + - code + - meta + - data + examples: + example: + value: + code: 422 + meta: + message: Parameter Error + data: + errMsg: Invalid request data +paths: + /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: object + 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: 'payment' + 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: '00000142' + 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: '00000142' + 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: 'Keyword queries are performed 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: BigCommerce channel IDs. Do not use this parameter if you do not have an opened multi-storefront. + '/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: object + properties: + type: + type: string + description: + type: string + amount: + 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 + operation code map as + (0, "Apply to Invoice Balances"), + (1, "Revert Invoice Balances"), + (2, "Pull Updates From Order"), + items: + type: number + allowedStatuses: + type: array + description: |- + allowed payment status + status code should be following + (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: 'payment' + 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/404' + 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/404' + 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 Operations + 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 list of states that the current payment allows to modify. + 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/404' + operationId: get-payment-operations-operations + description: Get a payment 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/400' + 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, list of allowed operations of this payment.' + enum: + - 0 + - 1 + - 2 + - 3 + example: 1 + 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/400' + 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: 'Contains payment transaction information, depends and varies on 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/404' + 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/422' + 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 is the same as the customerId + processingStatus: + type: number + default: 3 + enum: + - 1 + - 2 + - 3 + - 4 + example: 3 + description: 'payment status, 3 is 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 a 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/422' + 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 +tags: + - name: Payments diff --git a/docs/b2b-edition/specs/api-v3/invoice_management/receipt/receipt.yaml b/docs/b2b-edition/specs/api-v3/invoice_management/receipt/receipt.yaml index b62beacd8..5a651608a 100644 --- a/docs/b2b-edition/specs/api-v3/invoice_management/receipt/receipt.yaml +++ b/docs/b2b-edition/specs/api-v3/invoice_management/receipt/receipt.yaml @@ -1,1312 +1,1312 @@ -openapi: '3.0.1' -info: - title: Receipt - description: BigCommerce B2B Edition Invoice Receipt - contact: {} - version: v3 -servers: - - url: 'https://api-b2b.bigcommerce.com/api/v3/io/ip' -security: - - authToken: [] -tags: - - name: Receipt - description: Receipt -components: - securitySchemes: - authToken: - name: authToken - description: Required to authenticate requests. Include the token in a header parameter called `authToken`. - type: apiKey - in: header - responses: - '404': - 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 -paths: - /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: 'paid in full' - 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: 'Keyword queries are performed 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: - 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 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/404' - 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 success request - data: - type: object - properties: - id: - type: integer - description: The unique receipt ID - meta: - type: object - properties: - message: - type: string - description: Response message of request - examples: - example-1: - value: - code: 200 - data: - id: 3 - meta: - message: SUCCESS - '404': - $ref: '#/components/responses/404' - 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: - 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: 'Keyword queries are performed 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/404' - 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: - 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: 'Keyword queries are performed 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 receipt - '/receipts/{receiptId}/lines/{receiptLineId}': - parameters: - - schema: - type: string - name: receiptId - in: path - required: true - description: The unique ID of receipt - - schema: - type: string - name: receiptLineId - in: path - required: true - description: The unique ID of 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 success request - data: - type: object - properties: - id: - type: integer - description: The unique ID of receipt line - meta: - type: object - properties: - message: - type: string - description: Response message of request - examples: - example-1: - value: - code: 200 - data: - id: 92 - meta: - message: SUCCESS - description: Delete a receipt line +openapi: '3.0.1' +info: + title: Receipt + description: BigCommerce B2B Edition Invoice Receipt + contact: {} + version: v3 +servers: + - url: 'https://api-b2b.bigcommerce.com/api/v3/io/ip' +security: + - authToken: [] +tags: + - name: Receipt + description: Receipt +components: + securitySchemes: + authToken: + name: authToken + description: Required to authenticate requests. Include the token in a header parameter called `authToken`. + type: apiKey + in: header + responses: + '404': + 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 +paths: + /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: 'paid in full' + 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: 'Keyword queries are performed 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: + 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 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/404' + 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 success request + data: + type: object + properties: + id: + type: integer + description: The unique receipt ID + meta: + type: object + properties: + message: + type: string + description: Response message of request + examples: + example-1: + value: + code: 200 + data: + id: 3 + meta: + message: SUCCESS + '404': + $ref: '#/components/responses/404' + 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: + 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: 'Keyword queries are performed 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/404' + 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: + 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: 'Keyword queries are performed 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 receipt + '/receipts/{receiptId}/lines/{receiptLineId}': + parameters: + - schema: + type: string + name: receiptId + in: path + required: true + description: The unique ID of receipt + - schema: + type: string + name: receiptLineId + in: path + required: true + description: The unique ID of 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 success request + data: + type: object + properties: + id: + type: integer + description: The unique ID of receipt line + meta: + type: object + properties: + message: + type: string + description: Response message of request + examples: + example-1: + value: + code: 200 + data: + id: 92 + meta: + message: SUCCESS + description: Delete a receipt line diff --git a/docs/b2b-edition/specs/storefront/invoice_protal/invoice/invoice.yaml b/docs/b2b-edition/specs/storefront/invoice_protal/invoice/invoice.yaml index 250879dbb..a739d45f1 100644 --- a/docs/b2b-edition/specs/storefront/invoice_protal/invoice/invoice.yaml +++ b/docs/b2b-edition/specs/storefront/invoice_protal/invoice/invoice.yaml @@ -1,1006 +1,1006 @@ -openapi: 3.0.1 -info: - title: Invoices - description: BigCommerce B2B Edition Invoice - contact: {} - version: v2 -servers: - - url: 'https://api-b2b.bigcommerce.com/api/v2/ip/storefront' -security: - - authToken: [] -tags: - - name: Invoice - description: Invoice -components: - securitySchemes: - authToken: - name: authToken - type: apiKey - in: header - schemas: - invoice: - description: Invoice model - type: object - 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: - - {} - lineItems: - - sku: string - type: string - comments: string - quantity: string - unitPrice: - code: string - 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 - title: '' - x-internal: false - properties: - id: - type: number - description: Invoice ID - readOnly: true - customerId: - type: string - minLength: 1 - description: B2B Edition Company ID - externalCustomerId: - type: string - minLength: 1 - description: ID of a company associated with a third party - externalId: - type: string - minLength: 1 - description: The ID of the invoice associated with the third party - invoiceNumber: - type: string - minLength: 1 - description: Invoice no. - type: - type: string - minLength: 1 - description: Invoice Type - dueDate: - type: number - description: Invoice due date - status: - type: number - description: Invoice status - orderNumber: - type: string - minLength: 1 - description: BigCommerce order ID - purchaseOrderNumber: - type: string - minLength: 1 - description: PO no. - details: - type: object - description: Invoice details - properties: - type: - type: string - minLength: 1 - description: Invoice details type - header: - type: object - required: - - costLines - - billingAddress - - shippingAddresses - properties: - costLines: - type: array - uniqueItems: true - minItems: 1 - description: Invoice cost information - items: - type: object - properties: - amount: - type: object - description: cost amount - required: - - code - - value - properties: - code: - type: string - minLength: 1 - value: - type: string - minLength: 1 - description: - type: string - minLength: 1 - description: cost description - required: - - amount - - description - orderDate: - type: number - description: Invoice order creation time - billingAddress: - type: object - description: Invoice billing address - required: - - city - - state - - country - - street1 - - street2 - - zipCode - - lastName - - firstName - 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: object - customerFields: - type: string - minLength: 1 - description: User-defined additional fields - shippingAddresses: - type: array - uniqueItems: true - minItems: 1 - description: Invoice shipping addresses - 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 - customFields: - type: object - required: - - city - - state - - country - - street1 - - street2 - - zipCode - - lastName - - firstName - details: - type: object - properties: - shipments: - type: array - uniqueItems: true - minItems: 1 - description: Invoice shipments information - items: - type: object - properties: - addressIndex: - type: string - description: address ID - shipDate: - type: string - description: Time of shipment - shipVia: - type: string - trackingNumber: - type: string - description: tracking number - comments: - type: string - description: comments - customFields: - type: object - required: - - addressIndex - - shipDate - - shipVia - - trackingNumber - - comments - lineItems: - type: array - uniqueItems: true - minItems: 1 - description: Invoice Product Information - items: - type: object - properties: - sku: - type: string - minLength: 1 - description: Product sku - type: - type: string - minLength: 1 - description: product type - comments: - type: string - minLength: 1 - quantity: - type: string - minLength: 1 - description: product qyantity - unitPrice: - type: object - description: product unit price - required: - - code - - value - properties: - code: - type: string - minLength: 1 - description: currency code - example: USA - value: - type: string - minLength: 1 - description: amount - description: - type: string - minLength: 1 - description: product description - customFields: - type: object - unitDiscount: - type: object - description: product unit discount - required: - - code - - value - properties: - code: - type: string - minLength: 1 - description: currency code - value: - type: string - minLength: 1 - description: amount - required: - - sku - - type - - comments - - quantity - - unitPrice - - description - - unitDiscount - required: - - lineItems - required: - - type - - header - isPendingPayment: - type: number - readOnly: true - source: - type: number - description: Source of invoice 0 is B2B Edition 1 is External - enum: - - 0 - - 1 - example: 0 - originalBalance: - type: object - description: Origin balance - required: - - code - - value - properties: - code: - type: string - minLength: 1 - description: currency code - value: - type: string - minLength: 1 - description: amount - openBalance: - type: object - description: Invoice open balance - required: - - code - - value - properties: - code: - type: string - minLength: 1 - description: currency code - value: - type: string - minLength: 1 - description: amount - customerName: - type: string - minLength: 1 - description: BigCommerce customer group name - readOnly: true - createdAt: - type: string - description: Invoice creation time - updatedAt: - type: string - description: Invoice last updated time - readOnly: true - required: - - customerId - - invoiceNumber - - type - - status - - originalBalance - - openBalance -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: - $ref: '#/components/schemas/invoice' - meta: - type: object - required: - - message - properties: - message: - type: string - minLength: 1 - required: - - meta - examples: - '200': - value: - code: 200 - data: - id: 9 - customerId: '95075' - externalId: null - externalCustomerId: null - invoiceNumber: '00000009' - type: Invoice on Shipment - dueDate: 1617675497 - status: 1 - orderNumber: '104' - purchaseOrderNumber: null - 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: [] - lineItems: - - sku: DPB - type: physical - comments: '' - quantity: '10' - unitPrice: - code: USD - value: '34.95' - description: '[Sample] Dustpan & Brush' - customFields: {} - unitDiscount: - code: USD - value: '12' - - sku: DD - type: product - comments: '' - 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 - '404': - value: - code: 404 - data: [] - meta: - message: Not Found Error - errors: Invoice does not exist - example-3: - 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: string - shippingAddresses: - - city: string - state: string - country: string - street1: string - street2: string - zipCode: string - lastName: string - firstName: string - customFields: {} - details: - shipments: - - {} - lineItems: - - sku: string - type: string - comments: string - quantity: string - unitPrice: - code: string - 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 - meta: - message: string - description: get invoice detail - parameters: - - schema: - type: string - in: header - name: authToken - description: API token - required: true - tags: - - Invoice - x-internal: true - /invoices: - parameters: [] - get: - summary: Get invoices - operationId: get-invoices - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - properties: - code: - type: number - data: - type: array - uniqueItems: true - minItems: 1 - items: - $ref: '#/components/schemas/invoice' - examples: - example: - value: - code: 200 - data: - - id: 33 - customerId: '3' - externalId: null - externalCustomerId: null - invoiceNumber: '00000033' - type: Invoice on Shipment - dueDate: 1619826907 - status: 0 - orderNumber: '132' - purchaseOrderNumber: null - 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: "123 Main Street" - street2: "Suite 200" - zipCode: '111111' - lastName: "Doe" - firstName: "John" - customFields: {} - customerFields: '' - shippingAddresses: - - city: "Montreal" - state: "California" - country: "United States" - street1: "123 Main Street" - street2: "Suite 200" - zipCode: '111111' - lastName: "Doe" - firstName: "John" - customFields: {} - details: - lineItems: - - sku: CLC - type: physical - comments: '' - quantity: 2 - unitPrice: - code: USD - value: '200.0000' - description: '[Sample] Canvas Laundry Cart' - customFields: {} - unitDiscount: - code: USD - value: 0 - shipments: [] - isPendingPayment: 1 - source: 0 - originalBalance: - code: USD - value: '400.0000' - openBalance: - code: USD - value: '400.0000' - customerName: ABC123 - description: get invoices - parameters: - - schema: - type: string - in: header - name: authToken - description: API Token - required: true - - 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: 'Keyword queries are performed 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: array - enum: - - 0 is open - - 1 is partial - - 2 is completed - example: '[0, 1]' - in: query - name: status - description: Query by invoice status - - schema: - type: string - in: query - name: beginDateAt - description: 'Query by the created time period, with the "endDateAt" parameter' - - schema: - type: string - in: query - name: endDateAt - description: 'Query by the created time period, with the "beginDateAt" parameter' - - schema: - type: array - in: query - name: externalId - description: Query by the invoice external ID - tags: - - Invoice - x-internal: true - /invoices/export: - get: - summary: Export invoices - tags: - - Invoice - operationId: get-invoices-export - description: export invoices - parameters: - - schema: - type: string - in: header - name: authToken - description: API Token - required: true - - 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: 'Keyword queries are performed 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: array - enum: - - 0 is open - - 1 is partial - - 2 is completed - example: '[0, 1]' - in: query - name: status - description: Query by invoice status - - schema: - type: string - in: query - name: beginDateAt - description: 'Query by the created time period, with the "endDateAt" parameter' - - schema: - type: string - in: query - name: endDateAt - description: 'Query by the created time period, with the "beginDateAt" parameter' - responses: - '200': - description: 'If the request is successful, a file named "invoices.csv" is returned' - x-internal: true - '/invoices/{invoiceId}/download-pdf': - parameters: - - schema: - type: string - name: invoiceId - in: path - required: true - get: - summary: Download pdf file by invoice id - tags: [] - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - properties: - code: - type: number - data: - type: object - properties: - url: - type: string - minLength: 1 - required: - - url - meta: - type: object - properties: - message: - type: string - minLength: 1 - required: - - message - required: - - code - - data - - meta - x-examples: - example-1: - code: 200 - data: - url: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v2.0-quote-staging/B3_Sandbox_Invoice_Portal_Dev:00000026.pdf' - meta: - message: SUCCESS - examples: - example-1: - value: - code: 200 - data: - url: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v2.0-quote-staging/B3_Sandbox_Invoice_Portal_Dev:00000026.pdf' - meta: - message: SUCCESS - operationId: get-invoices-invoiceId-download-pdf - description: Download pdf file by invoice id - parameters: - - schema: - type: string - in: header - name: authToken - required: true - x-internal: true -x-internal: true +openapi: 3.0.1 +info: + title: Invoices + description: BigCommerce B2B Edition Invoice + contact: {} + version: v2 +servers: + - url: 'https://api-b2b.bigcommerce.com/api/v2/ip/storefront' +security: + - authToken: [] +tags: + - name: Invoice + description: Invoice +components: + securitySchemes: + authToken: + name: authToken + type: apiKey + in: header + schemas: + invoice: + description: Invoice model + type: object + 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: + - {} + lineItems: + - sku: string + type: string + comments: string + quantity: string + unitPrice: + code: string + 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 + title: '' + x-internal: false + properties: + id: + type: number + description: Invoice ID + readOnly: true + customerId: + type: string + minLength: 1 + description: B2B Edition Company ID + externalCustomerId: + type: string + minLength: 1 + description: ID of a company associated with a third party + externalId: + type: string + minLength: 1 + description: The ID of the invoice associated with the third party + invoiceNumber: + type: string + minLength: 1 + description: Invoice no. + type: + type: string + minLength: 1 + description: Invoice Type + dueDate: + type: number + description: Invoice due date + status: + type: number + description: Invoice status + orderNumber: + type: string + minLength: 1 + description: BigCommerce order ID + purchaseOrderNumber: + type: string + minLength: 1 + description: PO no. + details: + type: object + description: Invoice details + properties: + type: + type: string + minLength: 1 + description: Invoice details type + header: + type: object + required: + - costLines + - billingAddress + - shippingAddresses + properties: + costLines: + type: array + uniqueItems: true + minItems: 1 + description: Invoice cost information + items: + type: object + properties: + amount: + type: object + description: cost amount + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + description: + type: string + minLength: 1 + description: cost description + required: + - amount + - description + orderDate: + type: number + description: Invoice order creation time + billingAddress: + type: object + description: Invoice billing address + required: + - city + - state + - country + - street1 + - street2 + - zipCode + - lastName + - firstName + 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: object + customerFields: + type: string + minLength: 1 + description: User-defined additional fields + shippingAddresses: + type: array + uniqueItems: true + minItems: 1 + description: Invoice shipping addresses + 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 + customFields: + type: object + required: + - city + - state + - country + - street1 + - street2 + - zipCode + - lastName + - firstName + details: + type: object + properties: + shipments: + type: array + uniqueItems: true + minItems: 1 + description: Invoice shipments information + items: + type: object + properties: + addressIndex: + type: string + description: address ID + shipDate: + type: string + description: Time of shipment + shipVia: + type: string + trackingNumber: + type: string + description: tracking number + comments: + type: string + description: comments + customFields: + type: object + required: + - addressIndex + - shipDate + - shipVia + - trackingNumber + - comments + lineItems: + type: array + uniqueItems: true + minItems: 1 + description: Invoice Product Information + items: + type: object + properties: + sku: + type: string + minLength: 1 + description: Product sku + type: + type: string + minLength: 1 + description: product type + comments: + type: string + minLength: 1 + quantity: + type: string + minLength: 1 + description: product qyantity + unitPrice: + type: object + description: product unit price + required: + - code + - value + properties: + code: + type: string + minLength: 1 + description: currency code + example: USA + value: + type: string + minLength: 1 + description: amount + description: + type: string + minLength: 1 + description: product description + customFields: + type: object + unitDiscount: + type: object + description: product unit discount + required: + - code + - value + properties: + code: + type: string + minLength: 1 + description: currency code + value: + type: string + minLength: 1 + description: amount + required: + - sku + - type + - comments + - quantity + - unitPrice + - description + - unitDiscount + required: + - lineItems + required: + - type + - header + isPendingPayment: + type: number + readOnly: true + source: + type: number + description: Source of invoice 0 is B2B Edition 1 is External + enum: + - 0 + - 1 + example: 0 + originalBalance: + type: object + description: Origin balance + required: + - code + - value + properties: + code: + type: string + minLength: 1 + description: currency code + value: + type: string + minLength: 1 + description: amount + openBalance: + type: object + description: Invoice open balance + required: + - code + - value + properties: + code: + type: string + minLength: 1 + description: currency code + value: + type: string + minLength: 1 + description: amount + customerName: + type: string + minLength: 1 + description: BigCommerce customer group name + readOnly: true + createdAt: + type: string + description: Invoice creation time + updatedAt: + type: string + description: Invoice last updated time + readOnly: true + required: + - customerId + - invoiceNumber + - type + - status + - originalBalance + - openBalance +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: + $ref: '#/components/schemas/invoice' + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - meta + examples: + '200': + value: + code: 200 + data: + id: 9 + customerId: '95075' + externalId: null + externalCustomerId: null + invoiceNumber: '00000009' + type: Invoice on Shipment + dueDate: 1617675497 + status: 1 + orderNumber: '104' + purchaseOrderNumber: null + 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: [] + lineItems: + - sku: DPB + type: physical + comments: '' + quantity: '10' + unitPrice: + code: USD + value: '34.95' + description: '[Sample] Dustpan & Brush' + customFields: {} + unitDiscount: + code: USD + value: '12' + - sku: DD + type: product + comments: '' + 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 + '404': + value: + code: 404 + data: [] + meta: + message: Not Found Error + errors: Invoice does not exist + example-3: + 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: string + shippingAddresses: + - city: string + state: string + country: string + street1: string + street2: string + zipCode: string + lastName: string + firstName: string + customFields: {} + details: + shipments: + - {} + lineItems: + - sku: string + type: string + comments: string + quantity: string + unitPrice: + code: string + 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 + meta: + message: string + description: get invoice detail + parameters: + - schema: + type: string + in: header + name: authToken + description: API token + required: true + tags: + - Invoice + x-internal: true + /invoices: + parameters: [] + get: + summary: Get invoices + operationId: get-invoices + responses: + '200': + description: OK + content: + application/json: + schema: + description: '' + type: object + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + $ref: '#/components/schemas/invoice' + examples: + example: + value: + code: 200 + data: + - id: 33 + customerId: '3' + externalId: null + externalCustomerId: null + invoiceNumber: '00000033' + type: Invoice on Shipment + dueDate: 1619826907 + status: 0 + orderNumber: '132' + purchaseOrderNumber: null + 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: "123 Main Street" + street2: "Suite 200" + zipCode: '111111' + lastName: "Doe" + firstName: "John" + customFields: {} + customerFields: '' + shippingAddresses: + - city: "Montreal" + state: "California" + country: "United States" + street1: "123 Main Street" + street2: "Suite 200" + zipCode: '111111' + lastName: "Doe" + firstName: "John" + customFields: {} + details: + lineItems: + - sku: CLC + type: physical + comments: '' + quantity: 2 + unitPrice: + code: USD + value: '200.0000' + description: '[Sample] Canvas Laundry Cart' + customFields: {} + unitDiscount: + code: USD + value: 0 + shipments: [] + isPendingPayment: 1 + source: 0 + originalBalance: + code: USD + value: '400.0000' + openBalance: + code: USD + value: '400.0000' + customerName: ABC123 + description: get invoices + parameters: + - schema: + type: string + in: header + name: authToken + description: API Token + required: true + - 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: 'Keyword queries are performed 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: array + enum: + - 0 is open + - 1 is partial + - 2 is completed + example: '[0, 1]' + in: query + name: status + description: Query by invoice status + - schema: + type: string + in: query + name: beginDateAt + description: 'Query by the created time period, with the "endDateAt" parameter' + - schema: + type: string + in: query + name: endDateAt + description: 'Query by the created time period, with the "beginDateAt" parameter' + - schema: + type: array + in: query + name: externalId + description: Query by the invoice external ID + tags: + - Invoice + x-internal: true + /invoices/export: + get: + summary: Export invoices + tags: + - Invoice + operationId: get-invoices-export + description: export invoices + parameters: + - schema: + type: string + in: header + name: authToken + description: API Token + required: true + - 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: 'Keyword queries are performed 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: array + enum: + - 0 is open + - 1 is partial + - 2 is completed + example: '[0, 1]' + in: query + name: status + description: Query by invoice status + - schema: + type: string + in: query + name: beginDateAt + description: 'Query by the created time period, with the "endDateAt" parameter' + - schema: + type: string + in: query + name: endDateAt + description: 'Query by the created time period, with the "beginDateAt" parameter' + responses: + '200': + description: 'If the request is successful, a file named "invoices.csv" is returned' + x-internal: true + '/invoices/{invoiceId}/download-pdf': + parameters: + - schema: + type: string + name: invoiceId + in: path + required: true + get: + summary: Download pdf file by invoice id + tags: [] + responses: + '200': + description: OK + content: + application/json: + schema: + description: '' + type: object + properties: + code: + type: number + data: + type: object + properties: + url: + type: string + minLength: 1 + required: + - url + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 200 + data: + url: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v2.0-quote-staging/B3_Sandbox_Invoice_Portal_Dev:00000026.pdf' + meta: + message: SUCCESS + examples: + example-1: + value: + code: 200 + data: + url: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v2.0-quote-staging/B3_Sandbox_Invoice_Portal_Dev:00000026.pdf' + meta: + message: SUCCESS + operationId: get-invoices-invoiceId-download-pdf + description: Download pdf file by invoice id + parameters: + - schema: + type: string + in: header + name: authToken + required: true + x-internal: true +x-internal: true diff --git a/docs/b2b-edition/specs/storefront/invoice_protal/payment/payment.yaml b/docs/b2b-edition/specs/storefront/invoice_protal/payment/payment.yaml index ff4a8e57a..e5fb73e25 100644 --- a/docs/b2b-edition/specs/storefront/invoice_protal/payment/payment.yaml +++ b/docs/b2b-edition/specs/storefront/invoice_protal/payment/payment.yaml @@ -1,147 +1,147 @@ -openapi: 3.0.1 -info: - title: PaymentMethod - description: BigCommerce B2B Edition PaymentMethod - contact: {} - version: v3 -servers: - - url: 'https://api-b2b.bigcommerce.com/api/v2/ip/storefront' -security: - - authToken: [] -tags: - - name: PaymentMethod - description: PaymentMethod -components: - securitySchemes: - authToken: - name: authToken - type: apiKey - in: header -paths: - /payments/modules: - get: - summary: Get Payment Modules - tags: - - Payments - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - properties: - code: - type: number - data: - type: array - uniqueItems: true - minItems: 1 - items: - required: - - moduleName - properties: - moduleName: - type: string - minLength: 1 - value: - type: object - properties: - isEnabled: - type: number - displayName: - type: string - minLength: 1 - isStorefrontMethod: - type: number - required: - - isEnabled - - displayName - - isStorefrontMethod - meta: - type: object - properties: - message: - type: string - minLength: 1 - required: - - message - required: - - code - - data - - meta - x-examples: - example-1: - code: 200 - data: - - moduleName: payments_offline - value: - isEnabled: 1 - displayName: Offline Payment - isStorefrontMethod: 0 - - moduleName: payments_test - value: - isEnabled: 0 - displayName: Test Payment Gateway - isStorefrontMethod: 1 - - moduleName: payments_minibc - value: - apiKey: '' - rootUrl: 'https://apps.minibc.com/api/apps/recurring/v1' - isEnabled: 1 - displayName: Credit / Debit Card - authorizeOnly: 1 - isStorefrontMethod: 1 - - moduleName: payments_bigcommerce_sales_order - value: - isEnabled: 1 - productId: 112 - variantId: 77 - displayName: Pay with BigCommerce - allowedMethods: - - bigpaypay - - cheque - isStorefrontMethod: 1 - meta: - message: SUCCESS - examples: - example-1: - value: - code: 200 - data: - - moduleName: payments_offline - value: - isEnabled: 1 - displayName: Offline Payment - isStorefrontMethod: 0 - - moduleName: payments_test - value: - isEnabled: 0 - displayName: Test Payment Gateway - isStorefrontMethod: 1 - - moduleName: payments_minibc - value: - apiKey: '' - rootUrl: 'https://apps.minibc.com/api/apps/recurring/v1' - isEnabled: 1 - displayName: Credit / Debit Card - authorizeOnly: 1 - isStorefrontMethod: 1 - - moduleName: payments_bigcommerce_sales_order - value: - isEnabled: 1 - productId: 112 - variantId: 77 - displayName: Pay with BigCommerce - allowedMethods: - - bigpaypay - - cheque - isStorefrontMethod: 1 - meta: - message: SUCCESS - operationId: get-payments-modules - description: Get payment modules - parameters: [] - x-internal: true -x-internal: true +openapi: 3.0.1 +info: + title: PaymentMethod + description: BigCommerce B2B Edition PaymentMethod + contact: {} + version: v3 +servers: + - url: 'https://api-b2b.bigcommerce.com/api/v2/ip/storefront' +security: + - authToken: [] +tags: + - name: PaymentMethod + description: PaymentMethod +components: + securitySchemes: + authToken: + name: authToken + type: apiKey + in: header +paths: + /payments/modules: + get: + summary: Get Payment Modules + tags: + - Payments + responses: + '200': + description: OK + content: + application/json: + schema: + description: '' + type: object + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + required: + - moduleName + properties: + moduleName: + type: string + minLength: 1 + value: + type: object + properties: + isEnabled: + type: number + displayName: + type: string + minLength: 1 + isStorefrontMethod: + type: number + required: + - isEnabled + - displayName + - isStorefrontMethod + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 200 + data: + - moduleName: payments_offline + value: + isEnabled: 1 + displayName: Offline Payment + isStorefrontMethod: 0 + - moduleName: payments_test + value: + isEnabled: 0 + displayName: Test Payment Gateway + isStorefrontMethod: 1 + - moduleName: payments_minibc + value: + apiKey: '' + rootUrl: 'https://apps.minibc.com/api/apps/recurring/v1' + isEnabled: 1 + displayName: Credit / Debit Card + authorizeOnly: 1 + isStorefrontMethod: 1 + - moduleName: payments_bigcommerce_sales_order + value: + isEnabled: 1 + productId: 112 + variantId: 77 + displayName: Pay with BigCommerce + allowedMethods: + - bigpaypay + - cheque + isStorefrontMethod: 1 + meta: + message: SUCCESS + examples: + example-1: + value: + code: 200 + data: + - moduleName: payments_offline + value: + isEnabled: 1 + displayName: Offline Payment + isStorefrontMethod: 0 + - moduleName: payments_test + value: + isEnabled: 0 + displayName: Test Payment Gateway + isStorefrontMethod: 1 + - moduleName: payments_minibc + value: + apiKey: '' + rootUrl: 'https://apps.minibc.com/api/apps/recurring/v1' + isEnabled: 1 + displayName: Credit / Debit Card + authorizeOnly: 1 + isStorefrontMethod: 1 + - moduleName: payments_bigcommerce_sales_order + value: + isEnabled: 1 + productId: 112 + variantId: 77 + displayName: Pay with BigCommerce + allowedMethods: + - bigpaypay + - cheque + isStorefrontMethod: 1 + meta: + message: SUCCESS + operationId: get-payments-modules + description: Get payment modules + parameters: [] + x-internal: true +x-internal: true diff --git a/docs/b2b-edition/specs/storefront/invoice_protal/payment_bc_order/payment_bc_order.yaml b/docs/b2b-edition/specs/storefront/invoice_protal/payment_bc_order/payment_bc_order.yaml index c19d4c002..79632b64e 100644 --- a/docs/b2b-edition/specs/storefront/invoice_protal/payment_bc_order/payment_bc_order.yaml +++ b/docs/b2b-edition/specs/storefront/invoice_protal/payment_bc_order/payment_bc_order.yaml @@ -1,321 +1,321 @@ -openapi: 3.0.1 -info: - title: PaymentBCOrder - description: BigCommerce B2B Edition PaymentMethod - contact: {} - version: v3 -servers: - - url: 'https://api-b2b.bigcommerce.com/api/v2/ip/storefront' -security: - - authToken: [] -tags: - - name: PaymentBCOrder - description: PaymentBCOrder -components: - securitySchemes: - authToken: - name: authToken - type: apiKey - in: header -paths: - /payments/bigcommerce/carts: - post: - summary: Create BigCommerce Cart - tags: - - PaymentBCOrder - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - properties: - code: - type: number - data: - type: object - properties: - checkoutUrl: - type: string - minLength: 1 - cartId: - type: string - minLength: 1 - required: - - checkoutUrl - - cartId - meta: - type: object - properties: - message: - type: string - minLength: 1 - required: - - message - required: - - code - - data - - meta - x-examples: - example-1: - code: 200 - data: - checkoutUrl: 'https://devteambundleb2bnet.mybigcommerce.com/cart.php?action=loadInCheckout&id=e1d055aa-b8c2-4c50-b0db-71f02e66f449&token=e77a3e00972f5edbcacf352d5d29c814bc98404fd7361cca687498ef72015e07&from=IP' - cartId: e1d055aa-b8c2-4c50-b0db-71f02e66f449 - meta: - message: SUCCESS - examples: - '200': - value: - code: 200 - data: - checkoutUrl: 'https://devteambundleb2bnet.mybigcommerce.com/cart.php?action=loadInCheckout&id=e1d055aa-b8c2-4c50-b0db-71f02e66f449&token=e77a3e00972f5edbcacf352d5d29c814bc98404fd7361cca687498ef72015e07&from=IP' - cartId: e1d055aa-b8c2-4c50-b0db-71f02e66f449 - meta: - message: SUCCESS - operationId: create-bigcommerce-carts - description: Create bigcommerce cart - requestBody: - content: - application/json: - schema: - description: '' - type: object - properties: - details: - type: object - properties: - memo: - type: string - required: - - memo - currency: - type: string - minLength: 1 - lineItems: - type: array - uniqueItems: true - minItems: 1 - items: - required: - - invoiceId - - amount - properties: - invoiceId: - type: number - amount: - type: string - minLength: 1 - currentCartId: {} - required: - - details - - currency - - lineItems - x-examples: - example-1: - details: - memo: '' - currency: USD - lineItems: - - invoiceId: 26 - amount: '10' - currentCartId: null - x-internal: true - '/payments/bigcommerce/carts/{payment_id}': - parameters: - - schema: - type: string - name: payment_id - in: path - required: true - get: - summary: Get Payment BigCommerce Cart - tags: - - PaymentBCOrder - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - properties: - code: - type: number - data: - type: object - properties: - cartId: - type: string - minLength: 1 - cartUrl: - type: string - required: - - cartId - - cartUrl - meta: - type: object - properties: - message: - type: string - minLength: 1 - required: - - message - required: - - code - - data - - meta - x-examples: - example-1: - code: 200 - data: - cartId: e1d055aa-b8c2-4c50-b0db-71f02e66f449 - cartUrl: '' - meta: - message: SUCCESS - examples: - '200': - value: - code: 200 - data: - cartId: e1d055aa-b8c2-4c50-b0db-71f02e66f449 - cartUrl: url - meta: - message: SUCCESS - operationId: get-payments-bigcommerce-carts-payment_id - description: Get payment big commerce cart - x-internal: true - /payments/bigcommerce/allowed-methods: - get: - summary: Get BigCommerce Payment Allowed Methods - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - x-examples: - example-1: - code: 200 - data: - allowedMethods: - - bigpaypay - - cheque - meta: - message: SUCCESS - properties: - code: - type: number - data: - type: object - required: - - allowedMethods - properties: - allowedMethods: - type: array - items: - type: string - meta: - type: object - required: - - message - properties: - message: - type: string - minLength: 1 - required: - - code - - data - - meta - examples: - '200': - value: - code: 200 - data: - allowedMethods: - - bigpaypay - meta: - message: SUCCESS - operationId: get-payments-bigcommerce-allowed-methods - description: Get bigcommerce payment allowed methods - tags: - - PaymentBCOrder - x-internal: true - /payments/bigcommerce/orders: - post: - summary: Finish BigCommerce Payment - tags: - - PaymentBCOrder - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - properties: - code: - type: number - data: - type: object - properties: - paymentId: - type: number - receiptId: - type: number - required: - - paymentId - - receiptId - meta: - type: object - properties: - message: - type: string - minLength: 1 - required: - - message - required: - - code - - data - - meta - x-examples: - example-1: - code: 200 - data: - paymentId: 15 - receiptId: 4 - meta: - message: SUCCESS - examples: - '200': - value: - code: 200 - data: - paymentId: 15 - receiptId: 4 - meta: - message: SUCCESS - operationId: finish-payments-bigcommerce-orders - requestBody: - content: - application/json: - schema: - description: '' - type: object - properties: - orderId: - type: number - required: - - orderId - x-examples: - example-1: - orderId: 142 - description: Finish bigcommerce payment - x-internal: true -x-internal: true +openapi: 3.0.1 +info: + title: PaymentBCOrder + description: BigCommerce B2B Edition PaymentMethod + contact: {} + version: v3 +servers: + - url: 'https://api-b2b.bigcommerce.com/api/v2/ip/storefront' +security: + - authToken: [] +tags: + - name: PaymentBCOrder + description: PaymentBCOrder +components: + securitySchemes: + authToken: + name: authToken + type: apiKey + in: header +paths: + /payments/bigcommerce/carts: + post: + summary: Create BigCommerce Cart + tags: + - PaymentBCOrder + responses: + '200': + description: OK + content: + application/json: + schema: + description: '' + type: object + properties: + code: + type: number + data: + type: object + properties: + checkoutUrl: + type: string + minLength: 1 + cartId: + type: string + minLength: 1 + required: + - checkoutUrl + - cartId + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 200 + data: + checkoutUrl: 'https://devteambundleb2bnet.mybigcommerce.com/cart.php?action=loadInCheckout&id=e1d055aa-b8c2-4c50-b0db-71f02e66f449&token=e77a3e00972f5edbcacf352d5d29c814bc98404fd7361cca687498ef72015e07&from=IP' + cartId: e1d055aa-b8c2-4c50-b0db-71f02e66f449 + meta: + message: SUCCESS + examples: + '200': + value: + code: 200 + data: + checkoutUrl: 'https://devteambundleb2bnet.mybigcommerce.com/cart.php?action=loadInCheckout&id=e1d055aa-b8c2-4c50-b0db-71f02e66f449&token=e77a3e00972f5edbcacf352d5d29c814bc98404fd7361cca687498ef72015e07&from=IP' + cartId: e1d055aa-b8c2-4c50-b0db-71f02e66f449 + meta: + message: SUCCESS + operationId: create-bigcommerce-carts + description: Create bigcommerce cart + requestBody: + content: + application/json: + schema: + description: '' + type: object + properties: + details: + type: object + properties: + memo: + type: string + required: + - memo + currency: + type: string + minLength: 1 + lineItems: + type: array + uniqueItems: true + minItems: 1 + items: + required: + - invoiceId + - amount + properties: + invoiceId: + type: number + amount: + type: string + minLength: 1 + currentCartId: {} + required: + - details + - currency + - lineItems + x-examples: + example-1: + details: + memo: '' + currency: USD + lineItems: + - invoiceId: 26 + amount: '10' + currentCartId: null + x-internal: true + '/payments/bigcommerce/carts/{payment_id}': + parameters: + - schema: + type: string + name: payment_id + in: path + required: true + get: + summary: Get Payment BigCommerce Cart + tags: + - PaymentBCOrder + responses: + '200': + description: OK + content: + application/json: + schema: + description: '' + type: object + properties: + code: + type: number + data: + type: object + properties: + cartId: + type: string + minLength: 1 + cartUrl: + type: string + required: + - cartId + - cartUrl + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 200 + data: + cartId: e1d055aa-b8c2-4c50-b0db-71f02e66f449 + cartUrl: '' + meta: + message: SUCCESS + examples: + '200': + value: + code: 200 + data: + cartId: e1d055aa-b8c2-4c50-b0db-71f02e66f449 + cartUrl: url + meta: + message: SUCCESS + operationId: get-payments-bigcommerce-carts-payment_id + description: Get payment big commerce cart + x-internal: true + /payments/bigcommerce/allowed-methods: + get: + summary: Get BigCommerce Payment Allowed Methods + responses: + '200': + description: OK + content: + application/json: + schema: + description: '' + type: object + x-examples: + example-1: + code: 200 + data: + allowedMethods: + - bigpaypay + - cheque + meta: + message: SUCCESS + properties: + code: + type: number + data: + type: object + required: + - allowedMethods + properties: + allowedMethods: + type: array + items: + type: string + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + '200': + value: + code: 200 + data: + allowedMethods: + - bigpaypay + meta: + message: SUCCESS + operationId: get-payments-bigcommerce-allowed-methods + description: Get bigcommerce payment allowed methods + tags: + - PaymentBCOrder + x-internal: true + /payments/bigcommerce/orders: + post: + summary: Finish BigCommerce Payment + tags: + - PaymentBCOrder + responses: + '200': + description: OK + content: + application/json: + schema: + description: '' + type: object + properties: + code: + type: number + data: + type: object + properties: + paymentId: + type: number + receiptId: + type: number + required: + - paymentId + - receiptId + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 200 + data: + paymentId: 15 + receiptId: 4 + meta: + message: SUCCESS + examples: + '200': + value: + code: 200 + data: + paymentId: 15 + receiptId: 4 + meta: + message: SUCCESS + operationId: finish-payments-bigcommerce-orders + requestBody: + content: + application/json: + schema: + description: '' + type: object + properties: + orderId: + type: number + required: + - orderId + x-examples: + example-1: + orderId: 142 + description: Finish bigcommerce payment + x-internal: true +x-internal: true diff --git a/docs/b2b-edition/specs/storefront/invoice_protal/receipet/receipt.yaml b/docs/b2b-edition/specs/storefront/invoice_protal/receipet/receipt.yaml index 408c38ad3..a67a14912 100644 --- a/docs/b2b-edition/specs/storefront/invoice_protal/receipet/receipt.yaml +++ b/docs/b2b-edition/specs/storefront/invoice_protal/receipet/receipt.yaml @@ -1,495 +1,495 @@ -openapi: 3.0.1 -info: - title: Receipt - description: BigCommerce B2B Edition Invoice Receipt - contact: {} - version: v3 -servers: - - url: 'https://api-b2b.bigcommerce.com/api/v2/ip/storefront' -security: - - authToken: [] -tags: - - name: Receipt - description: Receipt -components: - securitySchemes: - authToken: - name: authToken - type: apiKey - in: header - parameters: - offset: - name: offset - in: query - required: false - schema: - type: integer - minimum: 0 - description: 'Pagination offset default: 0' - limit: - name: limit - in: query - required: false - schema: - type: integer - default: 10 - minimum: 1 - maximum: 250 - description: 'Pagination limit default: 10' - orderBy: - name: orderBy - in: query - required: false - schema: - type: string - default: DESC - enum: - - DESC - - ASC - description: 'Allow: ''DESC'', ''ASC''' - 'paymentStatus[]': - name: 'paymentStatus[]' - in: query - required: false - schema: - type: string - enum: - - '0' - - '1' - - '2' - - '3' - - '4' - 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' - searchBy: - name: searchBy - in: query - required: false - schema: - type: string - enum: - - payerName - - referenceNumber - - customerId - - externalId - description: The response search by which field - sortBy: - name: sortBy - in: query - required: false - schema: - type: string - default: createdAt - enum: - - createdAt - - updatedAt - description: The response sorted by which field -paths: - /receipts: - get: - summary: Get receipts - tags: [] - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - code: - type: number - description: Response code of success request - data: - type: array - items: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/receipt.yaml - meta: - type: object - properties: - message: - type: string - description: Response message of success request - pagination: - type: object - properties: - offset: - type: integer - description: 'Pagination offset default: 0' - limit: - type: integer - description: 'Pagination limit default: 10' - totalCount: - type: integer - description: Total count of the receipts - 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: '' - 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-receipts - description: 'Get receipts, with pagination data' - security: - - authToken: [] - parameters: - - $ref: '#/components/parameters/offset' - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/orderBy' - - $ref: '#/components/parameters/paymentStatus[]' - - $ref: '#/components/parameters/sortBy' - - schema: - type: string - in: query - name: q - description: 'Keyword queries are performed on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy"' - - $ref: '#/components/parameters/searchBy' - x-internal: true - '/receipts/{receiptId}': - parameters: - - schema: - type: string - name: receiptId - in: path - required: true - description: The unique id of receipt - get: - summary: Get a receipt - tags: [] - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - code: - type: number - description: Response code of success request - data: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/receipt.yaml - meta: - type: object - properties: - message: - type: string - description: Response message of request - 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 - operationId: get-receipts-receiptId - description: Get a receipt detail - security: - - authToken: [] - x-internal: true - /receipt-lines: - get: - summary: Get all receipt lines - tags: [] - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - code: - type: number - data: - type: array - items: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/receipt_line.yaml - meta: - type: object - properties: - message: - type: string - pagination: - type: object - properties: - offset: - type: integer - limit: - type: integer - totalCount: - type: integer - examples: - example-1: - value: - code: 200 - data: - - id: 4 - createdAt: 1624258432 - updatedAt: 1624258432 - storeHash: byxn6vsd2k - customerId: '1' - externalId: '' - externalCustomerId: '' - receiptId: 4 - invoiceId: 26 - amount: - code: USD - value: '10.0000' - paymentStatus: 3 - paymentType: visa ending in 1111 - invoiceNumber: '00000026' - paymentId: 15 - referenceNumber: '' - transactionType: Paid - meta: - pagination: - totalCount: 1 - offset: 0 - limit: 100 - message: SUCCESS - operationId: get-receipt-lines - description: 'Get all receipt lines, with pagination data' - security: - - authToken: [] - parameters: - - $ref: '#/components/parameters/offset' - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/orderBy' - - $ref: '#/components/parameters/paymentStatus[]' - - $ref: '#/components/parameters/sortBy' - - schema: - type: string - in: query - name: q - description: 'Keyword queries are performed on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy"' - - $ref: '#/components/parameters/searchBy' - - schema: - type: integer - in: query - name: invoiceId - description: The unique id of invoice - x-internal: true - '/receipts/{receiptId}/lines': - parameters: - - schema: - type: string - name: receiptId - in: path - required: true - description: The unique id of receipt - get: - summary: Get lines of a receipt - tags: [] - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - code: - type: number - data: - type: array - items: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/receipt_line.yaml - meta: - type: object - properties: - message: - type: string - pagination: - type: object - properties: - offset: - type: integer - limit: - type: integer - totalCount: - type: integer - 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 - operationId: get-receipts-receiptId-lines - description: 'Get lines of a receipt, with pagination data' - security: - - authToken: [] - parameters: - - $ref: '#/components/parameters/offset' - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/orderBy' - - $ref: '#/components/parameters/paymentStatus[]' - - $ref: '#/components/parameters/sortBy' - - schema: - type: string - in: query - name: q - description: 'Keyword queries are performed on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy"' - - $ref: '#/components/parameters/searchBy' - x-internal: true - '/receipt-lines/{receiptLineId}': - parameters: - - schema: - type: string - name: receiptLineId - in: path - required: true - description: The unique id of receipt line - get: - summary: Get a receipt line detail - tags: [] - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - code: - type: number - data: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/receipt_line.yaml - meta: - type: object - properties: - message: - type: string - examples: - example-1: - value: - code: 200 - data: - id: 4 - createdAt: 1624258432 - updatedAt: 1624258432 - storeHash: byxn6vsd2k - customerId: '1' - externalId: '' - externalCustomerId: '' - receiptId: 4 - invoiceId: 26 - amount: - code: USD - value: '10.0000' - paymentStatus: 3 - paymentType: visa ending in 1111 - invoiceNumber: '00000026' - paymentId: 15 - referenceNumber: '' - transactionType: Paid - meta: - message: SUCCESS - operationId: get-receipts-receiptId-lines-receiptLineId - security: - - authToken: [] - description: Get a receipt line detail - x-internal: true -x-internal: true +openapi: 3.0.1 +info: + title: Receipt + description: BigCommerce B2B Edition Invoice Receipt + contact: {} + version: v3 +servers: + - url: 'https://api-b2b.bigcommerce.com/api/v2/ip/storefront' +security: + - authToken: [] +tags: + - name: Receipt + description: Receipt +components: + securitySchemes: + authToken: + name: authToken + type: apiKey + in: header + parameters: + offset: + name: offset + in: query + required: false + schema: + type: integer + minimum: 0 + description: 'Pagination offset default: 0' + limit: + name: limit + in: query + required: false + schema: + type: integer + default: 10 + minimum: 1 + maximum: 250 + description: 'Pagination limit default: 10' + orderBy: + name: orderBy + in: query + required: false + schema: + type: string + default: DESC + enum: + - DESC + - ASC + description: 'Allow: ''DESC'', ''ASC''' + 'paymentStatus[]': + name: 'paymentStatus[]' + in: query + required: false + schema: + type: string + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + 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' + searchBy: + name: searchBy + in: query + required: false + schema: + type: string + enum: + - payerName + - referenceNumber + - customerId + - externalId + description: The response search by which field + sortBy: + name: sortBy + in: query + required: false + schema: + type: string + default: createdAt + enum: + - createdAt + - updatedAt + description: The response sorted by which field +paths: + /receipts: + get: + summary: Get receipts + tags: [] + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + description: Response code of success request + data: + type: array + items: + $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/receipt.yaml + meta: + type: object + properties: + message: + type: string + description: Response message of success request + pagination: + type: object + properties: + offset: + type: integer + description: 'Pagination offset default: 0' + limit: + type: integer + description: 'Pagination limit default: 10' + totalCount: + type: integer + description: Total count of the receipts + 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: '' + 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-receipts + description: 'Get receipts, with pagination data' + security: + - authToken: [] + parameters: + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/orderBy' + - $ref: '#/components/parameters/paymentStatus[]' + - $ref: '#/components/parameters/sortBy' + - schema: + type: string + in: query + name: q + description: 'Keyword queries are performed on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy"' + - $ref: '#/components/parameters/searchBy' + x-internal: true + '/receipts/{receiptId}': + parameters: + - schema: + type: string + name: receiptId + in: path + required: true + description: The unique id of receipt + get: + summary: Get a receipt + tags: [] + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + description: Response code of success request + data: + $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/receipt.yaml + meta: + type: object + properties: + message: + type: string + description: Response message of request + 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 + operationId: get-receipts-receiptId + description: Get a receipt detail + security: + - authToken: [] + x-internal: true + /receipt-lines: + get: + summary: Get all receipt lines + tags: [] + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + data: + type: array + items: + $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/receipt_line.yaml + meta: + type: object + properties: + message: + type: string + pagination: + type: object + properties: + offset: + type: integer + limit: + type: integer + totalCount: + type: integer + examples: + example-1: + value: + code: 200 + data: + - id: 4 + createdAt: 1624258432 + updatedAt: 1624258432 + storeHash: byxn6vsd2k + customerId: '1' + externalId: '' + externalCustomerId: '' + receiptId: 4 + invoiceId: 26 + amount: + code: USD + value: '10.0000' + paymentStatus: 3 + paymentType: visa ending in 1111 + invoiceNumber: '00000026' + paymentId: 15 + referenceNumber: '' + transactionType: Paid + meta: + pagination: + totalCount: 1 + offset: 0 + limit: 100 + message: SUCCESS + operationId: get-receipt-lines + description: 'Get all receipt lines, with pagination data' + security: + - authToken: [] + parameters: + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/orderBy' + - $ref: '#/components/parameters/paymentStatus[]' + - $ref: '#/components/parameters/sortBy' + - schema: + type: string + in: query + name: q + description: 'Keyword queries are performed on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy"' + - $ref: '#/components/parameters/searchBy' + - schema: + type: integer + in: query + name: invoiceId + description: The unique id of invoice + x-internal: true + '/receipts/{receiptId}/lines': + parameters: + - schema: + type: string + name: receiptId + in: path + required: true + description: The unique id of receipt + get: + summary: Get lines of a receipt + tags: [] + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + data: + type: array + items: + $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/receipt_line.yaml + meta: + type: object + properties: + message: + type: string + pagination: + type: object + properties: + offset: + type: integer + limit: + type: integer + totalCount: + type: integer + 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 + operationId: get-receipts-receiptId-lines + description: 'Get lines of a receipt, with pagination data' + security: + - authToken: [] + parameters: + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/orderBy' + - $ref: '#/components/parameters/paymentStatus[]' + - $ref: '#/components/parameters/sortBy' + - schema: + type: string + in: query + name: q + description: 'Keyword queries are performed on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy"' + - $ref: '#/components/parameters/searchBy' + x-internal: true + '/receipt-lines/{receiptLineId}': + parameters: + - schema: + type: string + name: receiptLineId + in: path + required: true + description: The unique id of receipt line + get: + summary: Get a receipt line detail + tags: [] + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + data: + $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/invoice_portal/receipt_line.yaml + meta: + type: object + properties: + message: + type: string + examples: + example-1: + value: + code: 200 + data: + id: 4 + createdAt: 1624258432 + updatedAt: 1624258432 + storeHash: byxn6vsd2k + customerId: '1' + externalId: '' + externalCustomerId: '' + receiptId: 4 + invoiceId: 26 + amount: + code: USD + value: '10.0000' + paymentStatus: 3 + paymentType: visa ending in 1111 + invoiceNumber: '00000026' + paymentId: 15 + referenceNumber: '' + transactionType: Paid + meta: + message: SUCCESS + operationId: get-receipts-receiptId-lines-receiptLineId + security: + - authToken: [] + description: Get a receipt line detail + x-internal: true +x-internal: true diff --git a/docs/start/migration/1-2_setup.md b/docs/start/migration/1-2_setup.md index d8b2106c8..e24c4eed5 100644 --- a/docs/start/migration/1-2_setup.md +++ b/docs/start/migration/1-2_setup.md @@ -1,175 +1,175 @@ ---- -title: Prepare Your Migration Data -keywords: bigcommerce migration, product data import, category mapping, data transformation, api data migration, product variants, ecommerce data prep, csv import, product images migration, custom fields, taxonomy mapping, product schema, data validation, storefront visibility, bulk product upload ---- - -## Prepare Your Migration Data - -While some systems may allow a direct or near-direct connection between your current store and BigCommerce, using such a connection will likely cause unforeseen errors. For best results, some preparation will help reduce migration time and roadblocks. - -### Identify Source Data - - -If your primary data source is an ERP, product CMS, or other external system (not your ecommerce platform), proceed directly to [Create a Data Mapping](#create-a-data-mapping). - - -Export all data from your current platform. This will look different for all ecommerce solutions, so refer to your documentation for specific steps. - -* For best results, use either a spreadsheet (`CSV` format is sufficient) or a SQL database if possible to ensure straightforward data mapping. -* Carefully review headers and data for accuracy and completeness after export. This will provide a higher level of familiarity with the data, informing next steps when mapping from your current data to BigCommerce. - -Review the following BigCommerce API resources before starting your migration: - -* [Catalog API](https://developer.bigcommerce.com/docs/rest-catalog) - the family of endpoints related to adding, updating, and deleting products and product data. -* [API Best Practices](https://developer.bigcommerce.com/docs/start/best-practices) - information on recommended usage. -* [API Rate Limits](https://developer.bigcommerce.com/docs/start/best-practices/api-rate-limits) - information on platform limits that will affect your migration. - - -Some Catalog API endpoints have limitations beyond those outlined in our broadly documented rate limits. - -To avoid potential issues and errors, verify each endpoint’s limitations prior to your active migration. - - - -Some special characters may cause inaccuracies in export data or the import process. If you're using CSV for data export, ensure your file is encoded using UTF-8 characters. - - -Before migration, remove any data you don’t want transferred to BigCommerce. Filtering this data before migration reduces complexity and saves time. - -* Document the filtering criteria and back up any removed data. This minimizes the risk of accidental data loss and ensures you can replicate the process for future syncs. -* Examples of products that may need to be excluded: disabled, permanently out-of-stock, and products that don’t easily map to BigCommerce automatically. - -### Create a Mapping Plan - - -Ensure you understand the BigCommerce product schema and taxonomy before mapping your data. - - -Some BigCommerce fields may map differently than in your current system, especially for large catalogs or simpler data models. - -* The following fields are required for [product creation](https://developer.bigcommerce.com/docs/rest-catalog/products#create-a-product): - * Name - the name of the product as displayed on the storefront - * Type - whether the product is physical or digital - * Weight - the shipping weight of the product (set to `0` for digital products) - * Price - the base price of the product in the store’s default currency -* The following product fields are read-only, unavailable for direct editing: - * ID - the server-assigned product ID used in all automated BigCommerce operations - * Date Created - the timestamp saved when the product was created in BigCommerce, regardless of the method used - * Date Modified - the timestamp saved during the most recent product update - * Calculated Price - the price of the product once set adjustments are applied based on options and other features - * Base Variant ID - the server-assigned variant ID treated as default for the product - -Some data fields will likely function differently in BigCommerce than in your current ecommerce solution or source of truth. A few examples include - -* [**Custom Fields**](https://developer.bigcommerce.com/docs/rest-catalog/products/custom-fields) - * In BigCommerce, custom fields serve as static filterable data for products. - * Each custom field requires a field name and a specific value, both of which are text information. - * Custom fields are displayed by default. Data not intended to display should be implemented with [Metafields](https://developer.bigcommerce.com/docs/rest-catalog/products/metafields) instead. - * Some unstructured data such as notes, extra attributes, and non-native fields will need to be transformed into either custom fields or metafields prior to migration if they are to be preserved in BigCommerce. -* **Related Products** - * Related products are assigned to a given product by product ID - * Explicitly setting products as related requires direct assignment of IDs -* [**URLs and 301 Redirects**](https://developer.bigcommerce.com/docs/rest-management/redirects) - * By default, BigCommerce creates [SEO Optimized, short](https://support.bigcommerce.com/s/article/Store-Settings?language=en_US#url-structure) URLs for new products and categories. - * If you prefer to maintain your existing URLs, you can migrate them directly using the `custom_url` field during product creation. -* Price Mapping - * BigCommerce supports several distinct price fields, which may differ from your current source of truth: - * Price - the price you normally charge for a single unit of the product - * Retail Price - the product’s manufacturer suggested retail price - * Map Price - the minimum advertised price of the product - * Sale Price - the price you are charging for the product while it’s on sale - * Cost Price - the price required for keeping a single unit of the product in stock - * Calculated Price - the price of the product once set adjustments are applied based on options and other features - * Carefully analyze your product pricing fields prior to migration to ensure correct mapping. - -#### Field Mapping Reference - -Product options and channel assignments are not managed in the main products API. - -* To assign channels, use [Channel Assignments](https://developer.bigcommerce.com/docs/rest-catalog/products/channel-assignments). -* For information on product options, see [Product Modifiers](https://developer.bigcommerce.com/docs/rest-catalog/product-modifiers), [Product Variants](https://developer.bigcommerce.com/docs/rest-catalog/product-variants), and [Product Variant Options](https://developer.bigcommerce.com/docs/rest-catalog/product-variant-options). - -A list of the most commonly needed fields is provided in the following table. - - -Some fields in the list below are required to be unique. For complete information on unique fields, refer to the Catalog API specification. - - -| Field Name | API Field Identifier | Data Type | Description | -| :---- | :---- | :---- | :---- | -| Name (required) | `name` | `string` | The name of the product, as displayed on the storefront. | -| Type (required) | `type` | `string` | The type of the product, either `"physical"` or `"digital"`. | -| SKU | `sku` | `string` | The stock keeping unit. Only accepts numbers, letters, hyphens, underscores, and spaces. | -| Description | `description` | `string` | The product description as shown on product detail pages. | -| Weight (required) | `weight` | `number` | The shipping weight of the product, in the units configured in your store settings. | -| Width | `width` | `number` | The shipping width of the product, in the units configured in your store settings. | -| Depth | `depth` | `number` | The shipping depth of the product, in the units configured in your store settings. | -| Height | `height` | `number` | The shipping height of the product, in the units configured in your store settings. | -| Price (required) | `price` | `number` | The product’s default price, provided in the store’s default currency, with taxes included or excluded based on your store settings. | -| Cost Price | `cost_price` | `number` | The product’s cost price, provided in the store’s default currency. | -| Retail Price | `retail_price` | `number` | The manufacturer suggested retail price, provided in the store’s default currency, with taxes included or excluded based on your store settings. | -| Sale Price | `sale_price` | `number` | The product’s current sale price, provided in the store’s default currency, with taxes included or excluded based on your store settings. | -| Tax Class | `tax_class_id` | `integer` | The ID of the tax class assigned to the product. Tax classes are configured in your store settings. If you’re using an automated tax provider, you may also need the `product_tax_code`. | -| Categories | `categories` | `array` | An array of the category IDs to which the product is assigned. | -| Brand ID | `brand_id` | `integer` | The brand to which the product is assigned. | -| Current Stock | `inventory_level` | `integer` | The current number of product units in stock, if tracked. | -| Low Stock | `inventory_warning_level` | `integer` | The stock level at which restocking becomes necessary. | -| Inventory Tracking | `inventory_tracking` | `string` | One of `"product"`, `"variant"`, or `"none"`, indicating how or if inventory is tracked on the product. | -| Fixed Shipping Cost | `fixed_cost_shipping_price` | `number` | The per-unit shipping cost, if the product uses it. Set to `0` if the feature is not used. | -| Free Shipping | `is_free_shipping` | `boolean` | Indicates whether the product is excluded from other shipping calculations. If `true` the product will ship for free and be excluded from other calculations unless your shipping settings explicitly ignore this field. | -| Is Visible | `is_visible` | `boolean` | Indicates whether the product is visible on the storefront. If `false`, the product will be inaccessible, even if it is assigned to a specific channel. | -| Is Featured | `is_featured` | `boolean` | Indicates whether the product will be included in the Featured Products section on your storefront. | -| Warranty | `warranty` | `string` | Warranty terms and conditions to be displayed on the product detail page. If no warranty is provided, the section will not display by default. | -| Bin Picking Number | `bin_picking_number` | `string` | The bin picking number used in a fulfillment workflow. If you don’t use bin picking as a fulfillment process, this may be omitted. | -| UPC/EAN | `upc` | `string` | The UPC or other related product identifier. | -| Search Keywords | `search_keywords` | `string` | Comma separated search keywords that can be used by the built-in BigCommerce storefront search to find the product. This field may be ineffective if you’re using a [headless commerce solution](https://developer.bigcommerce.com/docs/storefront/headless) or a custom search tool. | -| Sort Order | `sort_order` | `integer` | A 32-bit integer indicating the product’s relative position on product listing pages when the Featured sort option is selected. Negative values place the product closer to the front, while positive values place the product closer to the back. | -| Product Condition | `condition` | `string` | One of `"New"`, `"Used"`, or `"Refurbished"`, indicating the condition of the product | -| Show Product Condition | `is_condition_shown` | `boolean` | Indicates whether the product condition is displayed on the storefront. | -| Page Title | `page_title` | `string` | The SEO title for the product detail page. | -| Meta Keywords | `meta_keywords` | `array` | An array of SEO keywords used for page ranking on some search engines. | -| Meta Description | `meta_description` | `string` | The SEO description for the product detail page. | -| Product URL | `custom_url` | `object` | An object indicating the state of the product’s custom URL and whether a redirect is necessary. | -| Global Trade Number | `gtin` | `string` | The [Global Trade Item Number](https://www.gs1us.org/upcs-barcodes-prefixes/what-is-a-gtin) of the product used by some sales channels for proper tracking and identification. | -| Manufacturer Part Number | `mpn` | `string` | The manufacturer part number of the product, used to guarantee that customers are viewing the correct item. | -| [Custom Fields](https://support.bigcommerce.com/s/article/Custom-Fields) | `custom_fields` | `array` | An array of objects that include the `name` and `value` of each custom field associated with the object. | -| [Images](https://developer.bigcommerce.com/docs/rest-catalog/products/images) | `images` | `array` | An array of objects containing image data. | -| [Videos](https://developer.bigcommerce.com/docs/rest-catalog/products/videos) | `videos` | `array` | An array of objects containing video data. | -| Variants | `variants` | `array` | An array of objects containing variant data. | -| [Bulk Pricing](https://developer.bigcommerce.com/docs/rest-catalog/products/bulk-pricing-rules) | `bulk_pricing_rules` | `array` | An array of objects containing bulk pricing data. | -| Related Products | `related_products` | `array` | An array of numeric product IDs for related products. | - -### FAQ -1. **What are the most efficient ways to export product data from my legacy store for migration into BigCommerce?** - -Use your source platform’s native export tools to generate CSV or SQL files, or leverage its API if available for direct data extraction. Choose the format that best matches your mapping and transformation needs. Always verify data accuracy post-export. - -2. **How do I map complex or custom product fields from my source system to BigCommerce’s schema?** - -Identify all custom fields in your source data and review BigCommerce’s [custom fields](https://developer.bigcommerce.com/docs/rest-catalog/products/custom-fields) and [metafields](https://developer.bigcommerce.com/docs/rest-catalog/products/metafields). Map each source field to the most appropriate BigCommerce field, transforming formats or structures as needed. Document your mappings for consistency. - -3. **What is the best way to handle images and digital assets during product migration?** - -Ensure all product images and files are organized and accessible, with URLs or file names correctly referenced in your data. Upload images via the BigCommerce API or through bulk import features, and validate that each product record correctly links to its images after migration. - -4. **How do I handle product variants, options, or bundles when the source and target systems structure them differently?** - -Analyze how your source platform represents variants, options, and bundles. In BigCommerce, use the [variants](https://developer.bigcommerce.com/docs/rest-catalog/product-variants), [modifiers](https://developer.bigcommerce.com/docs/rest-catalog/product-modifiers), and related APIs to recreate these relationships. - -5. **How should I document and track my data mapping and transformation rules for future reference or audits?** - -Maintain a mapping spreadsheet or document that clearly records each source field, its transformation logic, and the target BigCommerce field. Include examples and version your mapping documentation to track changes over time. - -6. **What are common issues encountered during product data migration to BigCommerce, and how can I troubleshoot them?** - -Common issues include data validation errors, missing required fields, mismatched categories, or broken image links. - -Troubleshoot by reviewing error logs, running validation scripts pre-import, and performing test imports with small data batches to catch issues early. - -7. **How do I ensure SEO continuity, including URLs and redirects, during migration?** - -Map your legacy URLs to BigCommerce’s structure using the `custom_url` field for products and categories. Set up 301 redirects for any changed URLs using the [Redirects API](https://developer.bigcommerce.com/docs/rest-management/redirects) or admin tools to preserve SEO rankings and avoid broken links. -### Resources -- [BigCommerce Catalog API Documentation](https://developer.bigcommerce.com/docs/rest-catalog) — Reference for all endpoints related to product data -- [API Best Practices](https://developer.bigcommerce.com/docs/start/best-practices) — Recommended approaches for robust API use -- [API Rate Limits](https://developer.bigcommerce.com/docs/start/best-practices/api-rate-limits) — How to avoid and handle API rate limiting +--- +title: Prepare Your Migration Data +keywords: bigcommerce migration, product data import, category mapping, data transformation, api data migration, product variants, ecommerce data prep, csv import, product images migration, custom fields, taxonomy mapping, product schema, data validation, storefront visibility, bulk product upload +--- + +## Prepare Your Migration Data + +While some systems may allow a direct or near-direct connection between your current store and BigCommerce, using such a connection will likely cause unforeseen errors. For best results, some preparation will help reduce migration time and roadblocks. + +### Identify Source Data + + +If your primary data source is an ERP, product CMS, or other external system (not your ecommerce platform), proceed directly to [Create a Data Mapping](#create-a-data-mapping). + + +Export all data from your current platform. This will look different for all ecommerce solutions, so refer to your documentation for specific steps. + +* For best results, use either a spreadsheet (`CSV` format is sufficient) or a SQL database if possible to ensure straightforward data mapping. +* Carefully review headers and data for accuracy and completeness after export. This will provide a higher level of familiarity with the data, informing next steps when mapping from your current data to BigCommerce. + +Review the following BigCommerce API resources before starting your migration: + +* [Catalog API](https://developer.bigcommerce.com/docs/rest-catalog) - the family of endpoints related to adding, updating, and deleting products and product data. +* [API Best Practices](https://developer.bigcommerce.com/docs/start/best-practices) - information on recommended usage. +* [API Rate Limits](https://developer.bigcommerce.com/docs/start/best-practices/api-rate-limits) - information on platform limits that will affect your migration. + + +Some Catalog API endpoints have limitations beyond those outlined in our broadly documented rate limits. + +To avoid potential issues and errors, verify each endpoint’s limitations prior to your active migration. + + + +Some special characters may cause inaccuracies in export data or the import process. If you're using CSV for data export, ensure your file is encoded using UTF-8 characters. + + +Before migration, remove any data you don’t want transferred to BigCommerce. Filtering this data before migration reduces complexity and saves time. + +* Document the filtering criteria and back up any removed data. This minimizes the risk of accidental data loss and ensures you can replicate the process for future syncs. +* Examples of products that may need to be excluded: disabled, permanently out-of-stock, and products that don’t easily map to BigCommerce automatically. + +### Create a Mapping Plan + + +Ensure you understand the BigCommerce product schema and taxonomy before mapping your data. + + +Some BigCommerce fields may map differently than in your current system, especially for large catalogs or simpler data models. + +* The following fields are required for [product creation](https://developer.bigcommerce.com/docs/rest-catalog/products#create-a-product): + * Name - the name of the product as displayed on the storefront + * Type - whether the product is physical or digital + * Weight - the shipping weight of the product (set to `0` for digital products) + * Price - the base price of the product in the store’s default currency +* The following product fields are read-only, unavailable for direct editing: + * ID - the server-assigned product ID used in all automated BigCommerce operations + * Date Created - the timestamp saved when the product was created in BigCommerce, regardless of the method used + * Date Modified - the timestamp saved during the most recent product update + * Calculated Price - the price of the product once set adjustments are applied based on options and other features + * Base Variant ID - the server-assigned variant ID treated as default for the product + +Some data fields will likely function differently in BigCommerce than in your current ecommerce solution or source of truth. A few examples include + +* [**Custom Fields**](https://developer.bigcommerce.com/docs/rest-catalog/products/custom-fields) + * In BigCommerce, custom fields serve as static filterable data for products. + * Each custom field requires a field name and a specific value, both of which are text information. + * Custom fields are displayed by default. Data not intended to display should be implemented with [Metafields](https://developer.bigcommerce.com/docs/rest-catalog/products/metafields) instead. + * Some unstructured data such as notes, extra attributes, and non-native fields will need to be transformed into either custom fields or metafields prior to migration if they are to be preserved in BigCommerce. +* **Related Products** + * Related products are assigned to a given product by product ID + * Explicitly setting products as related requires direct assignment of IDs +* [**URLs and 301 Redirects**](https://developer.bigcommerce.com/docs/rest-management/redirects) + * By default, BigCommerce creates [SEO Optimized, short](https://support.bigcommerce.com/s/article/Store-Settings?language=en_US#url-structure) URLs for new products and categories. + * If you prefer to maintain your existing URLs, you can migrate them directly using the `custom_url` field during product creation. +* Price Mapping + * BigCommerce supports several distinct price fields, which may differ from your current source of truth: + * Price - the price you normally charge for a single unit of the product + * Retail Price - the product’s manufacturer suggested retail price + * Map Price - the minimum advertised price of the product + * Sale Price - the price you are charging for the product while it’s on sale + * Cost Price - the price required for keeping a single unit of the product in stock + * Calculated Price - the price of the product once set adjustments are applied based on options and other features + * Carefully analyze your product pricing fields prior to migration to ensure correct mapping. + +#### Field Mapping Reference + +Product options and channel assignments are not managed in the main products API. + +* To assign channels, use [Channel Assignments](https://developer.bigcommerce.com/docs/rest-catalog/products/channel-assignments). +* For information on product options, see [Product Modifiers](https://developer.bigcommerce.com/docs/rest-catalog/product-modifiers), [Product Variants](https://developer.bigcommerce.com/docs/rest-catalog/product-variants), and [Product Variant Options](https://developer.bigcommerce.com/docs/rest-catalog/product-variant-options). + +A list of the most commonly needed fields is provided in the following table. + + +Some fields in the list below are required to be unique. For complete information on unique fields, refer to the Catalog API specification. + + +| Field Name | API Field Identifier | Data Type | Description | +| :---- | :---- | :---- | :---- | +| Name (required) | `name` | `string` | The name of the product, as displayed on the storefront. | +| Type (required) | `type` | `string` | The type of the product, either `"physical"` or `"digital"`. | +| SKU | `sku` | `string` | The stock keeping unit. Only accepts numbers, letters, hyphens, underscores, and spaces. | +| Description | `description` | `string` | The product description as shown on product detail pages. | +| Weight (required) | `weight` | `number` | The shipping weight of the product, in the units configured in your store settings. | +| Width | `width` | `number` | The shipping width of the product, in the units configured in your store settings. | +| Depth | `depth` | `number` | The shipping depth of the product, in the units configured in your store settings. | +| Height | `height` | `number` | The shipping height of the product, in the units configured in your store settings. | +| Price (required) | `price` | `number` | The product’s default price, provided in the store’s default currency, with taxes included or excluded based on your store settings. | +| Cost Price | `cost_price` | `number` | The product’s cost price, provided in the store’s default currency. | +| Retail Price | `retail_price` | `number` | The manufacturer suggested retail price, provided in the store’s default currency, with taxes included or excluded based on your store settings. | +| Sale Price | `sale_price` | `number` | The product’s current sale price, provided in the store’s default currency, with taxes included or excluded based on your store settings. | +| Tax Class | `tax_class_id` | `integer` | The ID of the tax class assigned to the product. Tax classes are configured in your store settings. If you’re using an automated tax provider, you may also need the `product_tax_code`. | +| Categories | `categories` | `array` | An array of the category IDs to which the product is assigned. | +| Brand ID | `brand_id` | `integer` | The brand to which the product is assigned. | +| Current Stock | `inventory_level` | `integer` | The current number of product units in stock, if tracked. | +| Low Stock | `inventory_warning_level` | `integer` | The stock level at which restocking becomes necessary. | +| Inventory Tracking | `inventory_tracking` | `string` | One of `"product"`, `"variant"`, or `"none"`, indicating how or if inventory is tracked on the product. | +| Fixed Shipping Cost | `fixed_cost_shipping_price` | `number` | The per-unit shipping cost, if the product uses it. Set to `0` if the feature is not used. | +| Free Shipping | `is_free_shipping` | `boolean` | Indicates whether the product is excluded from other shipping calculations. If `true` the product will ship for free and be excluded from other calculations unless your shipping settings explicitly ignore this field. | +| Is Visible | `is_visible` | `boolean` | Indicates whether the product is visible on the storefront. If `false`, the product will be inaccessible, even if it is assigned to a specific channel. | +| Is Featured | `is_featured` | `boolean` | Indicates whether the product will be included in the Featured Products section on your storefront. | +| Warranty | `warranty` | `string` | Warranty terms and conditions to be displayed on the product detail page. If no warranty is provided, the section will not display by default. | +| Bin Picking Number | `bin_picking_number` | `string` | The bin picking number used in a fulfillment workflow. If you don’t use bin picking as a fulfillment process, this may be omitted. | +| UPC/EAN | `upc` | `string` | The UPC or other related product identifier. | +| Search Keywords | `search_keywords` | `string` | Comma separated search keywords that can be used by the built-in BigCommerce storefront search to find the product. This field may be ineffective if you’re using a [headless commerce solution](https://developer.bigcommerce.com/docs/storefront/headless) or a custom search tool. | +| Sort Order | `sort_order` | `integer` | A 32-bit integer indicating the product’s relative position on product listing pages when the Featured sort option is selected. Negative values place the product closer to the front, while positive values place the product closer to the back. | +| Product Condition | `condition` | `string` | One of `"New"`, `"Used"`, or `"Refurbished"`, indicating the condition of the product | +| Show Product Condition | `is_condition_shown` | `boolean` | Indicates whether the product condition is displayed on the storefront. | +| Page Title | `page_title` | `string` | The SEO title for the product detail page. | +| Meta Keywords | `meta_keywords` | `array` | An array of SEO keywords used for page ranking on some search engines. | +| Meta Description | `meta_description` | `string` | The SEO description for the product detail page. | +| Product URL | `custom_url` | `object` | An object indicating the state of the product’s custom URL and whether a redirect is necessary. | +| Global Trade Number | `gtin` | `string` | The [Global Trade Item Number](https://www.gs1us.org/upcs-barcodes-prefixes/what-is-a-gtin) of the product used by some sales channels for proper tracking and identification. | +| Manufacturer Part Number | `mpn` | `string` | The manufacturer part number of the product, used to guarantee that customers are viewing the correct item. | +| [Custom Fields](https://support.bigcommerce.com/s/article/Custom-Fields) | `custom_fields` | `array` | An array of objects that include the `name` and `value` of each custom field associated with the object. | +| [Images](https://developer.bigcommerce.com/docs/rest-catalog/products/images) | `images` | `array` | An array of objects containing image data. | +| [Videos](https://developer.bigcommerce.com/docs/rest-catalog/products/videos) | `videos` | `array` | An array of objects containing video data. | +| Variants | `variants` | `array` | An array of objects containing variant data. | +| [Bulk Pricing](https://developer.bigcommerce.com/docs/rest-catalog/products/bulk-pricing-rules) | `bulk_pricing_rules` | `array` | An array of objects containing bulk pricing data. | +| Related Products | `related_products` | `array` | An array of numeric product IDs for related products. | + +### FAQ +1. **What are the most efficient ways to export product data from my legacy store for migration into BigCommerce?** + +Use your source platform’s native export tools to generate CSV or SQL files, or leverage its API if available for direct data extraction. Choose the format that best matches your mapping and transformation needs. Always verify data accuracy post-export. + +2. **How do I map complex or custom product fields from my source system to BigCommerce’s schema?** + +Identify all custom fields in your source data and review BigCommerce’s [custom fields](https://developer.bigcommerce.com/docs/rest-catalog/products/custom-fields) and [metafields](https://developer.bigcommerce.com/docs/rest-catalog/products/metafields). Map each source field to the most appropriate BigCommerce field, transforming formats or structures as needed. Document your mappings for consistency. + +3. **What is the best way to handle images and digital assets during product migration?** + +Ensure all product images and files are organized and accessible, with URLs or file names correctly referenced in your data. Upload images via the BigCommerce API or through bulk import features, and validate that each product record correctly links to its images after migration. + +4. **How do I handle product variants, options, or bundles when the source and target systems structure them differently?** + +Analyze how your source platform represents variants, options, and bundles. In BigCommerce, use the [variants](https://developer.bigcommerce.com/docs/rest-catalog/product-variants), [modifiers](https://developer.bigcommerce.com/docs/rest-catalog/product-modifiers), and related APIs to recreate these relationships. + +5. **How should I document and track my data mapping and transformation rules for future reference or audits?** + +Maintain a mapping spreadsheet or document that clearly records each source field, its transformation logic, and the target BigCommerce field. Include examples and version your mapping documentation to track changes over time. + +6. **What are common issues encountered during product data migration to BigCommerce, and how can I troubleshoot them?** + +Common issues include data validation errors, missing required fields, mismatched categories, or broken image links. + +Troubleshoot by reviewing error logs, running validation scripts pre-import, and performing test imports with small data batches to catch issues early. + +7. **How do I ensure SEO continuity, including URLs and redirects, during migration?** + +Map your legacy URLs to BigCommerce’s structure using the `custom_url` field for products and categories. Set up 301 redirects for any changed URLs using the [Redirects API](https://developer.bigcommerce.com/docs/rest-management/redirects) or admin tools to preserve SEO rankings and avoid broken links. +### Resources +- [BigCommerce Catalog API Documentation](https://developer.bigcommerce.com/docs/rest-catalog) — Reference for all endpoints related to product data +- [API Best Practices](https://developer.bigcommerce.com/docs/start/best-practices) — Recommended approaches for robust API use +- [API Rate Limits](https://developer.bigcommerce.com/docs/start/best-practices/api-rate-limits) — How to avoid and handle API rate limiting diff --git a/docs/start/migration/3_testing.md b/docs/start/migration/3_testing.md index 443604da6..45aee4aeb 100644 --- a/docs/start/migration/3_testing.md +++ b/docs/start/migration/3_testing.md @@ -1,148 +1,148 @@ ---- -title: Test a Limited Dataset -keywords: bigcommerce, data migration, api testing, catalog import, product data, sandbox environment, test automation, edge case validation, data integrity, partial migration, data cleanup, api rate limits, product relationships, scripting, data validation ---- - -## Test a Limited Dataset - -In order to properly prepare data for migration, data validation and testing are essential steps to provide improved efficiency during the full implementation. - -### Prepare a Representative Sample - -Before attempting to load any data, be sure to familiarize yourself with the [BigCommerce API Best Practices and Rate Limits](https://developer.bigcommerce.com/resource-hub/navigating-bigcommerces-api-rate-limits-update). - -To ensure a smooth execution during migration, prepare a subset of your catalog to perform a partial migration as a test. This should be around `50` to `1000` data records, depending on the size and complexity of of your catalog, that cover a broad range of potential product configurations - -If your catalog contains any of the following, ensure that your representative sample contains at least one product with each to test the associated BigCommerce APIs. - -* SKU modifying product options - Product Variants and Product Variant Options -* Non-SKU modifying product options - Product Modifiers -* Static data visible to customers - Custom Fields -* Static data **not** visible to customers - Metafields - -Select a mix of data for testing, intentionally including records with inconsistencies, missing fields, edge-case values, or legacy formatting, as these samples are most likely to surface real-world migration issues. - - -If you haven't yet, configure your complete category tree and brands prior to loading your representative sample to ensure accurate assignments to each. - - - -Understand that BigCommerce handles data deletion and archiving differently. [Products](https://developer.bigcommerce.com/docs/rest-catalog/products) and [Customers](https://developer.bigcommerce.com/docs/rest-management/customers) can be deleted, but [Orders](https://developer.bigcommerce.com/docs/rest-management/orders) can only be archived. - -As incorrect order migration can directly impact billing, it is imperative to fully understand these distinctions and their migration implications. - -Conduct all initial data migration tests in a sandbox environment if possible. - - -Once you've identified a representative sample, begin the partial migration. - -If you use Postman as your primary API client, you can use the [BigCommerce V3 API library](https://www.postman.com/api-evangelist/bigcommerce/documentation/37xvhum/bigcommerce-api-v3). - - -1. Create one or more API accounts with [appropriate scopes](https://developer.bigcommerce.com/docs/start/authentication/api-accounts#oauth-scopes) to make requests to the Catalog API. - * Product creation requires API authentication keys to ensure secure data management. -2. Create base products. - * Use the "Create a Product" endpoint to establish individual product records, making sure to associate the product ID with your representative dataset. - * For optimal error handling during large-scale operations, the best practice is to create individual products rather than using batch creation, even though it is supported. - * Product variants created simultaneously with the base product will default to display as rectangle lists. For more information on variant display options, see [Variants and Modifiers (Help Center)](https://support.bigcommerce.com/s/article/Variants-and-Modifiers). -3. After base product creation, add additional attributes, images, and other data. - * While some data may be loaded simultaneously with the base product, performing the operation in multiple steps ensures clear error logging and a more consistent product creation experience. - -Each Catalog API endpoint’s specification is accompanied by one or more example request bodies to clarify format and structure. For more information, review the [Catalog API Reference](https://developer.bigcommerce.com/docs/rest-catalog). - -### Performing Data Validation and User Acceptance Testing (UAT) - -Given potential datatype mismatches and platform limitations, data validation is a key step in ensuring a successful migration. After migrating your representative dataset, you should - -* Manually verify a small subset of records against your source of truth to catch any discrepancies; and -* Automate data validation by retrieving migrated data using the `Get All Products` endpoint and comparing it programmatically to your source dataset. - -By combining manual and automated validation methods, you ensure that your data is complete, accurate, mapped as intended, and behaves as expected. - -* Consider using [jsonschema](https://pypi.org/project/jsonschema/) (Python) or [deep-diff](https://www.npmjs.com/package/deep-diff) (Node.js) for schema validation and record comparison. -* Leverage CSV/JSON diff tools to automate dataset checks. Some such applications include the following: - * [json-diff](https://github.com/andreyvit/json-diff): A widely-used command-line tool and library for comparing JSON files, highlights structural and value differences. - * [csvdiff](https://pypi.org/project/csvdiff/): A Python library and CLI tool that compares CSV files and highlights row and cell-level differences for tabular data. - * [daff](https://github.com/paulfitz/daff): A versatile data diff tool supporting CSV/TSV formats, available as a command-line tool and with a web interface, ideal for comparing tables and spreadsheets. - -#### User Acceptance Testing Resource Checklist - -Once you’ve finished data validation on your sample dataset, user acceptance testing (UAT) is critical. This step ensures your data migration mapping is accurate and functions as expected in both the BigCommerce control panel and storefront. - -As part of the UAT process, review the following product fields and storefront behaviors: - -| Field/Area | What to Review | -| :---- | :---- | -| **Product Name and SKU** | Ensure product names and SKUs are accurate and mapped correctly. | -| **Product Prices** | Confirm product, MSRP, and sale prices are correct in the control panel and storefront. Check price change rules if applicable. | -| **Product/Variant Visibility** | Verify visibility settings (hidden/visible) and purchasing behavior (purchasable/not purchasable) for both products and variants. | -| **Inventory Tracking** | Check inventory tracking settings and inventory levels for accuracy. | -| **Options & Variants** | Confirm product options, variant SKUs, and option types (swatch, dropdown, etc.) are structured and displayed as intended. | -| **Custom Fields** | Ensure custom fields are present, correctly populated, and that no unwanted fields have been migrated. | -| **Descriptions** | Review product descriptions for correct formatting, including HTML, images, videos, PDFs, and links. Ensure links resolve to the correct BigCommerce URLs. | -| **Images / Videos** | Check that all product and variant images and videos appear properly in both the control panel and storefront. | -| **Metadata** | Review SEO metadata for completeness and correctness. | -| **Product URL Links** | Confirm product URLs are formatted according to your migration and cut-over plan. | -| **Recommended Products** | If used, verify recommended/related products are set up as expected. [See Product Panels documentation](https://support.bigcommerce.com/s/article/Product-Panels?language=en_US#related) | -| **Categories** | Ensure categories are created, named, visible, and assigned to the correct channels or storefronts. | - -Record your findings and any issues in a tracking sheet or ticketing system. Plan for iterative corrections and re-tests as needed before migrating your full catalog. - -### Special Considerations - -To improve the overall migration experience, the following optional steps will allow more flexibility in automation. - -* **Proactively Managing API Traffic** - * During peak platform usage times, the BigCommerce API may return `HTTP 429` responses. Implement rest-and-retry logic to handle rate limiting effectively. - * To reduce the likelihood of `HTTP 429` responses, disable any third-party API applications on your store during migration, as the BigCommerce API does not distinguish between individual clients when managing rate limits on a single store. - - -Be aware of account-level and store-level API quotas (such as product, image, or request limits). Exceeding these can cause partial migrations or silent failures. - - -* **Error Handling and Reporting** - * Implement comprehensive error reporting to track failed resource transfers. - * Save all API requests during testing to aid in building clarity when unexpected outcomes occur. - * Follow error handling guidance based on specific error types. See Error Handling for more information. -* **Pre-Plan for Data Integrity and Availability** - * Begin with a smaller dataset to verify functionality and data quality while limiting API requests and retries in testing. - * External resources that are unavailable via public HTTP requests cannot be fetched via the BigCommerce API. Upload images and other resources via WebDAV, using resource links local to BigCommerce during product creation. - * Ensure your test dataset includes edge cases such as products with maximum/minimum field values, missing optional data, special characters, and legacy formats to reveal potential issues early. - - -After migrating your test data, verify storefront display, search, filtering, checkout, and reporting to ensure all features work as expected. - - -### FAQ - -1. **How can I automate the generation of representative and edge-case test datasets for my catalog?** - -Use scripting languages (such as Python or Node.js) to extract real records from your source system, and programmatically mutate copies to include edge cases (e.g., missing fields, maximum/minimum values, special characters). Consider sampling actual problematic records from production logs or validation failures. - -2. **What are the best practices for scripting API calls to validate data integrity post-migration?** - -Automate GET requests to retrieve migrated data from BigCommerce, then compare the results field-by-field with your source dataset. Log differences and use schema validation to catch datatype or structure mismatches. - -3. **How do I programmatically compare source and destination data for consistency after a partial migration?** - -Export both source and destination datasets as structured data (JSON/CSV), normalize formats, and use diff tools or custom scripts to check for field-level matches and missing/extra records. - -4. **How can I handle and retry failed API requests efficiently when rate limits or transient errors occur during test runs?** - -Implement exponential backoff and retry logic in your scripts for HTTP 429 (rate limit) or 5xx errors, and monitor response headers for rate limit information to throttle requests as needed. - -5. **What is the recommended approach for cleaning up test data (including products, images, and related resources) after validation in a sandbox or production environment?** - -Track IDs of all created test resources during migration, and use API DELETE calls or batch operations to remove them once tests are complete. For production, use clear naming conventions or tagging to identify test data for cleanup. - -### Resources - -- [BigCommerce Catalog API Reference](https://developer.bigcommerce.com/api-reference/store-management/catalog) -- [Handling API Errors](https://developer.bigcommerce.com/resource-hub/handling-errors-in-bigcommerce-apis) -- [API Rate Limits Guide](https://developer.bigcommerce.com/resource-hub/navigating-bigcommerces-api-rate-limits-update) -- [Creating a BigCommerce Sandbox Store](https://developer.bigcommerce.com/docs/start/bigcommerce-sandbox-store) -- [Using Postman with BigCommerce APIs](https://developer.bigcommerce.com/docs/start/api-clients/postman) -- [Community Thread: Data Validation Scripts & Tips](https://community.bigcommerce.com/t5/Developers/Best-ways-to-validate-product-data-before-import/td-p/146590) -- [WebDAV Overview and Usage](https://support.bigcommerce.com/s/article/File-Access-WebDAV) -- [Sample Product Import CSV](https://storage.googleapis.com/bigcommerce-production-dev-center/Knowledge%20Base/Products/Import%20Export%20v3%20Guide/v3-product-import-template.csv) -- [API Accounts and OAuth Scopes](https://developer.bigcommerce.com/docs/start/authentication/api-accounts) +--- +title: Test a Limited Dataset +keywords: bigcommerce, data migration, api testing, catalog import, product data, sandbox environment, test automation, edge case validation, data integrity, partial migration, data cleanup, api rate limits, product relationships, scripting, data validation +--- + +## Test a Limited Dataset + +In order to properly prepare data for migration, data validation and testing are essential steps to provide improved efficiency during the full implementation. + +### Prepare a Representative Sample + +Before attempting to load any data, be sure to familiarize yourself with the [BigCommerce API Best Practices and Rate Limits](https://developer.bigcommerce.com/resource-hub/navigating-bigcommerces-api-rate-limits-update). + +To ensure a smooth execution during migration, prepare a subset of your catalog to perform a partial migration as a test. This should be around `50` to `1000` data records, depending on the size and complexity of of your catalog, that cover a broad range of potential product configurations + +If your catalog contains any of the following, ensure that your representative sample contains at least one product with each to test the associated BigCommerce APIs. + +* SKU modifying product options - Product Variants and Product Variant Options +* Non-SKU modifying product options - Product Modifiers +* Static data visible to customers - Custom Fields +* Static data **not** visible to customers - Metafields + +Select a mix of data for testing, intentionally including records with inconsistencies, missing fields, edge-case values, or legacy formatting, as these samples are most likely to surface real-world migration issues. + + +If you haven't yet, configure your complete category tree and brands prior to loading your representative sample to ensure accurate assignments to each. + + + +Understand that BigCommerce handles data deletion and archiving differently. [Products](https://developer.bigcommerce.com/docs/rest-catalog/products) and [Customers](https://developer.bigcommerce.com/docs/rest-management/customers) can be deleted, but [Orders](https://developer.bigcommerce.com/docs/rest-management/orders) can only be archived. + +As incorrect order migration can directly impact billing, it is imperative to fully understand these distinctions and their migration implications. + +Conduct all initial data migration tests in a sandbox environment if possible. + + +Once you've identified a representative sample, begin the partial migration. + +If you use Postman as your primary API client, you can use the [BigCommerce V3 API library](https://www.postman.com/api-evangelist/bigcommerce/documentation/37xvhum/bigcommerce-api-v3). + + +1. Create one or more API accounts with [appropriate scopes](https://developer.bigcommerce.com/docs/start/authentication/api-accounts#oauth-scopes) to make requests to the Catalog API. + * Product creation requires API authentication keys to ensure secure data management. +2. Create base products. + * Use the "Create a Product" endpoint to establish individual product records, making sure to associate the product ID with your representative dataset. + * For optimal error handling during large-scale operations, the best practice is to create individual products rather than using batch creation, even though it is supported. + * Product variants created simultaneously with the base product will default to display as rectangle lists. For more information on variant display options, see [Variants and Modifiers (Help Center)](https://support.bigcommerce.com/s/article/Variants-and-Modifiers). +3. After base product creation, add additional attributes, images, and other data. + * While some data may be loaded simultaneously with the base product, performing the operation in multiple steps ensures clear error logging and a more consistent product creation experience. + +Each Catalog API endpoint’s specification is accompanied by one or more example request bodies to clarify format and structure. For more information, review the [Catalog API Reference](https://developer.bigcommerce.com/docs/rest-catalog). + +### Performing Data Validation and User Acceptance Testing (UAT) + +Given potential datatype mismatches and platform limitations, data validation is a key step in ensuring a successful migration. After migrating your representative dataset, you should + +* Manually verify a small subset of records against your source of truth to catch any discrepancies; and +* Automate data validation by retrieving migrated data using the `Get All Products` endpoint and comparing it programmatically to your source dataset. + +By combining manual and automated validation methods, you ensure that your data is complete, accurate, mapped as intended, and behaves as expected. + +* Consider using [jsonschema](https://pypi.org/project/jsonschema/) (Python) or [deep-diff](https://www.npmjs.com/package/deep-diff) (Node.js) for schema validation and record comparison. +* Leverage CSV/JSON diff tools to automate dataset checks. Some such applications include the following: + * [json-diff](https://github.com/andreyvit/json-diff): A widely-used command-line tool and library for comparing JSON files, highlights structural and value differences. + * [csvdiff](https://pypi.org/project/csvdiff/): A Python library and CLI tool that compares CSV files and highlights row and cell-level differences for tabular data. + * [daff](https://github.com/paulfitz/daff): A versatile data diff tool supporting CSV/TSV formats, available as a command-line tool and with a web interface, ideal for comparing tables and spreadsheets. + +#### User Acceptance Testing Resource Checklist + +Once you’ve finished data validation on your sample dataset, user acceptance testing (UAT) is critical. This step ensures your data migration mapping is accurate and functions as expected in both the BigCommerce control panel and storefront. + +As part of the UAT process, review the following product fields and storefront behaviors: + +| Field/Area | What to Review | +| :---- | :---- | +| **Product Name and SKU** | Ensure product names and SKUs are accurate and mapped correctly. | +| **Product Prices** | Confirm product, MSRP, and sale prices are correct in the control panel and storefront. Check price change rules if applicable. | +| **Product/Variant Visibility** | Verify visibility settings (hidden/visible) and purchasing behavior (purchasable/not purchasable) for both products and variants. | +| **Inventory Tracking** | Check inventory tracking settings and inventory levels for accuracy. | +| **Options & Variants** | Confirm product options, variant SKUs, and option types (swatch, dropdown, etc.) are structured and displayed as intended. | +| **Custom Fields** | Ensure custom fields are present, correctly populated, and that no unwanted fields have been migrated. | +| **Descriptions** | Review product descriptions for correct formatting, including HTML, images, videos, PDFs, and links. Ensure links resolve to the correct BigCommerce URLs. | +| **Images / Videos** | Check that all product and variant images and videos appear properly in both the control panel and storefront. | +| **Metadata** | Review SEO metadata for completeness and correctness. | +| **Product URL Links** | Confirm product URLs are formatted according to your migration and cut-over plan. | +| **Recommended Products** | If used, verify recommended/related products are set up as expected. [See Product Panels documentation](https://support.bigcommerce.com/s/article/Product-Panels?language=en_US#related) | +| **Categories** | Ensure categories are created, named, visible, and assigned to the correct channels or storefronts. | + +Record your findings and any issues in a tracking sheet or ticketing system. Plan for iterative corrections and re-tests as needed before migrating your full catalog. + +### Special Considerations + +To improve the overall migration experience, the following optional steps will allow more flexibility in automation. + +* **Proactively Managing API Traffic** + * During peak platform usage times, the BigCommerce API may return `HTTP 429` responses. Implement rest-and-retry logic to handle rate limiting effectively. + * To reduce the likelihood of `HTTP 429` responses, disable any third-party API applications on your store during migration, as the BigCommerce API does not distinguish between individual clients when managing rate limits on a single store. + + +Be aware of account-level and store-level API quotas (such as product, image, or request limits). Exceeding these can cause partial migrations or silent failures. + + +* **Error Handling and Reporting** + * Implement comprehensive error reporting to track failed resource transfers. + * Save all API requests during testing to aid in building clarity when unexpected outcomes occur. + * Follow error handling guidance based on specific error types. See Error Handling for more information. +* **Pre-Plan for Data Integrity and Availability** + * Begin with a smaller dataset to verify functionality and data quality while limiting API requests and retries in testing. + * External resources that are unavailable via public HTTP requests cannot be fetched via the BigCommerce API. Upload images and other resources via WebDAV, using resource links local to BigCommerce during product creation. + * Ensure your test dataset includes edge cases such as products with maximum/minimum field values, missing optional data, special characters, and legacy formats to reveal potential issues early. + + +After migrating your test data, verify storefront display, search, filtering, checkout, and reporting to ensure all features work as expected. + + +### FAQ + +1. **How can I automate the generation of representative and edge-case test datasets for my catalog?** + +Use scripting languages (such as Python or Node.js) to extract real records from your source system, and programmatically mutate copies to include edge cases (e.g., missing fields, maximum/minimum values, special characters). Consider sampling actual problematic records from production logs or validation failures. + +2. **What are the best practices for scripting API calls to validate data integrity post-migration?** + +Automate GET requests to retrieve migrated data from BigCommerce, then compare the results field-by-field with your source dataset. Log differences and use schema validation to catch datatype or structure mismatches. + +3. **How do I programmatically compare source and destination data for consistency after a partial migration?** + +Export both source and destination datasets as structured data (JSON/CSV), normalize formats, and use diff tools or custom scripts to check for field-level matches and missing/extra records. + +4. **How can I handle and retry failed API requests efficiently when rate limits or transient errors occur during test runs?** + +Implement exponential backoff and retry logic in your scripts for HTTP 429 (rate limit) or 5xx errors, and monitor response headers for rate limit information to throttle requests as needed. + +5. **What is the recommended approach for cleaning up test data (including products, images, and related resources) after validation in a sandbox or production environment?** + +Track IDs of all created test resources during migration, and use API DELETE calls or batch operations to remove them once tests are complete. For production, use clear naming conventions or tagging to identify test data for cleanup. + +### Resources + +- [BigCommerce Catalog API Reference](https://developer.bigcommerce.com/api-reference/store-management/catalog) +- [Handling API Errors](https://developer.bigcommerce.com/resource-hub/handling-errors-in-bigcommerce-apis) +- [API Rate Limits Guide](https://developer.bigcommerce.com/resource-hub/navigating-bigcommerces-api-rate-limits-update) +- [Creating a BigCommerce Sandbox Store](https://developer.bigcommerce.com/docs/start/bigcommerce-sandbox-store) +- [Using Postman with BigCommerce APIs](https://developer.bigcommerce.com/docs/start/api-clients/postman) +- [Community Thread: Data Validation Scripts & Tips](https://community.bigcommerce.com/t5/Developers/Best-ways-to-validate-product-data-before-import/td-p/146590) +- [WebDAV Overview and Usage](https://support.bigcommerce.com/s/article/File-Access-WebDAV) +- [Sample Product Import CSV](https://storage.googleapis.com/bigcommerce-production-dev-center/Knowledge%20Base/Products/Import%20Export%20v3%20Guide/v3-product-import-template.csv) +- [API Accounts and OAuth Scopes](https://developer.bigcommerce.com/docs/start/authentication/api-accounts) diff --git a/docs/start/migration/4_errors.md b/docs/start/migration/4_errors.md index 6869a81fb..b91653675 100644 --- a/docs/start/migration/4_errors.md +++ b/docs/start/migration/4_errors.md @@ -1,141 +1,141 @@ ---- -title: Error Handling -keywords: bigcommerce api, error handling, api status codes, data migration, exponential backoff, rate limits, batch endpoints, api retries, network errors, 4xx errors, 5xx errors, http response codes, api integration, logging best practices, troubleshooting ---- - -## Error Handling - -API operations at scale often return errors instead of successfully completing a given request. The BigCommerce API has two primary classes of error messages that can impact data migration: `4xx` and `5xx`. - -For an in-depth list of the various status codes, including errors, and what they mean, see [API Status Codes](https://developer.bigcommerce.com/docs/start/about/status-codes). - -### 5xx Error Codes - -`5xx` status codes indicate server-side issues. These errors generally cannot be resolved by the client. For transient errors such as `500`, `502`, `503`, or `504`, implement exponential back-off retries, up to a set limit (e.g., 10 attempts), increasing the wait time between each retry. However, other `5xx` errors like `501` or `505` are persistent and should be logged and investigated rather than retried. - -While rate limiting typically returns a `429`, you may occasionally receive a `500` for similar scenarios. Handle these with the same retry strategy. For more on handling server errors, see [API Request Architecture](https://developer.bigcommerce.com/docs/start/best-practices/integration-design#500-through-504-errors). - -### 4xx Error Codes - -`4xx` errors indicate malformed requests or invalid data. For automated operations, log and skip most `4xx` errors for later review, but note that some require immediate attention. - - -Logging and skipping errors can lead to silent data loss. Always review error logs post-migration and generate a summary of skipped records for follow-up. - - -Implement robust rate limiting for automated API calls to avoid exceeding [platform rate limits](https://developer.bigcommerce.com/docs/start/best-practices/api-rate-limits). - -#### Status code `429` - -The API returns this error when you exceed the platform rate limits. - -* Once the API returns a `429` status, it will likely return `429` for subsequent requests unless the rate limit window elapses. -* As a means to avoid this error, BigCommerce APIs include [rate limit headers](https://developer.bigcommerce.com/docs/start/about#bigcommerce-specific-response-headers) in responses that provide the information necessary for you to adjust call rates. -* If you do receive a `429` status in your response, use either the `X-Rate-Limit-Time-Reset-Ms` or the `X-Retry-After` header from the response to wait before retrying the request. -* For example, in PHP: - -```php -$milliseconds = $response->getHeader("X-Rate-Limit-Time-Reset-Ms"); -usleep($milliseconds * 1000); -``` - - -If both `X-Retry-After` and `X-Rate-Limit-Time-Reset-Ms` are present, honor the longer of the two wait times. - - -#### Status code `404` - -The API returns this error either when a request’s path does not match an existing endpoint, when a provided parameter does not match existing data, or less commonly when the method of the request is invalid. - -* If a `404` status is returned for individual API calls, this usually means that some referenced data does not match existing data. In general, this should be logged and skipped, including the exact path, body, and response of the request to investigate the cause later. - -#### Batch Endpoints - -When employing batch endpoints, for example [Update Products (Batch)](https://developer.bigcommerce.com/docs/rest-catalog/products#update-products-batch), there may be a single item that causes the whole request to fail. Often, the response for batch endpoints will include the index of the failed item. Use this index to remove the item from the request, then retry. - - -Not every batch endpoint identifies the index or indices of failed items. If the response doesn't specify which items failed in a batch request, you'll need to send each item in separate requests to identify and report the failures. - -Do not assume the entire batch succeeded or failed. Process successful items, and retry or log errors for failed ones. - - -#### Status code `422` - -The API returns this error when a request is formatted incorrectly or contains invalid data. - -* A `422` error should typically only occur during testing. If you see it during a large data migration, check your dataset and the data mapping for potential problems. -* You can likely log and skip a single `422` error. However, repeated `422` errors indicate a persistent problem that you must fix before continuing the migration. - - -Implement thorough client-side validation before sending API requests. If you encounter repeated `422` errors during production data migration, treat this as a critical issue. Pause the migration, fix the data mapping, and only resume once the problem is resolved. - - - - -Below is an example of a malformed request to the endpoint [Update Products (Batch)](https://developer.bigcommerce.com/docs/rest-catalog/products#update-products-batch). Due to the requirements of the endpoint, a `422` status code is expected from this request. - -```json -[ - { - "name": "test1" - }, - { - "name": "test2" - } -] -``` - - - -The following is an example `422` response, demonstrating the available information in such a response. - -For this endpoint, the error response doesn't list the specific items that failed. Therefore, you'll have to separate the request into individual items and resend them. - -In this particular case, the errors listed apply to each item, but that is not likely to be the case in general. - -```json -{ - "status": 422, - "title": "Missing Required Fields", - "type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes", - "errors": { - "name": "Please provide a name.", - "price": "Please provide a price.", - "type": "Please provide a type.", - "weight": "Please provide a weight." - } -} -``` - - - - -### FAQs - -1. **What is the recommended strategy for implementing exponential backoff retries with the BigCommerce API?** - -Use exponential backoff for retrying transient errors, starting with a short delay and doubling it after each failed attempt, up to a maximum number of retries (e.g., 10). Add a small random jitter to each delay to reduce collision risk. Always respect any `X-Retry-After` or other rate limit headers from the response. - -2. **What headers should I monitor to avoid hitting rate limits, and how do I interpret them?** - -Monitor response headers such as `X-Rate-Limit-Requests-Left`, `X-Rate-Limit-Time-Reset-Ms`, and `X-Retry-After`. These indicate how many requests remain and when you can resume making requests. Adjust your request rate accordingly to avoid being throttled or blocked. For more information, see [BigCommerce Specific Headers](https://developer.bigcommerce.com/docs/start/about#bigcommerce-specific-response-headers) - -3. **What should I do if I repeatedly receive 422 errors for apparently valid data?** - -Repeated 422 errors suggest a problem with your data or mapping logic. Pause your migration, review your data transformation, and ensure all required fields and formats match the API's expectations before resuming. - -4. **How do I handle network errors or timeouts when communicating with the API?** - -Implement generic error handling for network issues and timeouts. Retry failed requests using exponential backoff, and ensure your code checks for and gracefully handles situations where no response or a malformed response is received. - -### Resources - -- [API Status Codes](https://developer.bigcommerce.com/docs/start/about/status-codes) -- [API Request Architecture – 5xx Errors](https://developer.bigcommerce.com/docs/start/best-practices/integration-design#500-through-504-errors) -- [API Rate Limits](https://developer.bigcommerce.com/api-docs/getting-started/api-rate-limits) -- [Catalog API Error Responses](https://developer.bigcommerce.com/api-reference/store-management/catalog/errors) -- [API Client Libraries](https://developer.bigcommerce.com/docs/start/api-clients) -- [Logging and Monitoring Best Practices](https://developer.bigcommerce.com/docs/start/best-practices/integration-design#logging-and-monitoring) -- [BigCommerce Dev Community](https://developer.bigcommerce.com/community) -- [MDN HTTP Status Codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) -- [Exponential Backoff and Jitter (AWS Blog)](https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/) +--- +title: Error Handling +keywords: bigcommerce api, error handling, api status codes, data migration, exponential backoff, rate limits, batch endpoints, api retries, network errors, 4xx errors, 5xx errors, http response codes, api integration, logging best practices, troubleshooting +--- + +## Error Handling + +API operations at scale often return errors instead of successfully completing a given request. The BigCommerce API has two primary classes of error messages that can impact data migration: `4xx` and `5xx`. + +For an in-depth list of the various status codes, including errors, and what they mean, see [API Status Codes](https://developer.bigcommerce.com/docs/start/about/status-codes). + +### 5xx Error Codes + +`5xx` status codes indicate server-side issues. These errors generally cannot be resolved by the client. For transient errors such as `500`, `502`, `503`, or `504`, implement exponential back-off retries, up to a set limit (e.g., 10 attempts), increasing the wait time between each retry. However, other `5xx` errors like `501` or `505` are persistent and should be logged and investigated rather than retried. + +While rate limiting typically returns a `429`, you may occasionally receive a `500` for similar scenarios. Handle these with the same retry strategy. For more on handling server errors, see [API Request Architecture](https://developer.bigcommerce.com/docs/start/best-practices/integration-design#500-through-504-errors). + +### 4xx Error Codes + +`4xx` errors indicate malformed requests or invalid data. For automated operations, log and skip most `4xx` errors for later review, but note that some require immediate attention. + + +Logging and skipping errors can lead to silent data loss. Always review error logs post-migration and generate a summary of skipped records for follow-up. + + +Implement robust rate limiting for automated API calls to avoid exceeding [platform rate limits](https://developer.bigcommerce.com/docs/start/best-practices/api-rate-limits). + +#### Status code `429` + +The API returns this error when you exceed the platform rate limits. + +* Once the API returns a `429` status, it will likely return `429` for subsequent requests unless the rate limit window elapses. +* As a means to avoid this error, BigCommerce APIs include [rate limit headers](https://developer.bigcommerce.com/docs/start/about#bigcommerce-specific-response-headers) in responses that provide the information necessary for you to adjust call rates. +* If you do receive a `429` status in your response, use either the `X-Rate-Limit-Time-Reset-Ms` or the `X-Retry-After` header from the response to wait before retrying the request. +* For example, in PHP: + +```php +$milliseconds = $response->getHeader("X-Rate-Limit-Time-Reset-Ms"); +usleep($milliseconds * 1000); +``` + + +If both `X-Retry-After` and `X-Rate-Limit-Time-Reset-Ms` are present, honor the longer of the two wait times. + + +#### Status code `404` + +The API returns this error either when a request’s path does not match an existing endpoint, when a provided parameter does not match existing data, or less commonly when the method of the request is invalid. + +* If a `404` status is returned for individual API calls, this usually means that some referenced data does not match existing data. In general, this should be logged and skipped, including the exact path, body, and response of the request to investigate the cause later. + +#### Batch Endpoints + +When employing batch endpoints, for example [Update Products (Batch)](https://developer.bigcommerce.com/docs/rest-catalog/products#update-products-batch), there may be a single item that causes the whole request to fail. Often, the response for batch endpoints will include the index of the failed item. Use this index to remove the item from the request, then retry. + + +Not every batch endpoint identifies the index or indices of failed items. If the response doesn't specify which items failed in a batch request, you'll need to send each item in separate requests to identify and report the failures. + +Do not assume the entire batch succeeded or failed. Process successful items, and retry or log errors for failed ones. + + +#### Status code `422` + +The API returns this error when a request is formatted incorrectly or contains invalid data. + +* A `422` error should typically only occur during testing. If you see it during a large data migration, check your dataset and the data mapping for potential problems. +* You can likely log and skip a single `422` error. However, repeated `422` errors indicate a persistent problem that you must fix before continuing the migration. + + +Implement thorough client-side validation before sending API requests. If you encounter repeated `422` errors during production data migration, treat this as a critical issue. Pause the migration, fix the data mapping, and only resume once the problem is resolved. + + + + +Below is an example of a malformed request to the endpoint [Update Products (Batch)](https://developer.bigcommerce.com/docs/rest-catalog/products#update-products-batch). Due to the requirements of the endpoint, a `422` status code is expected from this request. + +```json +[ + { + "name": "test1" + }, + { + "name": "test2" + } +] +``` + + + +The following is an example `422` response, demonstrating the available information in such a response. + +For this endpoint, the error response doesn't list the specific items that failed. Therefore, you'll have to separate the request into individual items and resend them. + +In this particular case, the errors listed apply to each item, but that is not likely to be the case in general. + +```json +{ + "status": 422, + "title": "Missing Required Fields", + "type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes", + "errors": { + "name": "Please provide a name.", + "price": "Please provide a price.", + "type": "Please provide a type.", + "weight": "Please provide a weight." + } +} +``` + + + + +### FAQs + +1. **What is the recommended strategy for implementing exponential backoff retries with the BigCommerce API?** + +Use exponential backoff for retrying transient errors, starting with a short delay and doubling it after each failed attempt, up to a maximum number of retries (e.g., 10). Add a small random jitter to each delay to reduce collision risk. Always respect any `X-Retry-After` or other rate limit headers from the response. + +2. **What headers should I monitor to avoid hitting rate limits, and how do I interpret them?** + +Monitor response headers such as `X-Rate-Limit-Requests-Left`, `X-Rate-Limit-Time-Reset-Ms`, and `X-Retry-After`. These indicate how many requests remain and when you can resume making requests. Adjust your request rate accordingly to avoid being throttled or blocked. For more information, see [BigCommerce Specific Headers](https://developer.bigcommerce.com/docs/start/about#bigcommerce-specific-response-headers) + +3. **What should I do if I repeatedly receive 422 errors for apparently valid data?** + +Repeated 422 errors suggest a problem with your data or mapping logic. Pause your migration, review your data transformation, and ensure all required fields and formats match the API's expectations before resuming. + +4. **How do I handle network errors or timeouts when communicating with the API?** + +Implement generic error handling for network issues and timeouts. Retry failed requests using exponential backoff, and ensure your code checks for and gracefully handles situations where no response or a malformed response is received. + +### Resources + +- [API Status Codes](https://developer.bigcommerce.com/docs/start/about/status-codes) +- [API Request Architecture – 5xx Errors](https://developer.bigcommerce.com/docs/start/best-practices/integration-design#500-through-504-errors) +- [API Rate Limits](https://developer.bigcommerce.com/api-docs/getting-started/api-rate-limits) +- [Catalog API Error Responses](https://developer.bigcommerce.com/api-reference/store-management/catalog/errors) +- [API Client Libraries](https://developer.bigcommerce.com/docs/start/api-clients) +- [Logging and Monitoring Best Practices](https://developer.bigcommerce.com/docs/start/best-practices/integration-design#logging-and-monitoring) +- [BigCommerce Dev Community](https://developer.bigcommerce.com/community) +- [MDN HTTP Status Codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) +- [Exponential Backoff and Jitter (AWS Blog)](https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/) diff --git a/docs/start/migration/5_migrate.md b/docs/start/migration/5_migrate.md index 891e4ee2a..50a440c29 100644 --- a/docs/start/migration/5_migrate.md +++ b/docs/start/migration/5_migrate.md @@ -1,85 +1,85 @@ ---- -title: Load Complete Data -keywords: bigcommerce migration, bigcommerce product import, ecommerce catalog migration, data migration guide, bigcommerce API, product data transfer, ecommerce platform migration, idempotent migration, rollback migration bigcommerce, referential integrity, bigcommerce API limits, product catalog import, ecommerce data validation, bigcommerce troubleshooting, migration best practices ---- - -## Load Complete Data - -Once you've successfully tested your data migration process, verified mappings, and gained confidence in your approach, you're ready to proceed with loading your complete product dataset into BigCommerce. - -### Pre-Migration checklist - -* Remove all extraneous data (hidden products, unnecessary attributes) from your dataset -* ⚠️ Disable or turn OFF any third-party applications that might automatically ingest product data -* Verify you have sufficient API rate limits for your plan level -* Consider scheduling your migration during off-peak hours to minimize potential platform congestion - -If your source catalog undergoes regular updates which may coincide with your migration, consider implementing a data freeze or define a clear “cut-off” time to avoid missing late changes. - -* Backup your source data before proceeding - - -When performing large-scale migrations, it is essential to use structures that ensure data is not duplicated. - -Use unique product identifiers to check if a product exists before retrying an API call to create it. - -For batch uploads, log each product's status whenever possible to ensure complete migration. - - -### During migration - -* Actively monitor for status error codes and implement your error handling protocols -* Track progress through logging to ensure you transfer all products correctly. -* Maintain a separate record of any failed transfers for later remediation - -BigCommerce enforces strict platform limits, such as maximum variants per product, image sizes, and total catalog size. Exceeding these can cause migration jobs to fail or result in incomplete imports. Review BigCommerce’s documentation on limitations before migration to avoid unexpected errors. - - -### Post-Migration verification - -* Compare product counts between your source platform and BigCommerce -* Spot-check a representative sample of products across different categories and types -* Check that you have transferred complex products (those with variants, custom fields, or multiple images) correctly. -* Test product visibility and searchability on your storefront -* Confirm pricing, inventory levels, and product relationships are accurate - -### Next Steps - -* Once product data is successfully transferred, proceed with migrating related data (customers, orders, etc.) -* Document your migration process thoroughly for future reference or troubleshooting -* Consider implementing a synchronization strategy or data freeze if you'll be operating both platforms simultaneously during transition - -### Estimated time to transfer - -The following table provides approximations of migration times for various catalog sizes. These estimates are based on platform limits and assumed catalog complexity. If you have a particularly complex catalog, your results will vary from these provisions. - -Based on this information and the guidance provided above, plan your migration with enough time allotted to prevent issues. - -| Resources | Estimated time (store with no live integrations) | -| :---- | :---- | -| > 5,000 with variants | Around 1 hour | -| > 40,000 | Around 15 hours | -| > 300,000 | Around 100 hours | -| > 500,000+ | Recommended to work with our dedicated data migration services team on data processing | - -### FAQ -1. **How can I avoid creating duplicate products or corrupting my data if the migration is interrupted or retried?** - -Ensure your migration script checks for existing products (by unique identifier, like SKU) before creating or updating records, so that repeated or retried requests don’t result in duplicates. Always use migration logs to track the status of each product upload and re-run only failed or incomplete batches. - -2. **What should I do if the migration fails or needs to be reverted?** - -Always make a full backup of your source data before starting the migration. If you encounter issues, use your migration logs to identify and remove or correct only the affected products in BigCommerce. For large rollbacks, you may need to restore from your backup or script deletions based on the IDs created during the migration. Document the rollback steps taken for future reference. - -3. **How do I ensure that products, categories, brands, and images are properly linked after migration?** - -Migrate related entities (such as categories, brands, and images) before importing products. Maintain a mapping between original and BigCommerce-assigned IDs for these entities, and update product references accordingly to ensure all links remain valid. After migration, verify all relationships and assignments are intact in the BigCommerce store. - -4. **How can I verify that my migration is complete and accurate?** - -In addition to product counts, use your migration logs to reconcile all transferred data. Perform spot checks on complex or critical products, and check that all related entities and references are present. Use API queries or platform reports to systematically verify catalog integrity. -### Resources -* [API Best Practices | BigCommerce Dev Center](https://developer.bigcommerce.com/docs/start/best-practices) -* [API Rate Limits](https://developer.bigcommerce.com/api-docs/getting-started/api-rate-limits) -* [Monitoring API Usage](https://developer.bigcommerce.com/api-docs/getting-started/monitoring-api-usage) -* [Data Migration Services](https://www.bigcommerce.com/services/data-migration/) +--- +title: Load Complete Data +keywords: bigcommerce migration, bigcommerce product import, ecommerce catalog migration, data migration guide, bigcommerce API, product data transfer, ecommerce platform migration, idempotent migration, rollback migration bigcommerce, referential integrity, bigcommerce API limits, product catalog import, ecommerce data validation, bigcommerce troubleshooting, migration best practices +--- + +## Load Complete Data + +Once you've successfully tested your data migration process, verified mappings, and gained confidence in your approach, you're ready to proceed with loading your complete product dataset into BigCommerce. + +### Pre-Migration checklist + +* Remove all extraneous data (hidden products, unnecessary attributes) from your dataset +* ⚠️ Disable or turn OFF any third-party applications that might automatically ingest product data +* Verify you have sufficient API rate limits for your plan level +* Consider scheduling your migration during off-peak hours to minimize potential platform congestion + +If your source catalog undergoes regular updates which may coincide with your migration, consider implementing a data freeze or define a clear “cut-off” time to avoid missing late changes. + +* Backup your source data before proceeding + + +When performing large-scale migrations, it is essential to use structures that ensure data is not duplicated. + +Use unique product identifiers to check if a product exists before retrying an API call to create it. + +For batch uploads, log each product's status whenever possible to ensure complete migration. + + +### During migration + +* Actively monitor for status error codes and implement your error handling protocols +* Track progress through logging to ensure you transfer all products correctly. +* Maintain a separate record of any failed transfers for later remediation + +BigCommerce enforces strict platform limits, such as maximum variants per product, image sizes, and total catalog size. Exceeding these can cause migration jobs to fail or result in incomplete imports. Review BigCommerce’s documentation on limitations before migration to avoid unexpected errors. + + +### Post-Migration verification + +* Compare product counts between your source platform and BigCommerce +* Spot-check a representative sample of products across different categories and types +* Check that you have transferred complex products (those with variants, custom fields, or multiple images) correctly. +* Test product visibility and searchability on your storefront +* Confirm pricing, inventory levels, and product relationships are accurate + +### Next Steps + +* Once product data is successfully transferred, proceed with migrating related data (customers, orders, etc.) +* Document your migration process thoroughly for future reference or troubleshooting +* Consider implementing a synchronization strategy or data freeze if you'll be operating both platforms simultaneously during transition + +### Estimated time to transfer + +The following table provides approximations of migration times for various catalog sizes. These estimates are based on platform limits and assumed catalog complexity. If you have a particularly complex catalog, your results will vary from these provisions. + +Based on this information and the guidance provided above, plan your migration with enough time allotted to prevent issues. + +| Resources | Estimated time (store with no live integrations) | +| :---- | :---- | +| > 5,000 with variants | Around 1 hour | +| > 40,000 | Around 15 hours | +| > 300,000 | Around 100 hours | +| > 500,000+ | Recommended to work with our dedicated data migration services team on data processing | + +### FAQ +1. **How can I avoid creating duplicate products or corrupting my data if the migration is interrupted or retried?** + +Ensure your migration script checks for existing products (by unique identifier, like SKU) before creating or updating records, so that repeated or retried requests don’t result in duplicates. Always use migration logs to track the status of each product upload and re-run only failed or incomplete batches. + +2. **What should I do if the migration fails or needs to be reverted?** + +Always make a full backup of your source data before starting the migration. If you encounter issues, use your migration logs to identify and remove or correct only the affected products in BigCommerce. For large rollbacks, you may need to restore from your backup or script deletions based on the IDs created during the migration. Document the rollback steps taken for future reference. + +3. **How do I ensure that products, categories, brands, and images are properly linked after migration?** + +Migrate related entities (such as categories, brands, and images) before importing products. Maintain a mapping between original and BigCommerce-assigned IDs for these entities, and update product references accordingly to ensure all links remain valid. After migration, verify all relationships and assignments are intact in the BigCommerce store. + +4. **How can I verify that my migration is complete and accurate?** + +In addition to product counts, use your migration logs to reconcile all transferred data. Perform spot checks on complex or critical products, and check that all related entities and references are present. Use API queries or platform reports to systematically verify catalog integrity. +### Resources +* [API Best Practices | BigCommerce Dev Center](https://developer.bigcommerce.com/docs/start/best-practices) +* [API Rate Limits](https://developer.bigcommerce.com/api-docs/getting-started/api-rate-limits) +* [Monitoring API Usage](https://developer.bigcommerce.com/api-docs/getting-started/monitoring-api-usage) +* [Data Migration Services](https://www.bigcommerce.com/services/data-migration/) diff --git a/docs/start/migration/6_delta.md b/docs/start/migration/6_delta.md index 71f0ab6b4..11a8adedb 100644 --- a/docs/start/migration/6_delta.md +++ b/docs/start/migration/6_delta.md @@ -1,91 +1,91 @@ ---- -title: Go Live and Delta Migration -keywords: bigcommerce delta migration, ecommerce data sync, delta migration process, bigcommerce go live, product catalog updates, incremental data migration, bigcommerce api, data reconciliation, ecommerce migration strategy, data integrity, post-migration validation, migration rollback, data synchronization, business continuity migration, bigcommerce best practices ---- - -## Go Live and Delta Migration - -While a complete "data freeze" during migration is ideal, we recognize that business continuity requirements often make this impractical. For this reason, a well-structured delta migration plan is essential. - - -Delta migration is the process of transferring only the data that has changed (been added or updated) since your initial migration. This ensures your new BigCommerce store is up-to-date at go-live without requiring a full data reload. - - -### Delta Migration Timeline - -* Schedule your delta migration to occur no more than 2 weeks after your BigCommerce go-live date - - -The closer your delta migration occurs to the actual go-live cutover, the less risk there is of missing critical last-minute data changes. If a full data freeze isn’t possible, minimize the delta window as much as operationally feasible. - - -* Consider multiple delta migrations for high-volume stores (e.g., 24 hours post-launch, 1 week post-launch, and final sweep) -* Coordinate delta migrations during low-traffic periods to minimize impact on operations - -### Delta Migration Process - -* Utilize the same tooling and processes established during your initial migration -* Focus only on net-new or modified data since your initial migration -* Note that the Create Products API will automatically reject duplicate data that exactly matches existing records -* For updated products, use the Update Product endpoint rather than Create Product to avoid duplication - - -Delta migrations are subject to all the same API rate limits and catalog constraints as your initial migration. Always check for updated limits before running your delta to avoid unexpected failures. - - -### Data Reconciliation Strategy - -* Implement a reliable method to identify which products were created or modified since your initial migration -* Consider using timestamps, database flags, or changed-record logs to identify delta content -* Create a verification process to ensure no critical data is missed between migrations - - -Missing a change during delta migration can result in outdated or incorrect product information on your live store, impacting orders and customer experience. To mitigate, implement robust verification steps and schedule a final sweep before go-live. - - -### Business Operations During Transition - -* Establish clear protocols for order processing during the transition period -* Determine how inventory will be managed across both platforms until migration is complete -* Create a communication plan for staff to understand which system is authoritative at each stage - -### Contingency Planning - -* Develop rollback procedures in case critical issues arise during go-live -* Establish decision criteria for when to activate contingency plans -* Prepare communication templates for both internal teams and customers if delays occur - -### Post-Migration Maintenance - -* Implement a regular data validation schedule to ensure ongoing data integrity -* Document any manual adjustments made during the delta migration process -* Create a standard operating procedure for future data synchronization needs - -### FAQ -1. **How do I identify which products or data have changed since the initial migration?** - -Use timestamps, change logs, or database flags from your source system to extract only records that have been created or modified since the initial migration. This ensures that only delta changes are considered for transfer. - -2. **What is the safest way to prevent duplicate records during delta migration?** - -Always check for existing records in BigCommerce using unique identifiers (such as SKU or product ID) before creating or updating records. Use the Update Product endpoint for modified records and Create Product only for new items. - -3. **How should I handle conflicting updates between the source system and BigCommerce during the delta window?** - -Establish clear rules for conflict resolution, such as “latest timestamp wins,” or flagging discrepancies for manual review. Communicate these rules to all stakeholders prior to migration. - -4. **What should I do if an error or failure occurs during delta migration?** - -Rely on detailed logging and migration status tracking to identify failed records. Retry only the failed operations using your logs, and ensure that your process is idempotent to avoid duplicate or partial updates. - -5. **How can I verify that all intended changes were successfully migrated to BigCommerce?** - -After the delta migration, compare the updated product counts, use spot checks on high-importance records, and reconcile migration logs with both source and destination systems to ensure that all intended changes are present. -### Resources -- [BigCommerce API Documentation](https://developer.bigcommerce.com/api-reference/) -- [API Rate Limits | BigCommerce Dev Center](https://developer.bigcommerce.com/api-docs/getting-started/api-rate-limits) -- [Best Practices for Data Migration | BigCommerce](https://developer.bigcommerce.com/docs/start/best-practices) -- [BigCommerce Webhooks Guide](https://developer.bigcommerce.com/api-docs/storefront/webhooks/overview) -- [Monitoring API Usage](https://developer.bigcommerce.com/api-docs/getting-started/monitoring-api-usage) -- [Data Migration Services | BigCommerce](https://www.bigcommerce.com/services/data-migration/) -- [BigCommerce Catalog API Reference](https://developer.bigcommerce.com/api-reference/store-management/catalog) +--- +title: Go Live and Delta Migration +keywords: bigcommerce delta migration, ecommerce data sync, delta migration process, bigcommerce go live, product catalog updates, incremental data migration, bigcommerce api, data reconciliation, ecommerce migration strategy, data integrity, post-migration validation, migration rollback, data synchronization, business continuity migration, bigcommerce best practices +--- + +## Go Live and Delta Migration + +While a complete "data freeze" during migration is ideal, we recognize that business continuity requirements often make this impractical. For this reason, a well-structured delta migration plan is essential. + + +Delta migration is the process of transferring only the data that has changed (been added or updated) since your initial migration. This ensures your new BigCommerce store is up-to-date at go-live without requiring a full data reload. + + +### Delta Migration Timeline + +* Schedule your delta migration to occur no more than 2 weeks after your BigCommerce go-live date + + +The closer your delta migration occurs to the actual go-live cutover, the less risk there is of missing critical last-minute data changes. If a full data freeze isn’t possible, minimize the delta window as much as operationally feasible. + + +* Consider multiple delta migrations for high-volume stores (e.g., 24 hours post-launch, 1 week post-launch, and final sweep) +* Coordinate delta migrations during low-traffic periods to minimize impact on operations + +### Delta Migration Process + +* Utilize the same tooling and processes established during your initial migration +* Focus only on net-new or modified data since your initial migration +* Note that the Create Products API will automatically reject duplicate data that exactly matches existing records +* For updated products, use the Update Product endpoint rather than Create Product to avoid duplication + + +Delta migrations are subject to all the same API rate limits and catalog constraints as your initial migration. Always check for updated limits before running your delta to avoid unexpected failures. + + +### Data Reconciliation Strategy + +* Implement a reliable method to identify which products were created or modified since your initial migration +* Consider using timestamps, database flags, or changed-record logs to identify delta content +* Create a verification process to ensure no critical data is missed between migrations + + +Missing a change during delta migration can result in outdated or incorrect product information on your live store, impacting orders and customer experience. To mitigate, implement robust verification steps and schedule a final sweep before go-live. + + +### Business Operations During Transition + +* Establish clear protocols for order processing during the transition period +* Determine how inventory will be managed across both platforms until migration is complete +* Create a communication plan for staff to understand which system is authoritative at each stage + +### Contingency Planning + +* Develop rollback procedures in case critical issues arise during go-live +* Establish decision criteria for when to activate contingency plans +* Prepare communication templates for both internal teams and customers if delays occur + +### Post-Migration Maintenance + +* Implement a regular data validation schedule to ensure ongoing data integrity +* Document any manual adjustments made during the delta migration process +* Create a standard operating procedure for future data synchronization needs + +### FAQ +1. **How do I identify which products or data have changed since the initial migration?** + +Use timestamps, change logs, or database flags from your source system to extract only records that have been created or modified since the initial migration. This ensures that only delta changes are considered for transfer. + +2. **What is the safest way to prevent duplicate records during delta migration?** + +Always check for existing records in BigCommerce using unique identifiers (such as SKU or product ID) before creating or updating records. Use the Update Product endpoint for modified records and Create Product only for new items. + +3. **How should I handle conflicting updates between the source system and BigCommerce during the delta window?** + +Establish clear rules for conflict resolution, such as “latest timestamp wins,” or flagging discrepancies for manual review. Communicate these rules to all stakeholders prior to migration. + +4. **What should I do if an error or failure occurs during delta migration?** + +Rely on detailed logging and migration status tracking to identify failed records. Retry only the failed operations using your logs, and ensure that your process is idempotent to avoid duplicate or partial updates. + +5. **How can I verify that all intended changes were successfully migrated to BigCommerce?** + +After the delta migration, compare the updated product counts, use spot checks on high-importance records, and reconcile migration logs with both source and destination systems to ensure that all intended changes are present. +### Resources +- [BigCommerce API Documentation](https://developer.bigcommerce.com/api-reference/) +- [API Rate Limits | BigCommerce Dev Center](https://developer.bigcommerce.com/api-docs/getting-started/api-rate-limits) +- [Best Practices for Data Migration | BigCommerce](https://developer.bigcommerce.com/docs/start/best-practices) +- [BigCommerce Webhooks Guide](https://developer.bigcommerce.com/api-docs/storefront/webhooks/overview) +- [Monitoring API Usage](https://developer.bigcommerce.com/api-docs/getting-started/monitoring-api-usage) +- [Data Migration Services | BigCommerce](https://www.bigcommerce.com/services/data-migration/) +- [BigCommerce Catalog API Reference](https://developer.bigcommerce.com/api-reference/store-management/catalog) diff --git a/examples/checkout.json b/examples/checkout.json index 46294d847..a1ddf294f 100644 --- a/examples/checkout.json +++ b/examples/checkout.json @@ -1,8 +1,8 @@ -{ - "order_confirmation_content": " \n\n \n\n \n\n \n\n
\n\n\n\n\n\n", - "checkout_head": "\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n\n \n \n\n \n \n \n \n \n\n\n\n", - "order": { - "id": 1836 - }, - "header_image": "" +{ + "order_confirmation_content": " \n\n \n\n \n\n \n\n
\n\n\n\n\n\n", + "checkout_head": "\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n\n \n \n\n \n \n \n \n \n\n\n\n", + "order": { + "id": 1836 + }, + "header_image": "" } \ No newline at end of file diff --git a/examples/countries.json b/examples/countries.json index ffbaff6da..fc73bdb98 100644 --- a/examples/countries.json +++ b/examples/countries.json @@ -1,3169 +1,3169 @@ -[ - { - "code": "AF", - "label": "Afghanistan", - "value": "Afghanistan" - }, - { - "code": "AL", - "label": "Albania", - "value": "Albania" - }, - { - "code": "DZ", - "label": "Algeria", - "value": "Algeria" - }, - { - "code": "AS", - "label": "American Samoa", - "value": "American Samoa" - }, - { - "code": "AD", - "label": "Andorra", - "value": "Andorra" - }, - { - "code": "AO", - "label": "Angola", - "value": "Angola" - }, - { - "code": "AI", - "label": "Anguilla", - "value": "Anguilla" - }, - { - "code": "AQ", - "label": "Antarctica", - "value": "Antarctica" - }, - { - "code": "AG", - "label": "Antigua and Barbuda", - "value": "Antigua and Barbuda" - }, - { - "code": "AR", - "label": "Argentina", - "states": [ - { - "code": "C", - "name": "Ciudad Autónoma de Buenos Aires", - "value": "Ciudad Autónoma de Buenos Aires" - }, - { - "code": "B", - "name": "Buenos Aires", - "value": "Buenos Aires" - }, - { - "code": "K", - "name": "Catamarca", - "value": "Catamarca" - }, - { - "code": "H", - "name": "Chaco", - "value": "Chaco" - }, - { - "code": "U", - "name": "Chubut", - "value": "Chubut" - }, - { - "code": "X", - "name": "Córdoba", - "value": "Córdoba" - }, - { - "code": "W", - "name": "Corrientes", - "value": "Corrientes" - }, - { - "code": "E", - "name": "Entre Ríos", - "value": "Entre Ríos" - }, - { - "code": "P", - "name": "Formosa", - "value": "Formosa" - }, - { - "code": "Y", - "name": "Jujuy", - "value": "Jujuy" - }, - { - "code": "L", - "name": "La Pampa", - "value": "La Pampa" - }, - { - "code": "F", - "name": "La Rioja", - "value": "La Rioja" - }, - { - "code": "M", - "name": "Mendoza", - "value": "Mendoza" - }, - { - "code": "N", - "name": "Misiones", - "value": "Misiones" - }, - { - "code": "Q", - "name": "Neuquén", - "value": "Neuquén" - }, - { - "code": "R", - "name": "Río Negro", - "value": "Río Negro" - }, - { - "code": "A", - "name": "Salta", - "value": "Salta" - }, - { - "code": "J", - "name": "San Juan", - "value": "San Juan" - }, - { - "code": "D", - "name": "San Luis", - "value": "San Luis" - }, - { - "code": "Z", - "name": "Santa Cruz", - "value": "Santa Cruz" - }, - { - "code": "S", - "name": "Santa Fe", - "value": "Santa Fe" - }, - { - "code": "G", - "name": "Santiago del Estero", - "value": "Santiago del Estero" - }, - { - "code": "V", - "name": "Tierra del Fuego", - "value": "Tierra del Fuego" - }, - { - "code": "T", - "name": "Tucumán", - "value": "Tucumán" - } - ], - "value": "Argentina" - }, - { - "code": "AM", - "label": "Armenia", - "value": "Armenia" - }, - { - "code": "AW", - "label": "Aruba", - "value": "Aruba" - }, - { - "code": "AU", - "label": "Australia", - "states": [ - { - "code": "ACT", - "name": "Australian Capital Territory", - "value": "Australian Capital Territory" - }, - { - "code": "NSW", - "name": "New South Wales", - "value": "New South Wales" - }, - { - "code": "NT", - "name": "Northern Territory", - "value": "Northern Territory" - }, - { - "code": "QLD", - "name": "Queensland", - "value": "Queensland" - }, - { - "code": "SA", - "name": "South Australia", - "value": "South Australia" - }, - { - "code": "TAS", - "name": "Tasmania", - "value": "Tasmania" - }, - { - "code": "VIC", - "name": "Victoria", - "value": "Victoria" - }, - { - "code": "WA", - "name": "Western Australia", - "value": "Western Australia" - } - ], - "value": "Australia" - }, - { - "code": "AT", - "label": "Austria", - "states": [ - { - "code": "9", - "name": "Wien", - "value": "Wien" - }, - { - "code": "3", - "name": "Niederösterreich", - "value": "Niederösterreich" - }, - { - "code": "4", - "name": "Oberösterreich", - "value": "Oberösterreich" - }, - { - "code": "5", - "name": "Salzburg", - "value": "Salzburg" - }, - { - "code": "2", - "name": "Kärnten", - "value": "Kärnten" - }, - { - "code": "6", - "name": "Steiermark", - "value": "Steiermark" - }, - { - "code": "7", - "name": "Tirol", - "value": "Tirol" - }, - { - "code": "1", - "name": "Burgenland", - "value": "Burgenland" - }, - { - "code": "8", - "name": "Vorarlberg", - "value": "Vorarlberg" - } - ], - "value": "Austria" - }, - { - "code": "AZ", - "label": "Azerbaijan", - "value": "Azerbaijan" - }, - { - "code": "BS", - "label": "Bahamas", - "value": "Bahamas" - }, - { - "code": "BH", - "label": "Bahrain", - "value": "Bahrain" - }, - { - "code": "BD", - "label": "Bangladesh", - "value": "Bangladesh" - }, - { - "code": "BB", - "label": "Barbados", - "value": "Barbados" - }, - { - "code": "BY", - "label": "Belarus", - "value": "Belarus" - }, - { - "code": "BE", - "label": "Belgium", - "value": "Belgium" - }, - { - "code": "BZ", - "label": "Belize", - "value": "Belize" - }, - { - "code": "BJ", - "label": "Benin", - "value": "Benin" - }, - { - "code": "BM", - "label": "Bermuda", - "value": "Bermuda" - }, - { - "code": "BT", - "label": "Bhutan", - "value": "Bhutan" - }, - { - "code": "BO", - "label": "Bolivia", - "value": "Bolivia" - }, - { - "code": "BA", - "label": "Bosnia and Herzegovina", - "value": "Bosnia and Herzegovina" - }, - { - "code": "BW", - "label": "Botswana", - "value": "Botswana" - }, - { - "code": "BV", - "label": "Bouvet Island", - "value": "Bouvet Island" - }, - { - "code": "BR", - "label": "Brazil", - "value": "Brazil" - }, - { - "code": "IO", - "label": "British Indian Ocean Territory", - "value": "British Indian Ocean Territory" - }, - { - "code": "BN", - "label": "Brunei Darussalam", - "value": "Brunei Darussalam" - }, - { - "code": "BG", - "label": "Bulgaria", - "value": "Bulgaria" - }, - { - "code": "BF", - "label": "Burkina Faso", - "value": "Burkina Faso" - }, - { - "code": "BI", - "label": "Burundi", - "value": "Burundi" - }, - { - "code": "KH", - "label": "Cambodia", - "value": "Cambodia" - }, - { - "code": "CM", - "label": "Cameroon", - "value": "Cameroon" - }, - { - "code": "CA", - "label": "Canada", - "states": [ - { - "code": "AB", - "name": "Alberta", - "value": "Alberta" - }, - { - "code": "BC", - "name": "British Columbia", - "value": "British Columbia" - }, - { - "code": "MB", - "name": "Manitoba", - "value": "Manitoba" - }, - { - "code": "NL", - "name": "Newfoundland and Labrador", - "value": "Newfoundland and Labrador" - }, - { - "code": "NB", - "name": "New Brunswick", - "value": "New Brunswick" - }, - { - "code": "NS", - "name": "Nova Scotia", - "value": "Nova Scotia" - }, - { - "code": "NT", - "name": "Northwest Territories", - "value": "Northwest Territories" - }, - { - "code": "NU", - "name": "Nunavut", - "value": "Nunavut" - }, - { - "code": "ON", - "name": "Ontario", - "value": "Ontario" - }, - { - "code": "PE", - "name": "Prince Edward Island", - "value": "Prince Edward Island" - }, - { - "code": "QC", - "name": "Quebec", - "value": "Quebec" - }, - { - "code": "SK", - "name": "Saskatchewan", - "value": "Saskatchewan" - }, - { - "code": "YT", - "name": "Yukon Territory", - "value": "Yukon Territory" - } - ], - "value": "Canada" - }, - { - "code": "CV", - "label": "Cape Verde", - "value": "Cape Verde" - }, - { - "code": "KY", - "label": "Cayman Islands", - "value": "Cayman Islands" - }, - { - "code": "CF", - "label": "Central African Republic", - "value": "Central African Republic" - }, - { - "code": "TD", - "label": "Chad", - "value": "Chad" - }, - { - "code": "CL", - "label": "Chile", - "value": "Chile" - }, - { - "code": "CN", - "label": "China", - "value": "China" - }, - { - "code": "CX", - "label": "Christmas Island", - "value": "Christmas Island" - }, - { - "code": "CC", - "label": "Cocos (Keeling) Islands", - "value": "Cocos (Keeling) Islands" - }, - { - "code": "CO", - "label": "Colombia", - "value": "Colombia" - }, - { - "code": "KM", - "label": "Comoros", - "value": "Comoros" - }, - { - "code": "CG", - "label": "Congo", - "value": "Congo" - }, - { - "code": "CD", - "label": "Congo, the Democratic Republic of the", - "value": "Congo, the Democratic Republic of the" - }, - { - "code": "CK", - "label": "Cook Islands", - "value": "Cook Islands" - }, - { - "code": "CR", - "label": "Costa Rica", - "value": "Costa Rica" - }, - { - "code": "HR", - "label": "Croatia", - "value": "Croatia" - }, - { - "code": "CY", - "label": "Cyprus", - "value": "Cyprus" - }, - { - "code": "CZ", - "label": "Czech Republic", - "value": "Czech Republic" - }, - { - "code": "DK", - "label": "Denmark", - "value": "Denmark" - }, - { - "code": "DJ", - "label": "Djibouti", - "value": "Djibouti" - }, - { - "code": "DM", - "label": "Dominica", - "value": "Dominica" - }, - { - "code": "DO", - "label": "Dominican Republic", - "value": "Dominican Republic" - }, - { - "code": "EC", - "label": "Ecuador", - "value": "Ecuador" - }, - { - "code": "EG", - "label": "Egypt", - "value": "Egypt" - }, - { - "code": "SV", - "label": "El Salvador", - "value": "El Salvador" - }, - { - "code": "GQ", - "label": "Equatorial Guinea", - "value": "Equatorial Guinea" - }, - { - "code": "ER", - "label": "Eritrea", - "value": "Eritrea" - }, - { - "code": "EE", - "label": "Estonia", - "value": "Estonia" - }, - { - "code": "ET", - "label": "Ethiopia", - "value": "Ethiopia" - }, - { - "code": "FK", - "label": "Falkland Islands (Malvinas)", - "value": "Falkland Islands (Malvinas)" - }, - { - "code": "FO", - "label": "Faroe Islands", - "value": "Faroe Islands" - }, - { - "code": "FJ", - "label": "Fiji", - "value": "Fiji" - }, - { - "code": "FI", - "label": "Finland", - "value": "Finland" - }, - { - "code": "FR", - "label": "France", - "value": "France" - }, - { - "code": "GF", - "label": "French Guiana", - "value": "French Guiana" - }, - { - "code": "PF", - "label": "French Polynesia", - "value": "French Polynesia" - }, - { - "code": "TF", - "label": "French Southern Territories", - "value": "French Southern Territories" - }, - { - "code": "GA", - "label": "Gabon", - "value": "Gabon" - }, - { - "code": "GM", - "label": "Gambia", - "value": "Gambia" - }, - { - "code": "GE", - "label": "Georgia", - "value": "Georgia" - }, - { - "code": "DE", - "label": "Germany", - "states": [ - { - "code": "NI", - "name": "Niedersachsen", - "value": "Niedersachsen" - }, - { - "code": "BW", - "name": "Baden-Württemberg", - "value": "Baden-Württemberg" - }, - { - "code": "BY", - "name": "Bayern", - "value": "Bayern" - }, - { - "code": "BE", - "name": "Berlin", - "value": "Berlin" - }, - { - "code": "BB", - "name": "Brandenburg", - "value": "Brandenburg" - }, - { - "code": "HB", - "name": "Bremen", - "value": "Bremen" - }, - { - "code": "HH", - "name": "Hamburg", - "value": "Hamburg" - }, - { - "code": "HE", - "name": "Hessen", - "value": "Hessen" - }, - { - "code": "MV", - "name": "Mecklenburg-Vorpommern", - "value": "Mecklenburg-Vorpommern" - }, - { - "code": "NW", - "name": "Nordrhein-Westfalen", - "value": "Nordrhein-Westfalen" - }, - { - "code": "RP", - "name": "Rheinland-Pfalz", - "value": "Rheinland-Pfalz" - }, - { - "code": "SL", - "name": "Saarland", - "value": "Saarland" - }, - { - "code": "SN", - "name": "Sachsen", - "value": "Sachsen" - }, - { - "code": "ST", - "name": "Sachsen-Anhalt", - "value": "Sachsen-Anhalt" - }, - { - "code": "SH", - "name": "Schleswig-Holstein", - "value": "Schleswig-Holstein" - }, - { - "code": "TH", - "name": "Thüringen", - "value": "Thüringen" - } - ], - "value": "Germany" - }, - { - "code": "GH", - "label": "Ghana", - "value": "Ghana" - }, - { - "code": "GI", - "label": "Gibraltar", - "value": "Gibraltar" - }, - { - "code": "GR", - "label": "Greece", - "value": "Greece" - }, - { - "code": "GL", - "label": "Greenland", - "value": "Greenland" - }, - { - "code": "GD", - "label": "Grenada", - "value": "Grenada" - }, - { - "code": "GP", - "label": "Guadeloupe", - "value": "Guadeloupe" - }, - { - "code": "GU", - "label": "Guam", - "value": "Guam" - }, - { - "code": "GT", - "label": "Guatemala", - "value": "Guatemala" - }, - { - "code": "GN", - "label": "Guinea", - "value": "Guinea" - }, - { - "code": "GW", - "label": "Guinea-Bissau", - "value": "Guinea-Bissau" - }, - { - "code": "GY", - "label": "Guyana", - "value": "Guyana" - }, - { - "code": "HT", - "label": "Haiti", - "value": "Haiti" - }, - { - "code": "HM", - "label": "Heard Island and Mcdonald Islands", - "value": "Heard Island and Mcdonald Islands" - }, - { - "code": "VA", - "label": "Holy See (Vatican City State)", - "value": "Holy See (Vatican City State)" - }, - { - "code": "HN", - "label": "Honduras", - "value": "Honduras" - }, - { - "code": "HK", - "label": "Hong Kong", - "value": "Hong Kong" - }, - { - "code": "HU", - "label": "Hungary", - "value": "Hungary" - }, - { - "code": "IS", - "label": "Iceland", - "value": "Iceland" - }, - { - "code": "IN", - "label": "India", - "states": [ - { - "code": "AP", - "name": "Andhra Pradesh", - "value": "Andhra Pradesh" - }, - { - "code": "AR", - "name": "Arunachal Pradesh", - "value": "Arunachal Pradesh" - }, - { - "code": "AS", - "name": "Assam", - "value": "Assam" - }, - { - "code": "BR", - "name": "Bihar", - "value": "Bihar" - }, - { - "code": "CT", - "name": "Chhattisgarh", - "value": "Chhattisgarh" - }, - { - "code": "GA", - "name": "Goa", - "value": "Goa" - }, - { - "code": "GJ", - "name": "Gujarat", - "value": "Gujarat" - }, - { - "code": "HR", - "name": "Haryana", - "value": "Haryana" - }, - { - "code": "HP", - "name": "Himachal Pradesh", - "value": "Himachal Pradesh" - }, - { - "code": "JK", - "name": "Jammu & Kashmir", - "value": "Jammu & Kashmir" - }, - { - "code": "JH", - "name": "Jharkhand", - "value": "Jharkhand" - }, - { - "code": "KA", - "name": "Karnataka", - "value": "Karnataka" - }, - { - "code": "KL", - "name": "Kerala", - "value": "Kerala" - }, - { - "code": "MP", - "name": "Madhya Pradesh", - "value": "Madhya Pradesh" - }, - { - "code": "MH", - "name": "Maharashtra", - "value": "Maharashtra" - }, - { - "code": "MN", - "name": "Manipur", - "value": "Manipur" - }, - { - "code": "ML", - "name": "Meghalaya", - "value": "Meghalaya" - }, - { - "code": "MZ", - "name": "Mizoram", - "value": "Mizoram" - }, - { - "code": "NL", - "name": "Nagaland", - "value": "Nagaland" - }, - { - "code": "OR", - "name": "Orissa", - "value": "Orissa" - }, - { - "code": "PB", - "name": "Punjab", - "value": "Punjab" - }, - { - "code": "RJ", - "name": "Rajasthan", - "value": "Rajasthan" - }, - { - "code": "SK", - "name": "Sikkim", - "value": "Sikkim" - }, - { - "code": "TN", - "name": "Tamil Nadu", - "value": "Tamil Nadu" - }, - { - "code": "TR", - "name": "Tripura", - "value": "Tripura" - }, - { - "code": "UT", - "name": "Uttarakhand", - "value": "Uttarakhand" - }, - { - "code": "UP", - "name": "Uttar Pradesh", - "value": "Uttar Pradesh" - }, - { - "code": "WB", - "name": "West Bengal", - "value": "West Bengal" - }, - { - "code": "AN", - "name": "Andaman and Nicobar Islands", - "value": "Andaman and Nicobar Islands" - }, - { - "code": "CH", - "name": "Chandigarh", - "value": "Chandigarh" - }, - { - "code": "DN", - "name": "Dadra and Nagar Haveli", - "value": "Dadra and Nagar Haveli" - }, - { - "code": "DD", - "name": "Daman & Diu", - "value": "Daman & Diu" - }, - { - "code": "LD", - "name": "Lakshadweep", - "value": "Lakshadweep" - }, - { - "code": "DL", - "name": "Delhi", - "value": "Delhi" - }, - { - "code": "PY", - "name": "Pondicherry", - "value": "Pondicherry" - }, - { - "code": "TS", - "name": "Telangana", - "value": "Telangana" - } - ], - "value": "India" - }, - { - "code": "ID", - "label": "Indonesia", - "states": [ - { - "code": "BA", - "name": "Bali", - "value": "Bali" - }, - { - "code": "BB", - "name": "Bangka Belitung", - "value": "Bangka Belitung" - }, - { - "code": "BT", - "name": "Banten", - "value": "Banten" - }, - { - "code": "BE", - "name": "Bengkulu", - "value": "Bengkulu" - }, - { - "code": "AC", - "name": "Daista Aceh", - "value": "Daista Aceh" - }, - { - "code": "JK", - "name": "Jakarta", - "value": "Jakarta" - }, - { - "code": "SU", - "name": "Sumatera Utara", - "value": "Sumatera Utara" - }, - { - "code": "SB", - "name": "Sumatera Barat", - "value": "Sumatera Barat" - }, - { - "code": "RI", - "name": "Riau", - "value": "Riau" - }, - { - "code": "JA", - "name": "Jambi", - "value": "Jambi" - }, - { - "code": "SS", - "name": "Sumatera Selatan", - "value": "Sumatera Selatan" - }, - { - "code": "LA", - "name": "Lampung", - "value": "Lampung" - }, - { - "code": "JB", - "name": "Jawa Barat", - "value": "Jawa Barat" - }, - { - "code": "JT", - "name": "Jawa Tengah", - "value": "Jawa Tengah" - }, - { - "code": "YO", - "name": "Daista Yogyakarta", - "value": "Daista Yogyakarta" - }, - { - "code": "JI", - "name": "Jawa Timur", - "value": "Jawa Timur" - }, - { - "code": "KB", - "name": "Kalimantan Barat", - "value": "Kalimantan Barat" - }, - { - "code": "KT", - "name": "Kalimantan Tengah", - "value": "Kalimantan Tengah" - }, - { - "code": "KI", - "name": "Kalimantan Timur", - "value": "Kalimantan Timur" - }, - { - "code": "KS", - "name": "Kalimantan Selatan", - "value": "Kalimantan Selatan" - }, - { - "code": "NB", - "name": "Nusa Tenggara Barat", - "value": "Nusa Tenggara Barat" - }, - { - "code": "NT", - "name": "Nusa Tenggara Timur", - "value": "Nusa Tenggara Timur" - }, - { - "code": "SN", - "name": "Sulawesi Selatan", - "value": "Sulawesi Selatan" - }, - { - "code": "ST", - "name": "Sulawesi Tengah", - "value": "Sulawesi Tengah" - }, - { - "code": "SA", - "name": "Sulawesi Utara", - "value": "Sulawesi Utara" - }, - { - "code": "SG", - "name": "Sulawesi Tenggara", - "value": "Sulawesi Tenggara" - }, - { - "code": "MA", - "name": "Maluku", - "value": "Maluku" - }, - { - "code": "MU", - "name": "Maluku Utara", - "value": "Maluku Utara" - }, - { - "code": "IJ", - "name": "Irian Jaya Timur", - "value": "Irian Jaya Timur" - }, - { - "code": "IT", - "name": "Irian Jaya Tengah", - "value": "Irian Jaya Tengah" - }, - { - "code": "IB", - "name": "Irian Jawa Barat", - "value": "Irian Jawa Barat" - }, - { - "code": "GO", - "name": "Gorontalo", - "value": "Gorontalo" - } - ], - "value": "Indonesia" - }, - { - "code": "IQ", - "label": "Iraq", - "value": "Iraq" - }, - { - "code": "IE", - "label": "Ireland", - "states": [ - { - "code": "CW", - "name": "Carlow", - "value": "Carlow" - }, - { - "code": "CN", - "name": "Cavan", - "value": "Cavan" - }, - { - "code": "CE", - "name": "Clare", - "value": "Clare" - }, - { - "code": "C", - "name": "Cork", - "value": "Cork" - }, - { - "code": "DL", - "name": "Donegal", - "value": "Donegal" - }, - { - "code": "D", - "name": "Dublin", - "value": "Dublin" - }, - { - "code": "G", - "name": "Galway", - "value": "Galway" - }, - { - "code": "KY", - "name": "Kerry", - "value": "Kerry" - }, - { - "code": "KE", - "name": "Kildare", - "value": "Kildare" - }, - { - "code": "KK", - "name": "Kilkenny", - "value": "Kilkenny" - }, - { - "code": "LS", - "name": "Laois", - "value": "Laois" - }, - { - "code": "LM", - "name": "Leitrim", - "value": "Leitrim" - }, - { - "code": "LK", - "name": "Limerick", - "value": "Limerick" - }, - { - "code": "LD", - "name": "Longford", - "value": "Longford" - }, - { - "code": "LH", - "name": "Louth", - "value": "Louth" - }, - { - "code": "MO", - "name": "Mayo", - "value": "Mayo" - }, - { - "code": "MH", - "name": "Meath", - "value": "Meath" - }, - { - "code": "MN", - "name": "Monaghan", - "value": "Monaghan" - }, - { - "code": "OY", - "name": "Offaly", - "value": "Offaly" - }, - { - "code": "RN", - "name": "Roscommon", - "value": "Roscommon" - }, - { - "code": "SO", - "name": "Sligo", - "value": "Sligo" - }, - { - "code": "TA", - "name": "Tipperary", - "value": "Tipperary" - }, - { - "code": "WD", - "name": "Waterford", - "value": "Waterford" - }, - { - "code": "WH", - "name": "Westmeath", - "value": "Westmeath" - }, - { - "code": "WX", - "name": "Wexford", - "value": "Wexford" - }, - { - "code": "WW", - "name": "Wicklow", - "value": "Wicklow" - } - ], - "value": "Ireland" - }, - { - "code": "IL", - "label": "Israel", - "value": "Israel" - }, - { - "code": "IT", - "label": "Italy", - "value": "Italy" - }, - { - "code": "JM", - "label": "Jamaica", - "value": "Jamaica" - }, - { - "code": "JP", - "label": "Japan", - "value": "Japan" - }, - { - "code": "JO", - "label": "Jordan", - "value": "Jordan" - }, - { - "code": "KZ", - "label": "Kazakhstan", - "value": "Kazakhstan" - }, - { - "code": "KE", - "label": "Kenya", - "value": "Kenya" - }, - { - "code": "KI", - "label": "Kiribati", - "value": "Kiribati" - }, - { - "code": "KR", - "label": "Korea, Republic of", - "value": "Korea, Republic of" - }, - { - "code": "KW", - "label": "Kuwait", - "value": "Kuwait" - }, - { - "code": "KG", - "label": "Kyrgyzstan", - "value": "Kyrgyzstan" - }, - { - "code": "LV", - "label": "Latvia", - "value": "Latvia" - }, - { - "code": "LB", - "label": "Lebanon", - "value": "Lebanon" - }, - { - "code": "LS", - "label": "Lesotho", - "value": "Lesotho" - }, - { - "code": "LR", - "label": "Liberia", - "value": "Liberia" - }, - { - "code": "LY", - "label": "Libya", - "value": "Libya" - }, - { - "code": "LI", - "label": "Liechtenstein", - "value": "Liechtenstein" - }, - { - "code": "LT", - "label": "Lithuania", - "value": "Lithuania" - }, - { - "code": "LU", - "label": "Luxembourg", - "value": "Luxembourg" - }, - { - "code": "MO", - "label": "Macao", - "value": "Macao" - }, - { - "code": "MK", - "label": "Macedonia, the Former Yugoslav Republic of", - "value": "Macedonia, the Former Yugoslav Republic of" - }, - { - "code": "MG", - "label": "Madagascar", - "value": "Madagascar" - }, - { - "code": "MW", - "label": "Malawi", - "value": "Malawi" - }, - { - "code": "MY", - "label": "Malaysia", - "states": [ - { - "code": "01", - "name": "Johor", - "value": "Johor" - }, - { - "code": "02", - "name": "Kedah", - "value": "Kedah" - }, - { - "code": "03", - "name": "Kelantan", - "value": "Kelantan" - }, - { - "code": "04", - "name": "Melaka", - "value": "Melaka" - }, - { - "code": "05", - "name": "Negeri Sembilan", - "value": "Negeri Sembilan" - }, - { - "code": "06", - "name": "Pahang", - "value": "Pahang" - }, - { - "code": "07", - "name": "Pulau Pinang", - "value": "Pulau Pinang" - }, - { - "code": "08", - "name": "Perak", - "value": "Perak" - }, - { - "code": "09", - "name": "Perlis", - "value": "Perlis" - }, - { - "code": "10", - "name": "Selangor", - "value": "Selangor" - }, - { - "code": "11", - "name": "Terengganu", - "value": "Terengganu" - }, - { - "code": "12", - "name": "Sabah", - "value": "Sabah" - }, - { - "code": "13", - "name": "Sarawak", - "value": "Sarawak" - }, - { - "code": "14", - "name": "Kuala Lumpur", - "value": "Kuala Lumpur" - }, - { - "code": "15", - "name": "Labuan", - "value": "Labuan" - }, - { - "code": "16", - "name": "Putrajaya", - "value": "Putrajaya" - } - ], - "value": "Malaysia" - }, - { - "code": "MV", - "label": "Maldives", - "value": "Maldives" - }, - { - "code": "ML", - "label": "Mali", - "value": "Mali" - }, - { - "code": "MT", - "label": "Malta", - "value": "Malta" - }, - { - "code": "MH", - "label": "Marshall Islands", - "value": "Marshall Islands" - }, - { - "code": "MQ", - "label": "Martinique", - "value": "Martinique" - }, - { - "code": "MR", - "label": "Mauritania", - "value": "Mauritania" - }, - { - "code": "MU", - "label": "Mauritius", - "value": "Mauritius" - }, - { - "code": "YT", - "label": "Mayotte", - "value": "Mayotte" - }, - { - "code": "MX", - "label": "Mexico", - "states": [ - { - "code": "AGU", - "name": "Aguascalientes", - "value": "Aguascalientes" - }, - { - "code": "BCN", - "name": "Baja California", - "value": "Baja California" - }, - { - "code": "BCS", - "name": "Baja California Sur", - "value": "Baja California Sur" - }, - { - "code": "CAM", - "name": "Campeche", - "value": "Campeche" - }, - { - "code": "COA", - "name": "Coahuila", - "value": "Coahuila" - }, - { - "code": "COL", - "name": "Colima", - "value": "Colima" - }, - { - "code": "CHP", - "name": "Chiapas", - "value": "Chiapas" - }, - { - "code": "CHH", - "name": "Chihuahua", - "value": "Chihuahua" - }, - { - "code": "DUR", - "name": "Durango", - "value": "Durango" - }, - { - "code": "GUA", - "name": "Guanajuato", - "value": "Guanajuato" - }, - { - "code": "GRO", - "name": "Guerrero", - "value": "Guerrero" - }, - { - "code": "HID", - "name": "Hidalgo", - "value": "Hidalgo" - }, - { - "code": "JAL", - "name": "Jalisco", - "value": "Jalisco" - }, - { - "code": "CMX", - "name": "Ciudad de México", - "value": "Ciudad de México" - }, - { - "code": "MEX", - "name": "México", - "value": "México" - }, - { - "code": "MIC", - "name": "Michoacán", - "value": "Michoacán" - }, - { - "code": "MOR", - "name": "Morelos", - "value": "Morelos" - }, - { - "code": "NAY", - "name": "Nayarit", - "value": "Nayarit" - }, - { - "code": "NLE", - "name": "Nuevo León", - "value": "Nuevo León" - }, - { - "code": "OAX", - "name": "Oaxaca", - "value": "Oaxaca" - }, - { - "code": "PUE", - "name": "Puebla", - "value": "Puebla" - }, - { - "code": "QUE", - "name": "Querétaro", - "value": "Querétaro" - }, - { - "code": "ROO", - "name": "Quintana Roo", - "value": "Quintana Roo" - }, - { - "code": "SLP", - "name": "San Luis Potosí", - "value": "San Luis Potosí" - }, - { - "code": "SIN", - "name": "Sinaloa", - "value": "Sinaloa" - }, - { - "code": "SON", - "name": "Sonora", - "value": "Sonora" - }, - { - "code": "TAB", - "name": "Tabasco", - "value": "Tabasco" - }, - { - "code": "TAM", - "name": "Tamaulipas", - "value": "Tamaulipas" - }, - { - "code": "TLA", - "name": "Tlaxcala", - "value": "Tlaxcala" - }, - { - "code": "VER", - "name": "Veracruz", - "value": "Veracruz" - }, - { - "code": "YUC", - "name": "Yucatán", - "value": "Yucatán" - }, - { - "code": "ZAC", - "name": "Zacatecas", - "value": "Zacatecas" - } - ], - "value": "Mexico" - }, - { - "code": "FM", - "label": "Micronesia, Federated States of", - "value": "Micronesia, Federated States of" - }, - { - "code": "MD", - "label": "Moldova, Republic of", - "value": "Moldova, Republic of" - }, - { - "code": "MC", - "label": "Monaco", - "value": "Monaco" - }, - { - "code": "MN", - "label": "Mongolia", - "value": "Mongolia" - }, - { - "code": "MS", - "label": "Montserrat", - "value": "Montserrat" - }, - { - "code": "MA", - "label": "Morocco", - "value": "Morocco" - }, - { - "code": "MZ", - "label": "Mozambique", - "value": "Mozambique" - }, - { - "code": "MM", - "label": "Myanmar", - "states": [ - { - "code": "07", - "name": "Ayeyarwady", - "value": "Ayeyarwady" - }, - { - "code": "02", - "name": "Bago", - "value": "Bago" - }, - { - "code": "14", - "name": "Chin", - "value": "Chin" - }, - { - "code": "11", - "name": "Kachin", - "value": "Kachin" - }, - { - "code": "12", - "name": "Kayah", - "value": "Kayah" - }, - { - "code": "13", - "name": "Kayin", - "value": "Kayin" - }, - { - "code": "03", - "name": "Magway", - "value": "Magway" - }, - { - "code": "04", - "name": "Mandalay", - "value": "Mandalay" - }, - { - "code": "15", - "name": "Mon", - "value": "Mon" - }, - { - "code": "16", - "name": "Rakhine", - "value": "Rakhine" - }, - { - "code": "17", - "name": "Shan", - "value": "Shan" - }, - { - "code": "01", - "name": "Sagaing", - "value": "Sagaing" - }, - { - "code": "05", - "name": "Tanintharyi", - "value": "Tanintharyi" - }, - { - "code": "06", - "name": "Yangon", - "value": "Yangon" - }, - { - "code": "18", - "name": "Naypyidaw Union", - "value": "Naypyidaw Union" - } - ], - "value": "Myanmar" - }, - { - "code": "NA", - "label": "Namibia", - "value": "Namibia" - }, - { - "code": "NR", - "label": "Nauru", - "value": "Nauru" - }, - { - "code": "NP", - "label": "Nepal", - "value": "Nepal" - }, - { - "code": "NL", - "label": "Netherlands", - "value": "Netherlands" - }, - { - "code": "AN", - "label": "Netherlands Antilles", - "value": "Netherlands Antilles" - }, - { - "code": "NC", - "label": "New Caledonia", - "value": "New Caledonia" - }, - { - "code": "NZ", - "label": "New Zealand", - "value": "New Zealand" - }, - { - "code": "NI", - "label": "Nicaragua", - "value": "Nicaragua" - }, - { - "code": "NE", - "label": "Niger", - "value": "Niger" - }, - { - "code": "NG", - "label": "Nigeria", - "value": "Nigeria" - }, - { - "code": "NU", - "label": "Niue", - "value": "Niue" - }, - { - "code": "NF", - "label": "Norfolk Island", - "value": "Norfolk Island" - }, - { - "code": "MP", - "label": "Northern Mariana Islands", - "value": "Northern Mariana Islands" - }, - { - "code": "NO", - "label": "Norway", - "value": "Norway" - }, - { - "code": "OM", - "label": "Oman", - "value": "Oman" - }, - { - "code": "PK", - "label": "Pakistan", - "value": "Pakistan" - }, - { - "code": "PW", - "label": "Palau", - "value": "Palau" - }, - { - "code": "PS", - "label": "Palestinian Territory, Occupied", - "value": "Palestinian Territory, Occupied" - }, - { - "code": "PA", - "label": "Panama", - "value": "Panama" - }, - { - "code": "PG", - "label": "Papua New Guinea", - "value": "Papua New Guinea" - }, - { - "code": "PY", - "label": "Paraguay", - "value": "Paraguay" - }, - { - "code": "PE", - "label": "Peru", - "value": "Peru" - }, - { - "code": "PH", - "label": "Philippines", - "value": "Philippines" - }, - { - "code": "PN", - "label": "Pitcairn", - "value": "Pitcairn" - }, - { - "code": "PL", - "label": "Poland", - "value": "Poland" - }, - { - "code": "PT", - "label": "Portugal", - "value": "Portugal" - }, - { - "code": "PR", - "label": "Puerto Rico", - "value": "Puerto Rico" - }, - { - "code": "QA", - "label": "Qatar", - "value": "Qatar" - }, - { - "code": "RE", - "label": "Reunion", - "value": "Reunion" - }, - { - "code": "RO", - "label": "Romania", - "value": "Romania" - }, - { - "code": "RU", - "label": "Russian Federation", - "value": "Russian Federation" - }, - { - "code": "RW", - "label": "Rwanda", - "value": "Rwanda" - }, - { - "code": "SH", - "label": "Saint Helena", - "value": "Saint Helena" - }, - { - "code": "KN", - "label": "Saint Kitts and Nevis", - "value": "Saint Kitts and Nevis" - }, - { - "code": "LC", - "label": "Saint Lucia", - "value": "Saint Lucia" - }, - { - "code": "PM", - "label": "Saint Pierre and Miquelon", - "value": "Saint Pierre and Miquelon" - }, - { - "code": "VC", - "label": "Saint Vincent and the Grenadines", - "value": "Saint Vincent and the Grenadines" - }, - { - "code": "WS", - "label": "Samoa", - "value": "Samoa" - }, - { - "code": "SM", - "label": "San Marino", - "value": "San Marino" - }, - { - "code": "ST", - "label": "Sao Tome and Principe", - "value": "Sao Tome and Principe" - }, - { - "code": "SA", - "label": "Saudi Arabia", - "value": "Saudi Arabia" - }, - { - "code": "SN", - "label": "Senegal", - "value": "Senegal" - }, - { - "code": "RS", - "label": "Serbia", - "value": "Serbia" - }, - { - "code": "SC", - "label": "Seychelles", - "value": "Seychelles" - }, - { - "code": "SL", - "label": "Sierra Leone", - "value": "Sierra Leone" - }, - { - "code": "SG", - "label": "Singapore", - "value": "Singapore" - }, - { - "code": "SK", - "label": "Slovakia", - "value": "Slovakia" - }, - { - "code": "SI", - "label": "Slovenia", - "value": "Slovenia" - }, - { - "code": "SB", - "label": "Solomon Islands", - "value": "Solomon Islands" - }, - { - "code": "SO", - "label": "Somalia", - "value": "Somalia" - }, - { - "code": "ZA", - "label": "South Africa", - "states": [ - { - "code": "EC", - "name": "Eastern Cape", - "value": "Eastern Cape" - }, - { - "code": "FS", - "name": "Free State", - "value": "Free State" - }, - { - "code": "GT", - "name": "Gauteng", - "value": "Gauteng" - }, - { - "code": "NL", - "name": "KwaZulu-Natal", - "value": "KwaZulu-Natal" - }, - { - "code": "LP", - "name": "Limpopo", - "value": "Limpopo" - }, - { - "code": "MP", - "name": "Mpumalanga", - "value": "Mpumalanga" - }, - { - "code": "NC", - "name": "Northern Cape", - "value": "Northern Cape" - }, - { - "code": "NW", - "name": "North-West", - "value": "North-West" - }, - { - "code": "WC", - "name": "Western Cape", - "value": "Western Cape" - } - ], - "value": "South Africa" - }, - { - "code": "GS", - "label": "South Georgia and the South Sandwich Islands", - "value": "South Georgia and the South Sandwich Islands" - }, - { - "code": "ES", - "label": "Spain", - "states": [ - { - "code": "C", - "name": "A Coruña", - "value": "A Coruña" - }, - { - "code": "VI", - "name": "Alava", - "value": "Alava" - }, - { - "code": "AB", - "name": "Albacete", - "value": "Albacete" - }, - { - "code": "A", - "name": "Alicante", - "value": "Alicante" - }, - { - "code": "AL", - "name": "Almeria", - "value": "Almeria" - }, - { - "code": "O", - "name": "Asturias", - "value": "Asturias" - }, - { - "code": "AV", - "name": "Avila", - "value": "Avila" - }, - { - "code": "BA", - "name": "Badajoz", - "value": "Badajoz" - }, - { - "code": "PM", - "name": "Baleares", - "value": "Baleares" - }, - { - "code": "B", - "name": "Barcelona", - "value": "Barcelona" - }, - { - "code": "BU", - "name": "Burgos", - "value": "Burgos" - }, - { - "code": "CC", - "name": "Caceres", - "value": "Caceres" - }, - { - "code": "CA", - "name": "Cadiz", - "value": "Cadiz" - }, - { - "code": "S", - "name": "Cantabria", - "value": "Cantabria" - }, - { - "code": "CS", - "name": "Castellon", - "value": "Castellon" - }, - { - "code": "CE", - "name": "Ceuta", - "value": "Ceuta" - }, - { - "code": "CR", - "name": "Ciudad Real", - "value": "Ciudad Real" - }, - { - "code": "CO", - "name": "Cordoba", - "value": "Cordoba" - }, - { - "code": "CU", - "name": "Cuenca", - "value": "Cuenca" - }, - { - "code": "GI", - "name": "Girona", - "value": "Girona" - }, - { - "code": "GR", - "name": "Granada", - "value": "Granada" - }, - { - "code": "GU", - "name": "Guadalajara", - "value": "Guadalajara" - }, - { - "code": "SS", - "name": "Guipuzcoa", - "value": "Guipuzcoa" - }, - { - "code": "H", - "name": "Huelva", - "value": "Huelva" - }, - { - "code": "HU", - "name": "Huesca", - "value": "Huesca" - }, - { - "code": "J", - "name": "Jaen", - "value": "Jaen" - }, - { - "code": "LO", - "name": "La Rioja", - "value": "La Rioja" - }, - { - "code": "GC", - "name": "Las Palmas", - "value": "Las Palmas" - }, - { - "code": "LE", - "name": "Leon", - "value": "Leon" - }, - { - "code": "L", - "name": "Lleida", - "value": "Lleida" - }, - { - "code": "LU", - "name": "Lugo", - "value": "Lugo" - }, - { - "code": "M", - "name": "Madrid", - "value": "Madrid" - }, - { - "code": "MA", - "name": "Malaga", - "value": "Malaga" - }, - { - "code": "ML", - "name": "Melilla", - "value": "Melilla" - }, - { - "code": "MU", - "name": "Murcia", - "value": "Murcia" - }, - { - "code": "NA", - "name": "Navarra", - "value": "Navarra" - }, - { - "code": "OR", - "name": "Ourense", - "value": "Ourense" - }, - { - "code": "P", - "name": "Palencia", - "value": "Palencia" - }, - { - "code": "PO", - "name": "Pontevedra", - "value": "Pontevedra" - }, - { - "code": "SA", - "name": "Salamanca", - "value": "Salamanca" - }, - { - "code": "TF", - "name": "Santa Cruz de Tenerife", - "value": "Santa Cruz de Tenerife" - }, - { - "code": "SG", - "name": "Segovia", - "value": "Segovia" - }, - { - "code": "SE", - "name": "Sevilla", - "value": "Sevilla" - }, - { - "code": "SO", - "name": "Soria", - "value": "Soria" - }, - { - "code": "T", - "name": "Tarragona", - "value": "Tarragona" - }, - { - "code": "TE", - "name": "Teruel", - "value": "Teruel" - }, - { - "code": "TO", - "name": "Toledo", - "value": "Toledo" - }, - { - "code": "V", - "name": "Valencia", - "value": "Valencia" - }, - { - "code": "VA", - "name": "Valladolid", - "value": "Valladolid" - }, - { - "code": "BI", - "name": "Vizcaya", - "value": "Vizcaya" - }, - { - "code": "ZA", - "name": "Zamora", - "value": "Zamora" - }, - { - "code": "Z", - "name": "Zaragoza", - "value": "Zaragoza" - } - ], - "value": "Spain" - }, - { - "code": "LK", - "label": "Sri Lanka", - "value": "Sri Lanka" - }, - { - "code": "SD", - "label": "Sudan", - "value": "Sudan" - }, - { - "code": "SR", - "label": "Suriname", - "value": "Suriname" - }, - { - "code": "SJ", - "label": "Svalbard and Jan Mayen", - "value": "Svalbard and Jan Mayen" - }, - { - "code": "SZ", - "label": "Swaziland", - "value": "Swaziland" - }, - { - "code": "SE", - "label": "Sweden", - "value": "Sweden" - }, - { - "code": "CH", - "label": "Switzerland", - "states": [ - { - "code": "AG", - "name": "Aargau", - "value": "Aargau" - }, - { - "code": "AI", - "name": "Appenzell Innerrhoden", - "value": "Appenzell Innerrhoden" - }, - { - "code": "AR", - "name": "Appenzell Ausserrhoden", - "value": "Appenzell Ausserrhoden" - }, - { - "code": "BE", - "name": "Bern", - "value": "Bern" - }, - { - "code": "BL", - "name": "Basel-Landschaft", - "value": "Basel-Landschaft" - }, - { - "code": "BS", - "name": "Basel-Stadt", - "value": "Basel-Stadt" - }, - { - "code": "FR", - "name": "Fribourg", - "value": "Fribourg" - }, - { - "code": "GE", - "name": "Geneva", - "value": "Geneva" - }, - { - "code": "GL", - "name": "Glarus", - "value": "Glarus" - }, - { - "code": "GR", - "name": "Graubünden", - "value": "Graubünden" - }, - { - "code": "JU", - "name": "Jura", - "value": "Jura" - }, - { - "code": "LU", - "name": "Luzern", - "value": "Luzern" - }, - { - "code": "NE", - "name": "Neuchâtel", - "value": "Neuchâtel" - }, - { - "code": "NW", - "name": "Nidwalden", - "value": "Nidwalden" - }, - { - "code": "OW", - "name": "Obwalden", - "value": "Obwalden" - }, - { - "code": "SG", - "name": "St. Gallen", - "value": "St. Gallen" - }, - { - "code": "SH", - "name": "Schaffhausen", - "value": "Schaffhausen" - }, - { - "code": "SO", - "name": "Solothurn", - "value": "Solothurn" - }, - { - "code": "SZ", - "name": "Schwyz", - "value": "Schwyz" - }, - { - "code": "TG", - "name": "Thurgau", - "value": "Thurgau" - }, - { - "code": "TI", - "name": "Ticino", - "value": "Ticino" - }, - { - "code": "UR", - "name": "Uri", - "value": "Uri" - }, - { - "code": "VD", - "name": "Vaud", - "value": "Vaud" - }, - { - "code": "VS", - "name": "Valais", - "value": "Valais" - }, - { - "code": "ZG", - "name": "Zug", - "value": "Zug" - }, - { - "code": "ZH", - "name": "Zürich", - "value": "Zürich" - } - ], - "value": "Switzerland" - }, - { - "code": "TW", - "label": "Taiwan", - "value": "Taiwan" - }, - { - "code": "TJ", - "label": "Tajikistan", - "value": "Tajikistan" - }, - { - "code": "TZ", - "label": "Tanzania, United Republic of", - "value": "Tanzania, United Republic of" - }, - { - "code": "TH", - "label": "Thailand", - "value": "Thailand" - }, - { - "code": "TL", - "label": "Timor-Leste", - "value": "Timor-Leste" - }, - { - "code": "TG", - "label": "Togo", - "value": "Togo" - }, - { - "code": "TK", - "label": "Tokelau", - "value": "Tokelau" - }, - { - "code": "TO", - "label": "Tonga", - "value": "Tonga" - }, - { - "code": "TT", - "label": "Trinidad and Tobago", - "value": "Trinidad and Tobago" - }, - { - "code": "TN", - "label": "Tunisia", - "value": "Tunisia" - }, - { - "code": "TR", - "label": "Turkey", - "value": "Turkey" - }, - { - "code": "TM", - "label": "Turkmenistan", - "value": "Turkmenistan" - }, - { - "code": "TC", - "label": "Turks and Caicos Islands", - "value": "Turks and Caicos Islands" - }, - { - "code": "TV", - "label": "Tuvalu", - "value": "Tuvalu" - }, - { - "code": "UG", - "label": "Uganda", - "value": "Uganda" - }, - { - "code": "UA", - "label": "Ukraine", - "value": "Ukraine" - }, - { - "code": "AE", - "label": "United Arab Emirates", - "states": [ - { - "code": "AZ", - "name": "Abu Dhabi", - "value": "Abu Dhabi" - }, - { - "code": "AJ", - "name": "Ajman", - "value": "Ajman" - }, - { - "code": "FU", - "name": "Fujairah", - "value": "Fujairah" - }, - { - "code": "SH", - "name": "Sharjah", - "value": "Sharjah" - }, - { - "code": "DU", - "name": "Dubai", - "value": "Dubai" - }, - { - "code": "RK", - "name": "Ras al-Khaimah", - "value": "Ras al-Khaimah" - }, - { - "code": "UQ", - "name": "Umm al-Quwain", - "value": "Umm al-Quwain" - } - ], - "value": "United Arab Emirates" - }, - { - "code": "GB", - "label": "United Kingdom", - "value": "United Kingdom" - }, - { - "code": "US", - "label": "United States", - "states": [ - { - "code": "AL", - "name": "Alabama", - "value": "Alabama" - }, - { - "code": "AK", - "name": "Alaska", - "value": "Alaska" - }, - { - "code": "AS", - "name": "American Samoa", - "value": "American Samoa" - }, - { - "code": "AZ", - "name": "Arizona", - "value": "Arizona" - }, - { - "code": "AR", - "name": "Arkansas", - "value": "Arkansas" - }, - { - "code": "AE", - "name": "Armed Forces Africa", - "value": "Armed Forces Africa" - }, - { - "code": "AA", - "name": "Armed Forces Americas", - "value": "Armed Forces Americas" - }, - { - "code": "AE", - "name": "Armed Forces Canada", - "value": "Armed Forces Canada" - }, - { - "code": "AE", - "name": "Armed Forces Europe", - "value": "Armed Forces Europe" - }, - { - "code": "AE", - "name": "Armed Forces Middle East", - "value": "Armed Forces Middle East" - }, - { - "code": "AP", - "name": "Armed Forces Pacific", - "value": "Armed Forces Pacific" - }, - { - "code": "CA", - "name": "California", - "value": "California" - }, - { - "code": "CO", - "name": "Colorado", - "value": "Colorado" - }, - { - "code": "CT", - "name": "Connecticut", - "value": "Connecticut" - }, - { - "code": "DE", - "name": "Delaware", - "value": "Delaware" - }, - { - "code": "DC", - "name": "District of Columbia", - "value": "District of Columbia" - }, - { - "code": "FM", - "name": "Federated States Of Micronesia", - "value": "Federated States Of Micronesia" - }, - { - "code": "FL", - "name": "Florida", - "value": "Florida" - }, - { - "code": "GA", - "name": "Georgia", - "value": "Georgia" - }, - { - "code": "GU", - "name": "Guam", - "value": "Guam" - }, - { - "code": "HI", - "name": "Hawaii", - "value": "Hawaii" - }, - { - "code": "ID", - "name": "Idaho", - "value": "Idaho" - }, - { - "code": "IL", - "name": "Illinois", - "value": "Illinois" - }, - { - "code": "IN", - "name": "Indiana", - "value": "Indiana" - }, - { - "code": "IA", - "name": "Iowa", - "value": "Iowa" - }, - { - "code": "KS", - "name": "Kansas", - "value": "Kansas" - }, - { - "code": "KY", - "name": "Kentucky", - "value": "Kentucky" - }, - { - "code": "LA", - "name": "Louisiana", - "value": "Louisiana" - }, - { - "code": "ME", - "name": "Maine", - "value": "Maine" - }, - { - "code": "MH", - "name": "Marshall Islands", - "value": "Marshall Islands" - }, - { - "code": "MD", - "name": "Maryland", - "value": "Maryland" - }, - { - "code": "MA", - "name": "Massachusetts", - "value": "Massachusetts" - }, - { - "code": "MI", - "name": "Michigan", - "value": "Michigan" - }, - { - "code": "MN", - "name": "Minnesota", - "value": "Minnesota" - }, - { - "code": "MS", - "name": "Mississippi", - "value": "Mississippi" - }, - { - "code": "MO", - "name": "Missouri", - "value": "Missouri" - }, - { - "code": "MT", - "name": "Montana", - "value": "Montana" - }, - { - "code": "NE", - "name": "Nebraska", - "value": "Nebraska" - }, - { - "code": "NV", - "name": "Nevada", - "value": "Nevada" - }, - { - "code": "NH", - "name": "New Hampshire", - "value": "New Hampshire" - }, - { - "code": "NJ", - "name": "New Jersey", - "value": "New Jersey" - }, - { - "code": "NM", - "name": "New Mexico", - "value": "New Mexico" - }, - { - "code": "NY", - "name": "New York", - "value": "New York" - }, - { - "code": "NC", - "name": "North Carolina", - "value": "North Carolina" - }, - { - "code": "ND", - "name": "North Dakota", - "value": "North Dakota" - }, - { - "code": "MP", - "name": "Northern Mariana Islands", - "value": "Northern Mariana Islands" - }, - { - "code": "OH", - "name": "Ohio", - "value": "Ohio" - }, - { - "code": "OK", - "name": "Oklahoma", - "value": "Oklahoma" - }, - { - "code": "OR", - "name": "Oregon", - "value": "Oregon" - }, - { - "code": "PW", - "name": "Palau", - "value": "Palau" - }, - { - "code": "PA", - "name": "Pennsylvania", - "value": "Pennsylvania" - }, - { - "code": "PR", - "name": "Puerto Rico", - "value": "Puerto Rico" - }, - { - "code": "RI", - "name": "Rhode Island", - "value": "Rhode Island" - }, - { - "code": "SC", - "name": "South Carolina", - "value": "South Carolina" - }, - { - "code": "SD", - "name": "South Dakota", - "value": "South Dakota" - }, - { - "code": "TN", - "name": "Tennessee", - "value": "Tennessee" - }, - { - "code": "TX", - "name": "Texas", - "value": "Texas" - }, - { - "code": "UT", - "name": "Utah", - "value": "Utah" - }, - { - "code": "VT", - "name": "Vermont", - "value": "Vermont" - }, - { - "code": "VI", - "name": "Virgin Islands", - "value": "Virgin Islands" - }, - { - "code": "VA", - "name": "Virginia", - "value": "Virginia" - }, - { - "code": "WA", - "name": "Washington", - "value": "Washington" - }, - { - "code": "WV", - "name": "West Virginia", - "value": "West Virginia" - }, - { - "code": "WI", - "name": "Wisconsin", - "value": "Wisconsin" - }, - { - "code": "WY", - "name": "Wyoming", - "value": "Wyoming" - } - ], - "value": "United States" - }, - { - "code": "UM", - "label": "United States Minor Outlying Islands", - "value": "United States Minor Outlying Islands" - }, - { - "code": "UY", - "label": "Uruguay", - "value": "Uruguay" - }, - { - "code": "UZ", - "label": "Uzbekistan", - "value": "Uzbekistan" - }, - { - "code": "VU", - "label": "Vanuatu", - "value": "Vanuatu" - }, - { - "code": "VE", - "label": "Venezuela", - "value": "Venezuela" - }, - { - "code": "VN", - "label": "Viet Nam", - "value": "Viet Nam" - }, - { - "code": "VG", - "label": "Virgin Islands, British", - "value": "Virgin Islands, British" - }, - { - "code": "VI", - "label": "Virgin Islands, U.S.", - "value": "Virgin Islands, U.S." - }, - { - "code": "WF", - "label": "Wallis and Futuna", - "value": "Wallis and Futuna" - }, - { - "code": "EH", - "label": "Western Sahara", - "value": "Western Sahara" - }, - { - "code": "YE", - "label": "Yemen", - "value": "Yemen" - }, - { - "code": "ZM", - "label": "Zambia", - "value": "Zambia" - }, - { - "code": "ZW", - "label": "Zimbabwe", - "value": "Zimbabwe" - }, - { - "code": "IM", - "label": "Isle of Man", - "value": "Isle of Man" - }, - { - "code": "JE", - "label": "Jersey", - "value": "Jersey" - }, - { - "code": "GG", - "label": "Guernsey", - "value": "Guernsey" - }, - { - "code": "LA", - "label": "Lao People's Democratic Republic", - "value": "Lao People's Democratic Republic" - }, - { - "code": "ME", - "label": "Montenegro", - "value": "Montenegro" - }, - { - "code": "CI", - "label": "Cote d'Ivoire", - "value": "Cote d'Ivoire" - }, - { - "code": "BQ", - "label": "Bonaire, Sint Eustatius and Saba", - "value": "Bonaire, Sint Eustatius and Saba" - }, - { - "code": "XK", - "label": "Republic of Kosovo", - "value": "Republic of Kosovo" - } +[ + { + "code": "AF", + "label": "Afghanistan", + "value": "Afghanistan" + }, + { + "code": "AL", + "label": "Albania", + "value": "Albania" + }, + { + "code": "DZ", + "label": "Algeria", + "value": "Algeria" + }, + { + "code": "AS", + "label": "American Samoa", + "value": "American Samoa" + }, + { + "code": "AD", + "label": "Andorra", + "value": "Andorra" + }, + { + "code": "AO", + "label": "Angola", + "value": "Angola" + }, + { + "code": "AI", + "label": "Anguilla", + "value": "Anguilla" + }, + { + "code": "AQ", + "label": "Antarctica", + "value": "Antarctica" + }, + { + "code": "AG", + "label": "Antigua and Barbuda", + "value": "Antigua and Barbuda" + }, + { + "code": "AR", + "label": "Argentina", + "states": [ + { + "code": "C", + "name": "Ciudad Autónoma de Buenos Aires", + "value": "Ciudad Autónoma de Buenos Aires" + }, + { + "code": "B", + "name": "Buenos Aires", + "value": "Buenos Aires" + }, + { + "code": "K", + "name": "Catamarca", + "value": "Catamarca" + }, + { + "code": "H", + "name": "Chaco", + "value": "Chaco" + }, + { + "code": "U", + "name": "Chubut", + "value": "Chubut" + }, + { + "code": "X", + "name": "Córdoba", + "value": "Córdoba" + }, + { + "code": "W", + "name": "Corrientes", + "value": "Corrientes" + }, + { + "code": "E", + "name": "Entre Ríos", + "value": "Entre Ríos" + }, + { + "code": "P", + "name": "Formosa", + "value": "Formosa" + }, + { + "code": "Y", + "name": "Jujuy", + "value": "Jujuy" + }, + { + "code": "L", + "name": "La Pampa", + "value": "La Pampa" + }, + { + "code": "F", + "name": "La Rioja", + "value": "La Rioja" + }, + { + "code": "M", + "name": "Mendoza", + "value": "Mendoza" + }, + { + "code": "N", + "name": "Misiones", + "value": "Misiones" + }, + { + "code": "Q", + "name": "Neuquén", + "value": "Neuquén" + }, + { + "code": "R", + "name": "Río Negro", + "value": "Río Negro" + }, + { + "code": "A", + "name": "Salta", + "value": "Salta" + }, + { + "code": "J", + "name": "San Juan", + "value": "San Juan" + }, + { + "code": "D", + "name": "San Luis", + "value": "San Luis" + }, + { + "code": "Z", + "name": "Santa Cruz", + "value": "Santa Cruz" + }, + { + "code": "S", + "name": "Santa Fe", + "value": "Santa Fe" + }, + { + "code": "G", + "name": "Santiago del Estero", + "value": "Santiago del Estero" + }, + { + "code": "V", + "name": "Tierra del Fuego", + "value": "Tierra del Fuego" + }, + { + "code": "T", + "name": "Tucumán", + "value": "Tucumán" + } + ], + "value": "Argentina" + }, + { + "code": "AM", + "label": "Armenia", + "value": "Armenia" + }, + { + "code": "AW", + "label": "Aruba", + "value": "Aruba" + }, + { + "code": "AU", + "label": "Australia", + "states": [ + { + "code": "ACT", + "name": "Australian Capital Territory", + "value": "Australian Capital Territory" + }, + { + "code": "NSW", + "name": "New South Wales", + "value": "New South Wales" + }, + { + "code": "NT", + "name": "Northern Territory", + "value": "Northern Territory" + }, + { + "code": "QLD", + "name": "Queensland", + "value": "Queensland" + }, + { + "code": "SA", + "name": "South Australia", + "value": "South Australia" + }, + { + "code": "TAS", + "name": "Tasmania", + "value": "Tasmania" + }, + { + "code": "VIC", + "name": "Victoria", + "value": "Victoria" + }, + { + "code": "WA", + "name": "Western Australia", + "value": "Western Australia" + } + ], + "value": "Australia" + }, + { + "code": "AT", + "label": "Austria", + "states": [ + { + "code": "9", + "name": "Wien", + "value": "Wien" + }, + { + "code": "3", + "name": "Niederösterreich", + "value": "Niederösterreich" + }, + { + "code": "4", + "name": "Oberösterreich", + "value": "Oberösterreich" + }, + { + "code": "5", + "name": "Salzburg", + "value": "Salzburg" + }, + { + "code": "2", + "name": "Kärnten", + "value": "Kärnten" + }, + { + "code": "6", + "name": "Steiermark", + "value": "Steiermark" + }, + { + "code": "7", + "name": "Tirol", + "value": "Tirol" + }, + { + "code": "1", + "name": "Burgenland", + "value": "Burgenland" + }, + { + "code": "8", + "name": "Vorarlberg", + "value": "Vorarlberg" + } + ], + "value": "Austria" + }, + { + "code": "AZ", + "label": "Azerbaijan", + "value": "Azerbaijan" + }, + { + "code": "BS", + "label": "Bahamas", + "value": "Bahamas" + }, + { + "code": "BH", + "label": "Bahrain", + "value": "Bahrain" + }, + { + "code": "BD", + "label": "Bangladesh", + "value": "Bangladesh" + }, + { + "code": "BB", + "label": "Barbados", + "value": "Barbados" + }, + { + "code": "BY", + "label": "Belarus", + "value": "Belarus" + }, + { + "code": "BE", + "label": "Belgium", + "value": "Belgium" + }, + { + "code": "BZ", + "label": "Belize", + "value": "Belize" + }, + { + "code": "BJ", + "label": "Benin", + "value": "Benin" + }, + { + "code": "BM", + "label": "Bermuda", + "value": "Bermuda" + }, + { + "code": "BT", + "label": "Bhutan", + "value": "Bhutan" + }, + { + "code": "BO", + "label": "Bolivia", + "value": "Bolivia" + }, + { + "code": "BA", + "label": "Bosnia and Herzegovina", + "value": "Bosnia and Herzegovina" + }, + { + "code": "BW", + "label": "Botswana", + "value": "Botswana" + }, + { + "code": "BV", + "label": "Bouvet Island", + "value": "Bouvet Island" + }, + { + "code": "BR", + "label": "Brazil", + "value": "Brazil" + }, + { + "code": "IO", + "label": "British Indian Ocean Territory", + "value": "British Indian Ocean Territory" + }, + { + "code": "BN", + "label": "Brunei Darussalam", + "value": "Brunei Darussalam" + }, + { + "code": "BG", + "label": "Bulgaria", + "value": "Bulgaria" + }, + { + "code": "BF", + "label": "Burkina Faso", + "value": "Burkina Faso" + }, + { + "code": "BI", + "label": "Burundi", + "value": "Burundi" + }, + { + "code": "KH", + "label": "Cambodia", + "value": "Cambodia" + }, + { + "code": "CM", + "label": "Cameroon", + "value": "Cameroon" + }, + { + "code": "CA", + "label": "Canada", + "states": [ + { + "code": "AB", + "name": "Alberta", + "value": "Alberta" + }, + { + "code": "BC", + "name": "British Columbia", + "value": "British Columbia" + }, + { + "code": "MB", + "name": "Manitoba", + "value": "Manitoba" + }, + { + "code": "NL", + "name": "Newfoundland and Labrador", + "value": "Newfoundland and Labrador" + }, + { + "code": "NB", + "name": "New Brunswick", + "value": "New Brunswick" + }, + { + "code": "NS", + "name": "Nova Scotia", + "value": "Nova Scotia" + }, + { + "code": "NT", + "name": "Northwest Territories", + "value": "Northwest Territories" + }, + { + "code": "NU", + "name": "Nunavut", + "value": "Nunavut" + }, + { + "code": "ON", + "name": "Ontario", + "value": "Ontario" + }, + { + "code": "PE", + "name": "Prince Edward Island", + "value": "Prince Edward Island" + }, + { + "code": "QC", + "name": "Quebec", + "value": "Quebec" + }, + { + "code": "SK", + "name": "Saskatchewan", + "value": "Saskatchewan" + }, + { + "code": "YT", + "name": "Yukon Territory", + "value": "Yukon Territory" + } + ], + "value": "Canada" + }, + { + "code": "CV", + "label": "Cape Verde", + "value": "Cape Verde" + }, + { + "code": "KY", + "label": "Cayman Islands", + "value": "Cayman Islands" + }, + { + "code": "CF", + "label": "Central African Republic", + "value": "Central African Republic" + }, + { + "code": "TD", + "label": "Chad", + "value": "Chad" + }, + { + "code": "CL", + "label": "Chile", + "value": "Chile" + }, + { + "code": "CN", + "label": "China", + "value": "China" + }, + { + "code": "CX", + "label": "Christmas Island", + "value": "Christmas Island" + }, + { + "code": "CC", + "label": "Cocos (Keeling) Islands", + "value": "Cocos (Keeling) Islands" + }, + { + "code": "CO", + "label": "Colombia", + "value": "Colombia" + }, + { + "code": "KM", + "label": "Comoros", + "value": "Comoros" + }, + { + "code": "CG", + "label": "Congo", + "value": "Congo" + }, + { + "code": "CD", + "label": "Congo, the Democratic Republic of the", + "value": "Congo, the Democratic Republic of the" + }, + { + "code": "CK", + "label": "Cook Islands", + "value": "Cook Islands" + }, + { + "code": "CR", + "label": "Costa Rica", + "value": "Costa Rica" + }, + { + "code": "HR", + "label": "Croatia", + "value": "Croatia" + }, + { + "code": "CY", + "label": "Cyprus", + "value": "Cyprus" + }, + { + "code": "CZ", + "label": "Czech Republic", + "value": "Czech Republic" + }, + { + "code": "DK", + "label": "Denmark", + "value": "Denmark" + }, + { + "code": "DJ", + "label": "Djibouti", + "value": "Djibouti" + }, + { + "code": "DM", + "label": "Dominica", + "value": "Dominica" + }, + { + "code": "DO", + "label": "Dominican Republic", + "value": "Dominican Republic" + }, + { + "code": "EC", + "label": "Ecuador", + "value": "Ecuador" + }, + { + "code": "EG", + "label": "Egypt", + "value": "Egypt" + }, + { + "code": "SV", + "label": "El Salvador", + "value": "El Salvador" + }, + { + "code": "GQ", + "label": "Equatorial Guinea", + "value": "Equatorial Guinea" + }, + { + "code": "ER", + "label": "Eritrea", + "value": "Eritrea" + }, + { + "code": "EE", + "label": "Estonia", + "value": "Estonia" + }, + { + "code": "ET", + "label": "Ethiopia", + "value": "Ethiopia" + }, + { + "code": "FK", + "label": "Falkland Islands (Malvinas)", + "value": "Falkland Islands (Malvinas)" + }, + { + "code": "FO", + "label": "Faroe Islands", + "value": "Faroe Islands" + }, + { + "code": "FJ", + "label": "Fiji", + "value": "Fiji" + }, + { + "code": "FI", + "label": "Finland", + "value": "Finland" + }, + { + "code": "FR", + "label": "France", + "value": "France" + }, + { + "code": "GF", + "label": "French Guiana", + "value": "French Guiana" + }, + { + "code": "PF", + "label": "French Polynesia", + "value": "French Polynesia" + }, + { + "code": "TF", + "label": "French Southern Territories", + "value": "French Southern Territories" + }, + { + "code": "GA", + "label": "Gabon", + "value": "Gabon" + }, + { + "code": "GM", + "label": "Gambia", + "value": "Gambia" + }, + { + "code": "GE", + "label": "Georgia", + "value": "Georgia" + }, + { + "code": "DE", + "label": "Germany", + "states": [ + { + "code": "NI", + "name": "Niedersachsen", + "value": "Niedersachsen" + }, + { + "code": "BW", + "name": "Baden-Württemberg", + "value": "Baden-Württemberg" + }, + { + "code": "BY", + "name": "Bayern", + "value": "Bayern" + }, + { + "code": "BE", + "name": "Berlin", + "value": "Berlin" + }, + { + "code": "BB", + "name": "Brandenburg", + "value": "Brandenburg" + }, + { + "code": "HB", + "name": "Bremen", + "value": "Bremen" + }, + { + "code": "HH", + "name": "Hamburg", + "value": "Hamburg" + }, + { + "code": "HE", + "name": "Hessen", + "value": "Hessen" + }, + { + "code": "MV", + "name": "Mecklenburg-Vorpommern", + "value": "Mecklenburg-Vorpommern" + }, + { + "code": "NW", + "name": "Nordrhein-Westfalen", + "value": "Nordrhein-Westfalen" + }, + { + "code": "RP", + "name": "Rheinland-Pfalz", + "value": "Rheinland-Pfalz" + }, + { + "code": "SL", + "name": "Saarland", + "value": "Saarland" + }, + { + "code": "SN", + "name": "Sachsen", + "value": "Sachsen" + }, + { + "code": "ST", + "name": "Sachsen-Anhalt", + "value": "Sachsen-Anhalt" + }, + { + "code": "SH", + "name": "Schleswig-Holstein", + "value": "Schleswig-Holstein" + }, + { + "code": "TH", + "name": "Thüringen", + "value": "Thüringen" + } + ], + "value": "Germany" + }, + { + "code": "GH", + "label": "Ghana", + "value": "Ghana" + }, + { + "code": "GI", + "label": "Gibraltar", + "value": "Gibraltar" + }, + { + "code": "GR", + "label": "Greece", + "value": "Greece" + }, + { + "code": "GL", + "label": "Greenland", + "value": "Greenland" + }, + { + "code": "GD", + "label": "Grenada", + "value": "Grenada" + }, + { + "code": "GP", + "label": "Guadeloupe", + "value": "Guadeloupe" + }, + { + "code": "GU", + "label": "Guam", + "value": "Guam" + }, + { + "code": "GT", + "label": "Guatemala", + "value": "Guatemala" + }, + { + "code": "GN", + "label": "Guinea", + "value": "Guinea" + }, + { + "code": "GW", + "label": "Guinea-Bissau", + "value": "Guinea-Bissau" + }, + { + "code": "GY", + "label": "Guyana", + "value": "Guyana" + }, + { + "code": "HT", + "label": "Haiti", + "value": "Haiti" + }, + { + "code": "HM", + "label": "Heard Island and Mcdonald Islands", + "value": "Heard Island and Mcdonald Islands" + }, + { + "code": "VA", + "label": "Holy See (Vatican City State)", + "value": "Holy See (Vatican City State)" + }, + { + "code": "HN", + "label": "Honduras", + "value": "Honduras" + }, + { + "code": "HK", + "label": "Hong Kong", + "value": "Hong Kong" + }, + { + "code": "HU", + "label": "Hungary", + "value": "Hungary" + }, + { + "code": "IS", + "label": "Iceland", + "value": "Iceland" + }, + { + "code": "IN", + "label": "India", + "states": [ + { + "code": "AP", + "name": "Andhra Pradesh", + "value": "Andhra Pradesh" + }, + { + "code": "AR", + "name": "Arunachal Pradesh", + "value": "Arunachal Pradesh" + }, + { + "code": "AS", + "name": "Assam", + "value": "Assam" + }, + { + "code": "BR", + "name": "Bihar", + "value": "Bihar" + }, + { + "code": "CT", + "name": "Chhattisgarh", + "value": "Chhattisgarh" + }, + { + "code": "GA", + "name": "Goa", + "value": "Goa" + }, + { + "code": "GJ", + "name": "Gujarat", + "value": "Gujarat" + }, + { + "code": "HR", + "name": "Haryana", + "value": "Haryana" + }, + { + "code": "HP", + "name": "Himachal Pradesh", + "value": "Himachal Pradesh" + }, + { + "code": "JK", + "name": "Jammu & Kashmir", + "value": "Jammu & Kashmir" + }, + { + "code": "JH", + "name": "Jharkhand", + "value": "Jharkhand" + }, + { + "code": "KA", + "name": "Karnataka", + "value": "Karnataka" + }, + { + "code": "KL", + "name": "Kerala", + "value": "Kerala" + }, + { + "code": "MP", + "name": "Madhya Pradesh", + "value": "Madhya Pradesh" + }, + { + "code": "MH", + "name": "Maharashtra", + "value": "Maharashtra" + }, + { + "code": "MN", + "name": "Manipur", + "value": "Manipur" + }, + { + "code": "ML", + "name": "Meghalaya", + "value": "Meghalaya" + }, + { + "code": "MZ", + "name": "Mizoram", + "value": "Mizoram" + }, + { + "code": "NL", + "name": "Nagaland", + "value": "Nagaland" + }, + { + "code": "OR", + "name": "Orissa", + "value": "Orissa" + }, + { + "code": "PB", + "name": "Punjab", + "value": "Punjab" + }, + { + "code": "RJ", + "name": "Rajasthan", + "value": "Rajasthan" + }, + { + "code": "SK", + "name": "Sikkim", + "value": "Sikkim" + }, + { + "code": "TN", + "name": "Tamil Nadu", + "value": "Tamil Nadu" + }, + { + "code": "TR", + "name": "Tripura", + "value": "Tripura" + }, + { + "code": "UT", + "name": "Uttarakhand", + "value": "Uttarakhand" + }, + { + "code": "UP", + "name": "Uttar Pradesh", + "value": "Uttar Pradesh" + }, + { + "code": "WB", + "name": "West Bengal", + "value": "West Bengal" + }, + { + "code": "AN", + "name": "Andaman and Nicobar Islands", + "value": "Andaman and Nicobar Islands" + }, + { + "code": "CH", + "name": "Chandigarh", + "value": "Chandigarh" + }, + { + "code": "DN", + "name": "Dadra and Nagar Haveli", + "value": "Dadra and Nagar Haveli" + }, + { + "code": "DD", + "name": "Daman & Diu", + "value": "Daman & Diu" + }, + { + "code": "LD", + "name": "Lakshadweep", + "value": "Lakshadweep" + }, + { + "code": "DL", + "name": "Delhi", + "value": "Delhi" + }, + { + "code": "PY", + "name": "Pondicherry", + "value": "Pondicherry" + }, + { + "code": "TS", + "name": "Telangana", + "value": "Telangana" + } + ], + "value": "India" + }, + { + "code": "ID", + "label": "Indonesia", + "states": [ + { + "code": "BA", + "name": "Bali", + "value": "Bali" + }, + { + "code": "BB", + "name": "Bangka Belitung", + "value": "Bangka Belitung" + }, + { + "code": "BT", + "name": "Banten", + "value": "Banten" + }, + { + "code": "BE", + "name": "Bengkulu", + "value": "Bengkulu" + }, + { + "code": "AC", + "name": "Daista Aceh", + "value": "Daista Aceh" + }, + { + "code": "JK", + "name": "Jakarta", + "value": "Jakarta" + }, + { + "code": "SU", + "name": "Sumatera Utara", + "value": "Sumatera Utara" + }, + { + "code": "SB", + "name": "Sumatera Barat", + "value": "Sumatera Barat" + }, + { + "code": "RI", + "name": "Riau", + "value": "Riau" + }, + { + "code": "JA", + "name": "Jambi", + "value": "Jambi" + }, + { + "code": "SS", + "name": "Sumatera Selatan", + "value": "Sumatera Selatan" + }, + { + "code": "LA", + "name": "Lampung", + "value": "Lampung" + }, + { + "code": "JB", + "name": "Jawa Barat", + "value": "Jawa Barat" + }, + { + "code": "JT", + "name": "Jawa Tengah", + "value": "Jawa Tengah" + }, + { + "code": "YO", + "name": "Daista Yogyakarta", + "value": "Daista Yogyakarta" + }, + { + "code": "JI", + "name": "Jawa Timur", + "value": "Jawa Timur" + }, + { + "code": "KB", + "name": "Kalimantan Barat", + "value": "Kalimantan Barat" + }, + { + "code": "KT", + "name": "Kalimantan Tengah", + "value": "Kalimantan Tengah" + }, + { + "code": "KI", + "name": "Kalimantan Timur", + "value": "Kalimantan Timur" + }, + { + "code": "KS", + "name": "Kalimantan Selatan", + "value": "Kalimantan Selatan" + }, + { + "code": "NB", + "name": "Nusa Tenggara Barat", + "value": "Nusa Tenggara Barat" + }, + { + "code": "NT", + "name": "Nusa Tenggara Timur", + "value": "Nusa Tenggara Timur" + }, + { + "code": "SN", + "name": "Sulawesi Selatan", + "value": "Sulawesi Selatan" + }, + { + "code": "ST", + "name": "Sulawesi Tengah", + "value": "Sulawesi Tengah" + }, + { + "code": "SA", + "name": "Sulawesi Utara", + "value": "Sulawesi Utara" + }, + { + "code": "SG", + "name": "Sulawesi Tenggara", + "value": "Sulawesi Tenggara" + }, + { + "code": "MA", + "name": "Maluku", + "value": "Maluku" + }, + { + "code": "MU", + "name": "Maluku Utara", + "value": "Maluku Utara" + }, + { + "code": "IJ", + "name": "Irian Jaya Timur", + "value": "Irian Jaya Timur" + }, + { + "code": "IT", + "name": "Irian Jaya Tengah", + "value": "Irian Jaya Tengah" + }, + { + "code": "IB", + "name": "Irian Jawa Barat", + "value": "Irian Jawa Barat" + }, + { + "code": "GO", + "name": "Gorontalo", + "value": "Gorontalo" + } + ], + "value": "Indonesia" + }, + { + "code": "IQ", + "label": "Iraq", + "value": "Iraq" + }, + { + "code": "IE", + "label": "Ireland", + "states": [ + { + "code": "CW", + "name": "Carlow", + "value": "Carlow" + }, + { + "code": "CN", + "name": "Cavan", + "value": "Cavan" + }, + { + "code": "CE", + "name": "Clare", + "value": "Clare" + }, + { + "code": "C", + "name": "Cork", + "value": "Cork" + }, + { + "code": "DL", + "name": "Donegal", + "value": "Donegal" + }, + { + "code": "D", + "name": "Dublin", + "value": "Dublin" + }, + { + "code": "G", + "name": "Galway", + "value": "Galway" + }, + { + "code": "KY", + "name": "Kerry", + "value": "Kerry" + }, + { + "code": "KE", + "name": "Kildare", + "value": "Kildare" + }, + { + "code": "KK", + "name": "Kilkenny", + "value": "Kilkenny" + }, + { + "code": "LS", + "name": "Laois", + "value": "Laois" + }, + { + "code": "LM", + "name": "Leitrim", + "value": "Leitrim" + }, + { + "code": "LK", + "name": "Limerick", + "value": "Limerick" + }, + { + "code": "LD", + "name": "Longford", + "value": "Longford" + }, + { + "code": "LH", + "name": "Louth", + "value": "Louth" + }, + { + "code": "MO", + "name": "Mayo", + "value": "Mayo" + }, + { + "code": "MH", + "name": "Meath", + "value": "Meath" + }, + { + "code": "MN", + "name": "Monaghan", + "value": "Monaghan" + }, + { + "code": "OY", + "name": "Offaly", + "value": "Offaly" + }, + { + "code": "RN", + "name": "Roscommon", + "value": "Roscommon" + }, + { + "code": "SO", + "name": "Sligo", + "value": "Sligo" + }, + { + "code": "TA", + "name": "Tipperary", + "value": "Tipperary" + }, + { + "code": "WD", + "name": "Waterford", + "value": "Waterford" + }, + { + "code": "WH", + "name": "Westmeath", + "value": "Westmeath" + }, + { + "code": "WX", + "name": "Wexford", + "value": "Wexford" + }, + { + "code": "WW", + "name": "Wicklow", + "value": "Wicklow" + } + ], + "value": "Ireland" + }, + { + "code": "IL", + "label": "Israel", + "value": "Israel" + }, + { + "code": "IT", + "label": "Italy", + "value": "Italy" + }, + { + "code": "JM", + "label": "Jamaica", + "value": "Jamaica" + }, + { + "code": "JP", + "label": "Japan", + "value": "Japan" + }, + { + "code": "JO", + "label": "Jordan", + "value": "Jordan" + }, + { + "code": "KZ", + "label": "Kazakhstan", + "value": "Kazakhstan" + }, + { + "code": "KE", + "label": "Kenya", + "value": "Kenya" + }, + { + "code": "KI", + "label": "Kiribati", + "value": "Kiribati" + }, + { + "code": "KR", + "label": "Korea, Republic of", + "value": "Korea, Republic of" + }, + { + "code": "KW", + "label": "Kuwait", + "value": "Kuwait" + }, + { + "code": "KG", + "label": "Kyrgyzstan", + "value": "Kyrgyzstan" + }, + { + "code": "LV", + "label": "Latvia", + "value": "Latvia" + }, + { + "code": "LB", + "label": "Lebanon", + "value": "Lebanon" + }, + { + "code": "LS", + "label": "Lesotho", + "value": "Lesotho" + }, + { + "code": "LR", + "label": "Liberia", + "value": "Liberia" + }, + { + "code": "LY", + "label": "Libya", + "value": "Libya" + }, + { + "code": "LI", + "label": "Liechtenstein", + "value": "Liechtenstein" + }, + { + "code": "LT", + "label": "Lithuania", + "value": "Lithuania" + }, + { + "code": "LU", + "label": "Luxembourg", + "value": "Luxembourg" + }, + { + "code": "MO", + "label": "Macao", + "value": "Macao" + }, + { + "code": "MK", + "label": "Macedonia, the Former Yugoslav Republic of", + "value": "Macedonia, the Former Yugoslav Republic of" + }, + { + "code": "MG", + "label": "Madagascar", + "value": "Madagascar" + }, + { + "code": "MW", + "label": "Malawi", + "value": "Malawi" + }, + { + "code": "MY", + "label": "Malaysia", + "states": [ + { + "code": "01", + "name": "Johor", + "value": "Johor" + }, + { + "code": "02", + "name": "Kedah", + "value": "Kedah" + }, + { + "code": "03", + "name": "Kelantan", + "value": "Kelantan" + }, + { + "code": "04", + "name": "Melaka", + "value": "Melaka" + }, + { + "code": "05", + "name": "Negeri Sembilan", + "value": "Negeri Sembilan" + }, + { + "code": "06", + "name": "Pahang", + "value": "Pahang" + }, + { + "code": "07", + "name": "Pulau Pinang", + "value": "Pulau Pinang" + }, + { + "code": "08", + "name": "Perak", + "value": "Perak" + }, + { + "code": "09", + "name": "Perlis", + "value": "Perlis" + }, + { + "code": "10", + "name": "Selangor", + "value": "Selangor" + }, + { + "code": "11", + "name": "Terengganu", + "value": "Terengganu" + }, + { + "code": "12", + "name": "Sabah", + "value": "Sabah" + }, + { + "code": "13", + "name": "Sarawak", + "value": "Sarawak" + }, + { + "code": "14", + "name": "Kuala Lumpur", + "value": "Kuala Lumpur" + }, + { + "code": "15", + "name": "Labuan", + "value": "Labuan" + }, + { + "code": "16", + "name": "Putrajaya", + "value": "Putrajaya" + } + ], + "value": "Malaysia" + }, + { + "code": "MV", + "label": "Maldives", + "value": "Maldives" + }, + { + "code": "ML", + "label": "Mali", + "value": "Mali" + }, + { + "code": "MT", + "label": "Malta", + "value": "Malta" + }, + { + "code": "MH", + "label": "Marshall Islands", + "value": "Marshall Islands" + }, + { + "code": "MQ", + "label": "Martinique", + "value": "Martinique" + }, + { + "code": "MR", + "label": "Mauritania", + "value": "Mauritania" + }, + { + "code": "MU", + "label": "Mauritius", + "value": "Mauritius" + }, + { + "code": "YT", + "label": "Mayotte", + "value": "Mayotte" + }, + { + "code": "MX", + "label": "Mexico", + "states": [ + { + "code": "AGU", + "name": "Aguascalientes", + "value": "Aguascalientes" + }, + { + "code": "BCN", + "name": "Baja California", + "value": "Baja California" + }, + { + "code": "BCS", + "name": "Baja California Sur", + "value": "Baja California Sur" + }, + { + "code": "CAM", + "name": "Campeche", + "value": "Campeche" + }, + { + "code": "COA", + "name": "Coahuila", + "value": "Coahuila" + }, + { + "code": "COL", + "name": "Colima", + "value": "Colima" + }, + { + "code": "CHP", + "name": "Chiapas", + "value": "Chiapas" + }, + { + "code": "CHH", + "name": "Chihuahua", + "value": "Chihuahua" + }, + { + "code": "DUR", + "name": "Durango", + "value": "Durango" + }, + { + "code": "GUA", + "name": "Guanajuato", + "value": "Guanajuato" + }, + { + "code": "GRO", + "name": "Guerrero", + "value": "Guerrero" + }, + { + "code": "HID", + "name": "Hidalgo", + "value": "Hidalgo" + }, + { + "code": "JAL", + "name": "Jalisco", + "value": "Jalisco" + }, + { + "code": "CMX", + "name": "Ciudad de México", + "value": "Ciudad de México" + }, + { + "code": "MEX", + "name": "México", + "value": "México" + }, + { + "code": "MIC", + "name": "Michoacán", + "value": "Michoacán" + }, + { + "code": "MOR", + "name": "Morelos", + "value": "Morelos" + }, + { + "code": "NAY", + "name": "Nayarit", + "value": "Nayarit" + }, + { + "code": "NLE", + "name": "Nuevo León", + "value": "Nuevo León" + }, + { + "code": "OAX", + "name": "Oaxaca", + "value": "Oaxaca" + }, + { + "code": "PUE", + "name": "Puebla", + "value": "Puebla" + }, + { + "code": "QUE", + "name": "Querétaro", + "value": "Querétaro" + }, + { + "code": "ROO", + "name": "Quintana Roo", + "value": "Quintana Roo" + }, + { + "code": "SLP", + "name": "San Luis Potosí", + "value": "San Luis Potosí" + }, + { + "code": "SIN", + "name": "Sinaloa", + "value": "Sinaloa" + }, + { + "code": "SON", + "name": "Sonora", + "value": "Sonora" + }, + { + "code": "TAB", + "name": "Tabasco", + "value": "Tabasco" + }, + { + "code": "TAM", + "name": "Tamaulipas", + "value": "Tamaulipas" + }, + { + "code": "TLA", + "name": "Tlaxcala", + "value": "Tlaxcala" + }, + { + "code": "VER", + "name": "Veracruz", + "value": "Veracruz" + }, + { + "code": "YUC", + "name": "Yucatán", + "value": "Yucatán" + }, + { + "code": "ZAC", + "name": "Zacatecas", + "value": "Zacatecas" + } + ], + "value": "Mexico" + }, + { + "code": "FM", + "label": "Micronesia, Federated States of", + "value": "Micronesia, Federated States of" + }, + { + "code": "MD", + "label": "Moldova, Republic of", + "value": "Moldova, Republic of" + }, + { + "code": "MC", + "label": "Monaco", + "value": "Monaco" + }, + { + "code": "MN", + "label": "Mongolia", + "value": "Mongolia" + }, + { + "code": "MS", + "label": "Montserrat", + "value": "Montserrat" + }, + { + "code": "MA", + "label": "Morocco", + "value": "Morocco" + }, + { + "code": "MZ", + "label": "Mozambique", + "value": "Mozambique" + }, + { + "code": "MM", + "label": "Myanmar", + "states": [ + { + "code": "07", + "name": "Ayeyarwady", + "value": "Ayeyarwady" + }, + { + "code": "02", + "name": "Bago", + "value": "Bago" + }, + { + "code": "14", + "name": "Chin", + "value": "Chin" + }, + { + "code": "11", + "name": "Kachin", + "value": "Kachin" + }, + { + "code": "12", + "name": "Kayah", + "value": "Kayah" + }, + { + "code": "13", + "name": "Kayin", + "value": "Kayin" + }, + { + "code": "03", + "name": "Magway", + "value": "Magway" + }, + { + "code": "04", + "name": "Mandalay", + "value": "Mandalay" + }, + { + "code": "15", + "name": "Mon", + "value": "Mon" + }, + { + "code": "16", + "name": "Rakhine", + "value": "Rakhine" + }, + { + "code": "17", + "name": "Shan", + "value": "Shan" + }, + { + "code": "01", + "name": "Sagaing", + "value": "Sagaing" + }, + { + "code": "05", + "name": "Tanintharyi", + "value": "Tanintharyi" + }, + { + "code": "06", + "name": "Yangon", + "value": "Yangon" + }, + { + "code": "18", + "name": "Naypyidaw Union", + "value": "Naypyidaw Union" + } + ], + "value": "Myanmar" + }, + { + "code": "NA", + "label": "Namibia", + "value": "Namibia" + }, + { + "code": "NR", + "label": "Nauru", + "value": "Nauru" + }, + { + "code": "NP", + "label": "Nepal", + "value": "Nepal" + }, + { + "code": "NL", + "label": "Netherlands", + "value": "Netherlands" + }, + { + "code": "AN", + "label": "Netherlands Antilles", + "value": "Netherlands Antilles" + }, + { + "code": "NC", + "label": "New Caledonia", + "value": "New Caledonia" + }, + { + "code": "NZ", + "label": "New Zealand", + "value": "New Zealand" + }, + { + "code": "NI", + "label": "Nicaragua", + "value": "Nicaragua" + }, + { + "code": "NE", + "label": "Niger", + "value": "Niger" + }, + { + "code": "NG", + "label": "Nigeria", + "value": "Nigeria" + }, + { + "code": "NU", + "label": "Niue", + "value": "Niue" + }, + { + "code": "NF", + "label": "Norfolk Island", + "value": "Norfolk Island" + }, + { + "code": "MP", + "label": "Northern Mariana Islands", + "value": "Northern Mariana Islands" + }, + { + "code": "NO", + "label": "Norway", + "value": "Norway" + }, + { + "code": "OM", + "label": "Oman", + "value": "Oman" + }, + { + "code": "PK", + "label": "Pakistan", + "value": "Pakistan" + }, + { + "code": "PW", + "label": "Palau", + "value": "Palau" + }, + { + "code": "PS", + "label": "Palestinian Territory, Occupied", + "value": "Palestinian Territory, Occupied" + }, + { + "code": "PA", + "label": "Panama", + "value": "Panama" + }, + { + "code": "PG", + "label": "Papua New Guinea", + "value": "Papua New Guinea" + }, + { + "code": "PY", + "label": "Paraguay", + "value": "Paraguay" + }, + { + "code": "PE", + "label": "Peru", + "value": "Peru" + }, + { + "code": "PH", + "label": "Philippines", + "value": "Philippines" + }, + { + "code": "PN", + "label": "Pitcairn", + "value": "Pitcairn" + }, + { + "code": "PL", + "label": "Poland", + "value": "Poland" + }, + { + "code": "PT", + "label": "Portugal", + "value": "Portugal" + }, + { + "code": "PR", + "label": "Puerto Rico", + "value": "Puerto Rico" + }, + { + "code": "QA", + "label": "Qatar", + "value": "Qatar" + }, + { + "code": "RE", + "label": "Reunion", + "value": "Reunion" + }, + { + "code": "RO", + "label": "Romania", + "value": "Romania" + }, + { + "code": "RU", + "label": "Russian Federation", + "value": "Russian Federation" + }, + { + "code": "RW", + "label": "Rwanda", + "value": "Rwanda" + }, + { + "code": "SH", + "label": "Saint Helena", + "value": "Saint Helena" + }, + { + "code": "KN", + "label": "Saint Kitts and Nevis", + "value": "Saint Kitts and Nevis" + }, + { + "code": "LC", + "label": "Saint Lucia", + "value": "Saint Lucia" + }, + { + "code": "PM", + "label": "Saint Pierre and Miquelon", + "value": "Saint Pierre and Miquelon" + }, + { + "code": "VC", + "label": "Saint Vincent and the Grenadines", + "value": "Saint Vincent and the Grenadines" + }, + { + "code": "WS", + "label": "Samoa", + "value": "Samoa" + }, + { + "code": "SM", + "label": "San Marino", + "value": "San Marino" + }, + { + "code": "ST", + "label": "Sao Tome and Principe", + "value": "Sao Tome and Principe" + }, + { + "code": "SA", + "label": "Saudi Arabia", + "value": "Saudi Arabia" + }, + { + "code": "SN", + "label": "Senegal", + "value": "Senegal" + }, + { + "code": "RS", + "label": "Serbia", + "value": "Serbia" + }, + { + "code": "SC", + "label": "Seychelles", + "value": "Seychelles" + }, + { + "code": "SL", + "label": "Sierra Leone", + "value": "Sierra Leone" + }, + { + "code": "SG", + "label": "Singapore", + "value": "Singapore" + }, + { + "code": "SK", + "label": "Slovakia", + "value": "Slovakia" + }, + { + "code": "SI", + "label": "Slovenia", + "value": "Slovenia" + }, + { + "code": "SB", + "label": "Solomon Islands", + "value": "Solomon Islands" + }, + { + "code": "SO", + "label": "Somalia", + "value": "Somalia" + }, + { + "code": "ZA", + "label": "South Africa", + "states": [ + { + "code": "EC", + "name": "Eastern Cape", + "value": "Eastern Cape" + }, + { + "code": "FS", + "name": "Free State", + "value": "Free State" + }, + { + "code": "GT", + "name": "Gauteng", + "value": "Gauteng" + }, + { + "code": "NL", + "name": "KwaZulu-Natal", + "value": "KwaZulu-Natal" + }, + { + "code": "LP", + "name": "Limpopo", + "value": "Limpopo" + }, + { + "code": "MP", + "name": "Mpumalanga", + "value": "Mpumalanga" + }, + { + "code": "NC", + "name": "Northern Cape", + "value": "Northern Cape" + }, + { + "code": "NW", + "name": "North-West", + "value": "North-West" + }, + { + "code": "WC", + "name": "Western Cape", + "value": "Western Cape" + } + ], + "value": "South Africa" + }, + { + "code": "GS", + "label": "South Georgia and the South Sandwich Islands", + "value": "South Georgia and the South Sandwich Islands" + }, + { + "code": "ES", + "label": "Spain", + "states": [ + { + "code": "C", + "name": "A Coruña", + "value": "A Coruña" + }, + { + "code": "VI", + "name": "Alava", + "value": "Alava" + }, + { + "code": "AB", + "name": "Albacete", + "value": "Albacete" + }, + { + "code": "A", + "name": "Alicante", + "value": "Alicante" + }, + { + "code": "AL", + "name": "Almeria", + "value": "Almeria" + }, + { + "code": "O", + "name": "Asturias", + "value": "Asturias" + }, + { + "code": "AV", + "name": "Avila", + "value": "Avila" + }, + { + "code": "BA", + "name": "Badajoz", + "value": "Badajoz" + }, + { + "code": "PM", + "name": "Baleares", + "value": "Baleares" + }, + { + "code": "B", + "name": "Barcelona", + "value": "Barcelona" + }, + { + "code": "BU", + "name": "Burgos", + "value": "Burgos" + }, + { + "code": "CC", + "name": "Caceres", + "value": "Caceres" + }, + { + "code": "CA", + "name": "Cadiz", + "value": "Cadiz" + }, + { + "code": "S", + "name": "Cantabria", + "value": "Cantabria" + }, + { + "code": "CS", + "name": "Castellon", + "value": "Castellon" + }, + { + "code": "CE", + "name": "Ceuta", + "value": "Ceuta" + }, + { + "code": "CR", + "name": "Ciudad Real", + "value": "Ciudad Real" + }, + { + "code": "CO", + "name": "Cordoba", + "value": "Cordoba" + }, + { + "code": "CU", + "name": "Cuenca", + "value": "Cuenca" + }, + { + "code": "GI", + "name": "Girona", + "value": "Girona" + }, + { + "code": "GR", + "name": "Granada", + "value": "Granada" + }, + { + "code": "GU", + "name": "Guadalajara", + "value": "Guadalajara" + }, + { + "code": "SS", + "name": "Guipuzcoa", + "value": "Guipuzcoa" + }, + { + "code": "H", + "name": "Huelva", + "value": "Huelva" + }, + { + "code": "HU", + "name": "Huesca", + "value": "Huesca" + }, + { + "code": "J", + "name": "Jaen", + "value": "Jaen" + }, + { + "code": "LO", + "name": "La Rioja", + "value": "La Rioja" + }, + { + "code": "GC", + "name": "Las Palmas", + "value": "Las Palmas" + }, + { + "code": "LE", + "name": "Leon", + "value": "Leon" + }, + { + "code": "L", + "name": "Lleida", + "value": "Lleida" + }, + { + "code": "LU", + "name": "Lugo", + "value": "Lugo" + }, + { + "code": "M", + "name": "Madrid", + "value": "Madrid" + }, + { + "code": "MA", + "name": "Malaga", + "value": "Malaga" + }, + { + "code": "ML", + "name": "Melilla", + "value": "Melilla" + }, + { + "code": "MU", + "name": "Murcia", + "value": "Murcia" + }, + { + "code": "NA", + "name": "Navarra", + "value": "Navarra" + }, + { + "code": "OR", + "name": "Ourense", + "value": "Ourense" + }, + { + "code": "P", + "name": "Palencia", + "value": "Palencia" + }, + { + "code": "PO", + "name": "Pontevedra", + "value": "Pontevedra" + }, + { + "code": "SA", + "name": "Salamanca", + "value": "Salamanca" + }, + { + "code": "TF", + "name": "Santa Cruz de Tenerife", + "value": "Santa Cruz de Tenerife" + }, + { + "code": "SG", + "name": "Segovia", + "value": "Segovia" + }, + { + "code": "SE", + "name": "Sevilla", + "value": "Sevilla" + }, + { + "code": "SO", + "name": "Soria", + "value": "Soria" + }, + { + "code": "T", + "name": "Tarragona", + "value": "Tarragona" + }, + { + "code": "TE", + "name": "Teruel", + "value": "Teruel" + }, + { + "code": "TO", + "name": "Toledo", + "value": "Toledo" + }, + { + "code": "V", + "name": "Valencia", + "value": "Valencia" + }, + { + "code": "VA", + "name": "Valladolid", + "value": "Valladolid" + }, + { + "code": "BI", + "name": "Vizcaya", + "value": "Vizcaya" + }, + { + "code": "ZA", + "name": "Zamora", + "value": "Zamora" + }, + { + "code": "Z", + "name": "Zaragoza", + "value": "Zaragoza" + } + ], + "value": "Spain" + }, + { + "code": "LK", + "label": "Sri Lanka", + "value": "Sri Lanka" + }, + { + "code": "SD", + "label": "Sudan", + "value": "Sudan" + }, + { + "code": "SR", + "label": "Suriname", + "value": "Suriname" + }, + { + "code": "SJ", + "label": "Svalbard and Jan Mayen", + "value": "Svalbard and Jan Mayen" + }, + { + "code": "SZ", + "label": "Swaziland", + "value": "Swaziland" + }, + { + "code": "SE", + "label": "Sweden", + "value": "Sweden" + }, + { + "code": "CH", + "label": "Switzerland", + "states": [ + { + "code": "AG", + "name": "Aargau", + "value": "Aargau" + }, + { + "code": "AI", + "name": "Appenzell Innerrhoden", + "value": "Appenzell Innerrhoden" + }, + { + "code": "AR", + "name": "Appenzell Ausserrhoden", + "value": "Appenzell Ausserrhoden" + }, + { + "code": "BE", + "name": "Bern", + "value": "Bern" + }, + { + "code": "BL", + "name": "Basel-Landschaft", + "value": "Basel-Landschaft" + }, + { + "code": "BS", + "name": "Basel-Stadt", + "value": "Basel-Stadt" + }, + { + "code": "FR", + "name": "Fribourg", + "value": "Fribourg" + }, + { + "code": "GE", + "name": "Geneva", + "value": "Geneva" + }, + { + "code": "GL", + "name": "Glarus", + "value": "Glarus" + }, + { + "code": "GR", + "name": "Graubünden", + "value": "Graubünden" + }, + { + "code": "JU", + "name": "Jura", + "value": "Jura" + }, + { + "code": "LU", + "name": "Luzern", + "value": "Luzern" + }, + { + "code": "NE", + "name": "Neuchâtel", + "value": "Neuchâtel" + }, + { + "code": "NW", + "name": "Nidwalden", + "value": "Nidwalden" + }, + { + "code": "OW", + "name": "Obwalden", + "value": "Obwalden" + }, + { + "code": "SG", + "name": "St. Gallen", + "value": "St. Gallen" + }, + { + "code": "SH", + "name": "Schaffhausen", + "value": "Schaffhausen" + }, + { + "code": "SO", + "name": "Solothurn", + "value": "Solothurn" + }, + { + "code": "SZ", + "name": "Schwyz", + "value": "Schwyz" + }, + { + "code": "TG", + "name": "Thurgau", + "value": "Thurgau" + }, + { + "code": "TI", + "name": "Ticino", + "value": "Ticino" + }, + { + "code": "UR", + "name": "Uri", + "value": "Uri" + }, + { + "code": "VD", + "name": "Vaud", + "value": "Vaud" + }, + { + "code": "VS", + "name": "Valais", + "value": "Valais" + }, + { + "code": "ZG", + "name": "Zug", + "value": "Zug" + }, + { + "code": "ZH", + "name": "Zürich", + "value": "Zürich" + } + ], + "value": "Switzerland" + }, + { + "code": "TW", + "label": "Taiwan", + "value": "Taiwan" + }, + { + "code": "TJ", + "label": "Tajikistan", + "value": "Tajikistan" + }, + { + "code": "TZ", + "label": "Tanzania, United Republic of", + "value": "Tanzania, United Republic of" + }, + { + "code": "TH", + "label": "Thailand", + "value": "Thailand" + }, + { + "code": "TL", + "label": "Timor-Leste", + "value": "Timor-Leste" + }, + { + "code": "TG", + "label": "Togo", + "value": "Togo" + }, + { + "code": "TK", + "label": "Tokelau", + "value": "Tokelau" + }, + { + "code": "TO", + "label": "Tonga", + "value": "Tonga" + }, + { + "code": "TT", + "label": "Trinidad and Tobago", + "value": "Trinidad and Tobago" + }, + { + "code": "TN", + "label": "Tunisia", + "value": "Tunisia" + }, + { + "code": "TR", + "label": "Turkey", + "value": "Turkey" + }, + { + "code": "TM", + "label": "Turkmenistan", + "value": "Turkmenistan" + }, + { + "code": "TC", + "label": "Turks and Caicos Islands", + "value": "Turks and Caicos Islands" + }, + { + "code": "TV", + "label": "Tuvalu", + "value": "Tuvalu" + }, + { + "code": "UG", + "label": "Uganda", + "value": "Uganda" + }, + { + "code": "UA", + "label": "Ukraine", + "value": "Ukraine" + }, + { + "code": "AE", + "label": "United Arab Emirates", + "states": [ + { + "code": "AZ", + "name": "Abu Dhabi", + "value": "Abu Dhabi" + }, + { + "code": "AJ", + "name": "Ajman", + "value": "Ajman" + }, + { + "code": "FU", + "name": "Fujairah", + "value": "Fujairah" + }, + { + "code": "SH", + "name": "Sharjah", + "value": "Sharjah" + }, + { + "code": "DU", + "name": "Dubai", + "value": "Dubai" + }, + { + "code": "RK", + "name": "Ras al-Khaimah", + "value": "Ras al-Khaimah" + }, + { + "code": "UQ", + "name": "Umm al-Quwain", + "value": "Umm al-Quwain" + } + ], + "value": "United Arab Emirates" + }, + { + "code": "GB", + "label": "United Kingdom", + "value": "United Kingdom" + }, + { + "code": "US", + "label": "United States", + "states": [ + { + "code": "AL", + "name": "Alabama", + "value": "Alabama" + }, + { + "code": "AK", + "name": "Alaska", + "value": "Alaska" + }, + { + "code": "AS", + "name": "American Samoa", + "value": "American Samoa" + }, + { + "code": "AZ", + "name": "Arizona", + "value": "Arizona" + }, + { + "code": "AR", + "name": "Arkansas", + "value": "Arkansas" + }, + { + "code": "AE", + "name": "Armed Forces Africa", + "value": "Armed Forces Africa" + }, + { + "code": "AA", + "name": "Armed Forces Americas", + "value": "Armed Forces Americas" + }, + { + "code": "AE", + "name": "Armed Forces Canada", + "value": "Armed Forces Canada" + }, + { + "code": "AE", + "name": "Armed Forces Europe", + "value": "Armed Forces Europe" + }, + { + "code": "AE", + "name": "Armed Forces Middle East", + "value": "Armed Forces Middle East" + }, + { + "code": "AP", + "name": "Armed Forces Pacific", + "value": "Armed Forces Pacific" + }, + { + "code": "CA", + "name": "California", + "value": "California" + }, + { + "code": "CO", + "name": "Colorado", + "value": "Colorado" + }, + { + "code": "CT", + "name": "Connecticut", + "value": "Connecticut" + }, + { + "code": "DE", + "name": "Delaware", + "value": "Delaware" + }, + { + "code": "DC", + "name": "District of Columbia", + "value": "District of Columbia" + }, + { + "code": "FM", + "name": "Federated States Of Micronesia", + "value": "Federated States Of Micronesia" + }, + { + "code": "FL", + "name": "Florida", + "value": "Florida" + }, + { + "code": "GA", + "name": "Georgia", + "value": "Georgia" + }, + { + "code": "GU", + "name": "Guam", + "value": "Guam" + }, + { + "code": "HI", + "name": "Hawaii", + "value": "Hawaii" + }, + { + "code": "ID", + "name": "Idaho", + "value": "Idaho" + }, + { + "code": "IL", + "name": "Illinois", + "value": "Illinois" + }, + { + "code": "IN", + "name": "Indiana", + "value": "Indiana" + }, + { + "code": "IA", + "name": "Iowa", + "value": "Iowa" + }, + { + "code": "KS", + "name": "Kansas", + "value": "Kansas" + }, + { + "code": "KY", + "name": "Kentucky", + "value": "Kentucky" + }, + { + "code": "LA", + "name": "Louisiana", + "value": "Louisiana" + }, + { + "code": "ME", + "name": "Maine", + "value": "Maine" + }, + { + "code": "MH", + "name": "Marshall Islands", + "value": "Marshall Islands" + }, + { + "code": "MD", + "name": "Maryland", + "value": "Maryland" + }, + { + "code": "MA", + "name": "Massachusetts", + "value": "Massachusetts" + }, + { + "code": "MI", + "name": "Michigan", + "value": "Michigan" + }, + { + "code": "MN", + "name": "Minnesota", + "value": "Minnesota" + }, + { + "code": "MS", + "name": "Mississippi", + "value": "Mississippi" + }, + { + "code": "MO", + "name": "Missouri", + "value": "Missouri" + }, + { + "code": "MT", + "name": "Montana", + "value": "Montana" + }, + { + "code": "NE", + "name": "Nebraska", + "value": "Nebraska" + }, + { + "code": "NV", + "name": "Nevada", + "value": "Nevada" + }, + { + "code": "NH", + "name": "New Hampshire", + "value": "New Hampshire" + }, + { + "code": "NJ", + "name": "New Jersey", + "value": "New Jersey" + }, + { + "code": "NM", + "name": "New Mexico", + "value": "New Mexico" + }, + { + "code": "NY", + "name": "New York", + "value": "New York" + }, + { + "code": "NC", + "name": "North Carolina", + "value": "North Carolina" + }, + { + "code": "ND", + "name": "North Dakota", + "value": "North Dakota" + }, + { + "code": "MP", + "name": "Northern Mariana Islands", + "value": "Northern Mariana Islands" + }, + { + "code": "OH", + "name": "Ohio", + "value": "Ohio" + }, + { + "code": "OK", + "name": "Oklahoma", + "value": "Oklahoma" + }, + { + "code": "OR", + "name": "Oregon", + "value": "Oregon" + }, + { + "code": "PW", + "name": "Palau", + "value": "Palau" + }, + { + "code": "PA", + "name": "Pennsylvania", + "value": "Pennsylvania" + }, + { + "code": "PR", + "name": "Puerto Rico", + "value": "Puerto Rico" + }, + { + "code": "RI", + "name": "Rhode Island", + "value": "Rhode Island" + }, + { + "code": "SC", + "name": "South Carolina", + "value": "South Carolina" + }, + { + "code": "SD", + "name": "South Dakota", + "value": "South Dakota" + }, + { + "code": "TN", + "name": "Tennessee", + "value": "Tennessee" + }, + { + "code": "TX", + "name": "Texas", + "value": "Texas" + }, + { + "code": "UT", + "name": "Utah", + "value": "Utah" + }, + { + "code": "VT", + "name": "Vermont", + "value": "Vermont" + }, + { + "code": "VI", + "name": "Virgin Islands", + "value": "Virgin Islands" + }, + { + "code": "VA", + "name": "Virginia", + "value": "Virginia" + }, + { + "code": "WA", + "name": "Washington", + "value": "Washington" + }, + { + "code": "WV", + "name": "West Virginia", + "value": "West Virginia" + }, + { + "code": "WI", + "name": "Wisconsin", + "value": "Wisconsin" + }, + { + "code": "WY", + "name": "Wyoming", + "value": "Wyoming" + } + ], + "value": "United States" + }, + { + "code": "UM", + "label": "United States Minor Outlying Islands", + "value": "United States Minor Outlying Islands" + }, + { + "code": "UY", + "label": "Uruguay", + "value": "Uruguay" + }, + { + "code": "UZ", + "label": "Uzbekistan", + "value": "Uzbekistan" + }, + { + "code": "VU", + "label": "Vanuatu", + "value": "Vanuatu" + }, + { + "code": "VE", + "label": "Venezuela", + "value": "Venezuela" + }, + { + "code": "VN", + "label": "Viet Nam", + "value": "Viet Nam" + }, + { + "code": "VG", + "label": "Virgin Islands, British", + "value": "Virgin Islands, British" + }, + { + "code": "VI", + "label": "Virgin Islands, U.S.", + "value": "Virgin Islands, U.S." + }, + { + "code": "WF", + "label": "Wallis and Futuna", + "value": "Wallis and Futuna" + }, + { + "code": "EH", + "label": "Western Sahara", + "value": "Western Sahara" + }, + { + "code": "YE", + "label": "Yemen", + "value": "Yemen" + }, + { + "code": "ZM", + "label": "Zambia", + "value": "Zambia" + }, + { + "code": "ZW", + "label": "Zimbabwe", + "value": "Zimbabwe" + }, + { + "code": "IM", + "label": "Isle of Man", + "value": "Isle of Man" + }, + { + "code": "JE", + "label": "Jersey", + "value": "Jersey" + }, + { + "code": "GG", + "label": "Guernsey", + "value": "Guernsey" + }, + { + "code": "LA", + "label": "Lao People's Democratic Republic", + "value": "Lao People's Democratic Republic" + }, + { + "code": "ME", + "label": "Montenegro", + "value": "Montenegro" + }, + { + "code": "CI", + "label": "Cote d'Ivoire", + "value": "Cote d'Ivoire" + }, + { + "code": "BQ", + "label": "Bonaire, Sint Eustatius and Saba", + "value": "Bonaire, Sint Eustatius and Saba" + }, + { + "code": "XK", + "label": "Republic of Kosovo", + "value": "Republic of Kosovo" + } ] \ No newline at end of file diff --git a/examples/currency_selector.json b/examples/currency_selector.json index 99df8cbc5..1487fd39e 100644 --- a/examples/currency_selector.json +++ b/examples/currency_selector.json @@ -1,18 +1,18 @@ -{ - "active_currency_code": "USD", - "active_currency_flag": "\"\"", - "active_currency_id": 1, - "active_currency_name": "US Dollars", - "currencies": [ - { - "cart_currency_switch_url": "/cart/change-currency", - "code": "USD", - "flag": "\"\"", - "id": 1, - "is_active": true, - "name": "US Dollars", - "switch_url": "https://store.example.com/account.php?setCurrencyId=1" - } - ], - "default_currency_code": "USD" +{ + "active_currency_code": "USD", + "active_currency_flag": "\"\"", + "active_currency_id": 1, + "active_currency_name": "US Dollars", + "currencies": [ + { + "cart_currency_switch_url": "/cart/change-currency", + "code": "USD", + "flag": "\"\"", + "id": 1, + "is_active": true, + "name": "US Dollars", + "switch_url": "https://store.example.com/account.php?setCurrencyId=1" + } + ], + "default_currency_code": "USD" } \ No newline at end of file diff --git a/examples/customerAddresses.json b/examples/customerAddresses.json index 61df8cd79..c771dbdbb 100644 --- a/examples/customerAddresses.json +++ b/examples/customerAddresses.json @@ -1,46 +1,46 @@ -[ - { - "address1": "123 test st", - "address2": "", - "city": "Austin", - "company": "(GMT-06:00) Central Time (US & Canada)", - "country": "United States", - "country_id": "226", - "customer_id": "1", - "delete_url": "/account.php?action=delete_shipping_address&address_id=2&from=account.php%3Faction%3Daddress_book", - "destination": "residential", - "edit_url": "/account.php?action=edit_shipping_address&address_id=2&from=account.php%3Faction%3Daddress_book", - "first_name": "austin", - "form_session_id": "0", - "full_name": "austin smith", - "id": "2", - "last_name": "smith", - "last_used": "1558113688", - "phone": "5555555555", - "state": "Texas", - "state_id": "57", - "zip": "78717" - }, - { - "address1": "123 test st", - "address2": "", - "city": "Austin", - "company": "(GMT-06:00) Central Time (US & Canada)", - "country": "United States", - "country_id": "226", - "customer_id": "1", - "delete_url": "/account.php?action=delete_shipping_address&address_id=1&from=account.php%3Faction%3Daddress_book", - "destination": "residential", - "edit_url": "/account.php?action=edit_shipping_address&address_id=1&from=account.php%3Faction%3Daddress_book", - "first_name": "austin", - "form_session_id": "0", - "full_name": "austin test", - "id": "1", - "last_name": "test", - "last_used": "1554824621", - "phone": "", - "state": "Texas", - "state_id": "57", - "zip": "78717" - } +[ + { + "address1": "123 test st", + "address2": "", + "city": "Austin", + "company": "(GMT-06:00) Central Time (US & Canada)", + "country": "United States", + "country_id": "226", + "customer_id": "1", + "delete_url": "/account.php?action=delete_shipping_address&address_id=2&from=account.php%3Faction%3Daddress_book", + "destination": "residential", + "edit_url": "/account.php?action=edit_shipping_address&address_id=2&from=account.php%3Faction%3Daddress_book", + "first_name": "austin", + "form_session_id": "0", + "full_name": "austin smith", + "id": "2", + "last_name": "smith", + "last_used": "1558113688", + "phone": "5555555555", + "state": "Texas", + "state_id": "57", + "zip": "78717" + }, + { + "address1": "123 test st", + "address2": "", + "city": "Austin", + "company": "(GMT-06:00) Central Time (US & Canada)", + "country": "United States", + "country_id": "226", + "customer_id": "1", + "delete_url": "/account.php?action=delete_shipping_address&address_id=1&from=account.php%3Faction%3Daddress_book", + "destination": "residential", + "edit_url": "/account.php?action=edit_shipping_address&address_id=1&from=account.php%3Faction%3Daddress_book", + "first_name": "austin", + "form_session_id": "0", + "full_name": "austin test", + "id": "1", + "last_name": "test", + "last_used": "1554824621", + "phone": "", + "state": "Texas", + "state_id": "57", + "zip": "78717" + } ] \ No newline at end of file diff --git a/examples/formsProvider.json b/examples/formsProvider.json index 9e19e5e19..4baac84c3 100644 --- a/examples/formsProvider.json +++ b/examples/formsProvider.json @@ -1,3 +1,3 @@ -{ - "provider": "authorizenet" +{ + "provider": "authorizenet" } \ No newline at end of file diff --git a/examples/productPrice.json b/examples/productPrice.json index 7bc7a705e..cbff7dcb7 100644 --- a/examples/productPrice.json +++ b/examples/productPrice.json @@ -1,46 +1,46 @@ -{ - "non_sale_price_without_tax": { - "currency": "USD", - "formatted": "$123.00", - "value": 123 - }, - "price_range": { - "max": { - "tax_label": "Default Tax Options", - "without_tax": { - "currency": "USD", - "formatted": "$3.00", - "value": 3 - } - }, - "min": { - "tax_label": "Default Tax Options", - "without_tax": { - "currency": "USD", - "formatted": "$2.00", - "value": 2 - } - } - }, - "rrp_without_tax": { - "currency": "USD", - "formatted": "$4.00", - "value": 4 - }, - "sale_price_without_tax": { - "currency": "USD", - "formatted": "$3.00", - "value": 3 - }, - "saved": { - "currency": "USD", - "formatted": "$2.00", - "value": 2 - }, - "tax_label": "Default Tax Options", - "without_tax": { - "currency": "USD", - "formatted": "$2.00", - "value": 2 - } +{ + "non_sale_price_without_tax": { + "currency": "USD", + "formatted": "$123.00", + "value": 123 + }, + "price_range": { + "max": { + "tax_label": "Default Tax Options", + "without_tax": { + "currency": "USD", + "formatted": "$3.00", + "value": 3 + } + }, + "min": { + "tax_label": "Default Tax Options", + "without_tax": { + "currency": "USD", + "formatted": "$2.00", + "value": 2 + } + } + }, + "rrp_without_tax": { + "currency": "USD", + "formatted": "$4.00", + "value": 4 + }, + "sale_price_without_tax": { + "currency": "USD", + "formatted": "$3.00", + "value": 3 + }, + "saved": { + "currency": "USD", + "formatted": "$2.00", + "value": 2 + }, + "tax_label": "Default Tax Options", + "without_tax": { + "currency": "USD", + "formatted": "$2.00", + "value": 2 + } } \ No newline at end of file diff --git a/examples/vault.json b/examples/vault.json index 39185c1b9..a845f81f3 100644 --- a/examples/vault.json +++ b/examples/vault.json @@ -1,4 +1,4 @@ -{ - "access_token": "{{token}}", - "expires_at": 1616614163 +{ + "access_token": "{{token}}", + "expires_at": 1616614163 } \ No newline at end of file diff --git a/models/_root/checkout.yml b/models/_root/checkout.yml index ee1c5ca23..106541b1d 100644 --- a/models/_root/checkout.yml +++ b/models/_root/checkout.yml @@ -1,33 +1,33 @@ -description: |- - Used to access checkout content and data in `templates\pages\order-confirmation.html`. - - The `{{checkout}}` object is available to checkout and order confirmation templates and components. - - **Handlebars Expression**: `{{checkout.*}}` -type: object -properties: - order_confirmation_content: - type: string - description: Default content from checkout template. - example: |- - " \n\n \n\n \n\n \n\n
\n\n\n\n\n\n" - checkout_head: - type: string - description: Default content from checkout ``. - example: |- - "\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n\n \n \n\n \n \n \n \n \n\n\n\n" - order: - description: '`{{checkout.order}}` object available to order confirmation templates and components.' - type: object - properties: - id: - type: number - description: The `id` of the order. To access `checkout.order.id` from `order-confirmation.html`, use Script Manager or the Stencil themeʼs page context to assign the value of `checkout.order.id` to a variable. For more information, see the example in [Using the Fetch API](/docs/storefront/cart-checkout/guide/rest-management#using-the-fetch-api). - example: 1836 - header_image: - type: string - description: The image `src` of the header. - id: - type: string - description: the cart and checkout `id` - example: 2343eb66-3c41-4966-a539-d8af36d3fc47 +description: |- + Used to access checkout content and data in `templates\pages\order-confirmation.html`. + + The `{{checkout}}` object is available to checkout and order confirmation templates and components. + + **Handlebars Expression**: `{{checkout.*}}` +type: object +properties: + order_confirmation_content: + type: string + description: Default content from checkout template. + example: |- + " \n\n \n\n \n\n \n\n
\n\n\n\n\n\n" + checkout_head: + type: string + description: Default content from checkout ``. + example: |- + "\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n\n \n \n\n \n \n \n \n \n\n\n\n" + order: + description: '`{{checkout.order}}` object available to order confirmation templates and components.' + type: object + properties: + id: + type: number + description: The `id` of the order. To access `checkout.order.id` from `order-confirmation.html`, use Script Manager or the Stencil themeʼs page context to assign the value of `checkout.order.id` to a variable. For more information, see the example in [Using the Fetch API](/docs/storefront/cart-checkout/guide/rest-management#using-the-fetch-api). + example: 1836 + header_image: + type: string + description: The image `src` of the header. + id: + type: string + description: the cart and checkout `id` + example: 2343eb66-3c41-4966-a539-d8af36d3fc47 diff --git a/reference/.spectral.yaml b/reference/.spectral.yaml index f38a96245..dbbe203cc 100644 --- a/reference/.spectral.yaml +++ b/reference/.spectral.yaml @@ -1,3 +1,3 @@ -extends: - - spectral:oas - - ../.spectral.yaml +extends: + - spectral:oas + - ../.spectral.yaml diff --git a/reference/email_templates.v3.yml b/reference/email_templates.v3.yml index 7985a3bb5..4ea920e70 100644 --- a/reference/email_templates.v3.yml +++ b/reference/email_templates.v3.yml @@ -1,354 +1,354 @@ -openapi: '3.0.3' -info: - title: Email Templates - description: Manage Handlebars-based email templates globally and create channel-specific overrides. - termsOfService: 'https://www.bigcommerce.com/terms' - contact: - name: BigCommerce - url: 'https://www.bigcommerce.com' - email: support@bigcommerce.com - version: '1.0.0' -servers: - - url: 'https://api.bigcommerce.com/stores/{store_hash}/v3' - variables: - store_hash: - default: store_hash - description: Permanent ID of the BigCommerce store. - description: BigCommerce API Gateway -security: - - X-Auth-Token: [] -tags: - - name: Email Templates -paths: - '/marketing/email-templates': - parameters: - - $ref: '#/components/parameters/Accept' - get: - summary: Get Email Templates - description: |- - Get a list of email templates. - - responses: - '200': - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/EmailTemplatesCollection' - meta: - type: object - properties: {} - additionalProperties: true - description: Response metadata. - examples: - Example: - value: - data: - - type_id: account_reset_password_email - body: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' - translations: - - locale: en - keys: - reset_password: 'To change your customer account password at {{name}} please click this link or copy and paste it into your browser:' - subject: 'Reset your password at {{store.name}}' - meta: {} - description: | - An array of email templates on the store - parameters: - - $ref: '#/components/parameters/ChannelIdParam' - operationId: getEmailTemplates - tags: - - Email Templates - '/marketing/email-templates/{template-name}': - parameters: - - $ref: '#/components/parameters/Accept' - - schema: - type: string - name: template-name - in: path - required: true - get: - summary: Get an Email Template - description: |- - Get a single global email template or a channel-specific email template override. - - tags: - - Email Templates - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/EmailTemplate' - meta: - type: object - properties: {} - additionalProperties: true - description: Response metadata. - examples: - Example: - value: - data: - type_id: account_reset_password_email - body: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' - translations: - - locale: en - keys: - reset_password: 'To change your customer account password at {{name}} please click this link or copy and paste it into your browser:' - subject: 'Reset your password at {{store.name}}' - meta: {} - operationId: getEmailTemplate - parameters: - - $ref: '#/components/parameters/ChannelIdParam' - put: - summary: Update a Template - description: Update a global template or create a channel-specific email template override. - tags: - - Email Templates - operationId: updateEmailTemplate - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/EmailTemplate' - meta: - type: object - properties: {} - additionalProperties: true - description: Response metadata. - examples: - Example: - value: - data: - type_id: account_reset_password_email - body: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' - translations: - - locale: en - keys: - reset_password: 'To change your customer account password at {{name}} please click this link or copy and paste it into your browser:' - subject: 'Reset your password at {{store.name}}' - meta: {} - '400': - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - parameters: - - $ref: '#/components/parameters/ContentType' - - $ref: '#/components/parameters/ChannelIdParam' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EmailTemplate' - examples: - Example: - value: - type_id: account_reset_password_email - body: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' - translations: - - locale: en - keys: - reset_password: 'To change your customer account password at {{name}} please click this link or copy and paste it into your browser:' - subject: 'Reset your password at {{store.name}}' - description: '' - delete: - summary: Delete Email Template Override - description: Removes a channel-specific email template override. - tags: - - Email Templates - operationId: deleteEmailTemplateOverride - responses: - '200': - description: OK - parameters: - - $ref: '#/components/parameters/RequiredChannelIdParamForDelete' -components: - schemas: - ErrorResponse: - allOf: - - $ref: '#/components/schemas/BaseError' - - type: object - properties: - errors: - $ref: '#/components/schemas/DetailedErrors' - x-internal: false - BaseError: - type: object - description: | - Error payload for the BigCommerce API. - properties: - status: - description: | - The HTTP status code. - type: integer - title: - description: | - The error title describing the particular error. - type: string - type: - type: string - instance: - type: string - x-internal: false - DetailedErrors: - type: object - properties: {} - additionalProperties: - type: string - x-internal: false - EmailTemplatesCollection: - title: EmailTemplatesCollection - type: array - items: - $ref: '#/components/schemas/EmailTemplate' - description: A collection of all email templates. - x-internal: false - EmailTemplate: - title: EmailTemplate - type: object - description: Data for a particular email template - properties: - type_id: - type: string - enum: - - abandoned_cart_email - - account_details_changed_email - - combined_order_status_email - - createaccount_email - - createguestaccount_email - - giftcertificate_email - - invoice_email - - ordermessage_notification - - return_confirmation_email - - return_statuschange_email - - product_review_email - - account_reset_password_email - example: account_reset_password_email - body: - type: string - example: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' - translations: - $ref: '#/components/schemas/LocaleCollection' - subject: - type: string - example: 'Reset your password at {{store.name}}' - x-internal: false - LocaleObject: - title: LocaleObject - type: object - properties: - locale: - type: string - example: en - description: 'Locale code for this language, such as "en", "en-us", "fr-ca".' - keys: - type: object - properties: {} - additionalProperties: true - example: - reset_password: 'To change your customer account password at {{name}} please click this link or copy and paste it into your browser:' - description: Language keys for the template. User-defined. Should match any lang keys used in the template. - description: A particular localeʼs translations. - x-internal: false - LocaleCollection: - title: LocaleCollection - type: array - items: - $ref: '#/components/schemas/LocaleObject' - description: A collection of locale translations for the static language. - x-internal: false - EmailTemplateUpdate: - title: EmailTemplateUpdate - type: object - description: Data for updated template - properties: - body: - type: string - example: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' - translations: - $ref: '#/components/schemas/LocaleCollection' - subject: - type: string - example: 'Reset your password at {{store.name}}' - required: - - body - - lang - - subject - x-internal: false - scratch: - title: scratch - type: object - properties: - id: - type: string - x-internal: false - parameters: - Accept: - name: Accept - in: header - required: true - description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.' - schema: - type: string - default: 'application/json' - ContentType: - name: Content-Type - in: header - required: true - description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.' - schema: - type: string - default: 'application/json' - ChannelIdParam: - in: query - name: channel_id - schema: - type: integer - description: Channel ID to use for channel-specific settings. If omitted, you will interact with the global setting only. - RequiredChannelIdParamForDelete: - in: query - name: channel_id - schema: - type: integer - description: Required Channel ID. This delete operation will delete overridden settings for this channel, thus restoring them to the global defaults. - required: true - securitySchemes: - X-Auth-Token: - name: X-Auth-Token - description: |- - ### OAuth scopes - - | UI Name | Permission | Parameter | - |:--------|:-----------|:----------| - | Information & Settings | modify | `store_v2_information` | - | Information & Settings | read-only | `store_v2_information_read_only` | - - ### Authentication header - - | Header | Argument | Description | - |:-------|:---------|:------------| - | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). | - - ### Further reading - - For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests). - - For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes). - - For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes). - type: apiKey - in: header - +openapi: '3.0.3' +info: + title: Email Templates + description: Manage Handlebars-based email templates globally and create channel-specific overrides. + termsOfService: 'https://www.bigcommerce.com/terms' + contact: + name: BigCommerce + url: 'https://www.bigcommerce.com' + email: support@bigcommerce.com + version: '1.0.0' +servers: + - url: 'https://api.bigcommerce.com/stores/{store_hash}/v3' + variables: + store_hash: + default: store_hash + description: Permanent ID of the BigCommerce store. + description: BigCommerce API Gateway +security: + - X-Auth-Token: [] +tags: + - name: Email Templates +paths: + '/marketing/email-templates': + parameters: + - $ref: '#/components/parameters/Accept' + get: + summary: Get Email Templates + description: |- + Get a list of email templates. + + responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/EmailTemplatesCollection' + meta: + type: object + properties: {} + additionalProperties: true + description: Response metadata. + examples: + Example: + value: + data: + - type_id: account_reset_password_email + body: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' + translations: + - locale: en + keys: + reset_password: 'To change your customer account password at {{name}} please click this link or copy and paste it into your browser:' + subject: 'Reset your password at {{store.name}}' + meta: {} + description: | + An array of email templates on the store + parameters: + - $ref: '#/components/parameters/ChannelIdParam' + operationId: getEmailTemplates + tags: + - Email Templates + '/marketing/email-templates/{template-name}': + parameters: + - $ref: '#/components/parameters/Accept' + - schema: + type: string + name: template-name + in: path + required: true + get: + summary: Get an Email Template + description: |- + Get a single global email template or a channel-specific email template override. + + tags: + - Email Templates + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/EmailTemplate' + meta: + type: object + properties: {} + additionalProperties: true + description: Response metadata. + examples: + Example: + value: + data: + type_id: account_reset_password_email + body: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' + translations: + - locale: en + keys: + reset_password: 'To change your customer account password at {{name}} please click this link or copy and paste it into your browser:' + subject: 'Reset your password at {{store.name}}' + meta: {} + operationId: getEmailTemplate + parameters: + - $ref: '#/components/parameters/ChannelIdParam' + put: + summary: Update a Template + description: Update a global template or create a channel-specific email template override. + tags: + - Email Templates + operationId: updateEmailTemplate + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/EmailTemplate' + meta: + type: object + properties: {} + additionalProperties: true + description: Response metadata. + examples: + Example: + value: + data: + type_id: account_reset_password_email + body: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' + translations: + - locale: en + keys: + reset_password: 'To change your customer account password at {{name}} please click this link or copy and paste it into your browser:' + subject: 'Reset your password at {{store.name}}' + meta: {} + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + parameters: + - $ref: '#/components/parameters/ContentType' + - $ref: '#/components/parameters/ChannelIdParam' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EmailTemplate' + examples: + Example: + value: + type_id: account_reset_password_email + body: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' + translations: + - locale: en + keys: + reset_password: 'To change your customer account password at {{name}} please click this link or copy and paste it into your browser:' + subject: 'Reset your password at {{store.name}}' + description: '' + delete: + summary: Delete Email Template Override + description: Removes a channel-specific email template override. + tags: + - Email Templates + operationId: deleteEmailTemplateOverride + responses: + '200': + description: OK + parameters: + - $ref: '#/components/parameters/RequiredChannelIdParamForDelete' +components: + schemas: + ErrorResponse: + allOf: + - $ref: '#/components/schemas/BaseError' + - type: object + properties: + errors: + $ref: '#/components/schemas/DetailedErrors' + x-internal: false + BaseError: + type: object + description: | + Error payload for the BigCommerce API. + properties: + status: + description: | + The HTTP status code. + type: integer + title: + description: | + The error title describing the particular error. + type: string + type: + type: string + instance: + type: string + x-internal: false + DetailedErrors: + type: object + properties: {} + additionalProperties: + type: string + x-internal: false + EmailTemplatesCollection: + title: EmailTemplatesCollection + type: array + items: + $ref: '#/components/schemas/EmailTemplate' + description: A collection of all email templates. + x-internal: false + EmailTemplate: + title: EmailTemplate + type: object + description: Data for a particular email template + properties: + type_id: + type: string + enum: + - abandoned_cart_email + - account_details_changed_email + - combined_order_status_email + - createaccount_email + - createguestaccount_email + - giftcertificate_email + - invoice_email + - ordermessage_notification + - return_confirmation_email + - return_statuschange_email + - product_review_email + - account_reset_password_email + example: account_reset_password_email + body: + type: string + example: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' + translations: + $ref: '#/components/schemas/LocaleCollection' + subject: + type: string + example: 'Reset your password at {{store.name}}' + x-internal: false + LocaleObject: + title: LocaleObject + type: object + properties: + locale: + type: string + example: en + description: 'Locale code for this language, such as "en", "en-us", "fr-ca".' + keys: + type: object + properties: {} + additionalProperties: true + example: + reset_password: 'To change your customer account password at {{name}} please click this link or copy and paste it into your browser:' + description: Language keys for the template. User-defined. Should match any lang keys used in the template. + description: A particular localeʼs translations. + x-internal: false + LocaleCollection: + title: LocaleCollection + type: array + items: + $ref: '#/components/schemas/LocaleObject' + description: A collection of locale translations for the static language. + x-internal: false + EmailTemplateUpdate: + title: EmailTemplateUpdate + type: object + description: Data for updated template + properties: + body: + type: string + example: ' Title

{{lang "reset_password" name=store.name}}



{{account.reset_password_link}} ' + translations: + $ref: '#/components/schemas/LocaleCollection' + subject: + type: string + example: 'Reset your password at {{store.name}}' + required: + - body + - lang + - subject + x-internal: false + scratch: + title: scratch + type: object + properties: + id: + type: string + x-internal: false + parameters: + Accept: + name: Accept + in: header + required: true + description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.' + schema: + type: string + default: 'application/json' + ContentType: + name: Content-Type + in: header + required: true + description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.' + schema: + type: string + default: 'application/json' + ChannelIdParam: + in: query + name: channel_id + schema: + type: integer + description: Channel ID to use for channel-specific settings. If omitted, you will interact with the global setting only. + RequiredChannelIdParamForDelete: + in: query + name: channel_id + schema: + type: integer + description: Required Channel ID. This delete operation will delete overridden settings for this channel, thus restoring them to the global defaults. + required: true + securitySchemes: + X-Auth-Token: + name: X-Auth-Token + description: |- + ### OAuth scopes + + | UI Name | Permission | Parameter | + |:--------|:-----------|:----------| + | Information & Settings | modify | `store_v2_information` | + | Information & Settings | read-only | `store_v2_information_read_only` | + + ### Authentication header + + | Header | Argument | Description | + |:-------|:---------|:------------| + | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). | + + ### Further reading + + For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests). + + For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes). + + For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes). + type: apiKey + in: header + diff --git a/reference/pages.v3.yml b/reference/pages.v3.yml index 80d81b5a1..08dd9e030 100644 --- a/reference/pages.v3.yml +++ b/reference/pages.v3.yml @@ -1,1088 +1,1088 @@ -openapi: 3.0.3 -info: - title: Pages V3 - version: '' - termsOfService: 'http://www.bigcommerce.com/terms' - contact: - name: BigCommerce - url: 'https://www.bigcommerce.com' - email: support@bigcommerce.com - description: |- - ## Overview - - A **page** appears on a **site** that is associated with a **channel**. - - Some pages, such as blog pages, contact forms, and plain-text or HTML pages, are web pages in the traditional sense. They contain markup (a `body`) and load at a relative page location on the site itself (the `url`). Other pages, such as link pages, make external or non-visual content available from the menu of a parent page or by direct link. - - ### Bulk operations - - All endpoints without a `pageId` path parameter support bulk operations. - - ### Page types - - The following table describes the types of pages that the Pages API can manage: - - | Page Type | Description | Body | - |:----------|:------------|:-----| - | `page` | A user-defined plain-text page. | text | - | `contact_form` | A user-customizable page that contains a contact form. | HTML | - | `raw` | A user-defined page that contains HTML markup or other stringified code. | HTML, other code | - | `blog` | A page that contains blog posts. Use caution; `blog`-type pages can only be created in the store control panel, but you may be able to change the type of a blog page to something else with this API. Use the [blog feature of the REST Content API](/docs/rest-content/store-content/blog-posts#create-a-blog-post) to work with blog posts and tags. | empty string | - | `link` | A link to an external absolute URL that follows [RFC 3986 standards](https://www.rfc-editor.org/rfc/rfc3986). Displays in the menu of other pages that contain markup. | — | -servers: - - url: 'https://api.bigcommerce.com/stores/{store_hash}/v3' - variables: - store_hash: - default: store_hash - description: Permanent ID of the BigCommerce store. - description: BigCommerce API Gateway -tags: - - name: Pages (Bulk) - - name: Pages (Single) -security: - - X-Auth-Token: [] -paths: - '/content/pages': - get: - operationId: getPages - tags: - - Pages (Bulk) - description: Returns one or more content pages. This endpoint supports bulk operations. - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/PagesCollectionResponse' - '400': - description: 'Bad Request; reasons for failure include passing query parameters that are not supported on this endpoint, but are common on other BigCommerce endpoints.' - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorDetailed' - '422': - description: Invalid input. Reasons for failure include passing supported parameters with values that have the incorrect datatype. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorItemized' - parameters: - - $ref: '#/components/parameters/channelIdQuery' - - $ref: '#/components/parameters/idInQueryGet' - - $ref: '#/components/parameters/nameQuery' - - $ref: '#/components/parameters/nameLikeQuery' - - $ref: '#/components/parameters/limitQuery' - - $ref: '#/components/parameters/pageQuery' - - $ref: '#/components/parameters/includeQuery' - summary: Get Pages - post: - operationId: createPages - tags: - - Pages (Bulk) - description: |- - Creates one or more content pages. This endpoint supports bulk operations. - - Web pages created via this endpoint are subject to the 4000 web page platform limit. Attempting to create pages over the limit will return an error. For more information on platform limits, see [Platform Limits (Help Center)](https://support.bigcommerce.com/s/article/Platform-Limits). - requestBody: - content: - application/json: - schema: - oneOf: - - title: "Create single page using object" - anyOf: - - $ref: '#/components/schemas/typePage' - - $ref: '#/components/schemas/typeBlog' - - $ref: '#/components/schemas/typeContactForm' - - $ref: '#/components/schemas/typeRaw' - - $ref: '#/components/schemas/typeLink' - - title: "Create multiple pages using array" - type: array - items: - anyOf: - - $ref: '#/components/schemas/typePage' - - $ref: '#/components/schemas/typeBlog' - - $ref: '#/components/schemas/typeContactForm' - - $ref: '#/components/schemas/typeRaw' - - $ref: '#/components/schemas/typeLink' - examples: - Create single page using object: - value: - channel_id: 1 - name: Content Page - is_visible: false - parent_id: 0 - sort_order: 0 - type: page - body:
Hello World!
- is_homepage: false - meta_title: My Content page - meta_keywords: string - meta_description: string - search_keywords: string - url: /my-content-page - Create multiple pages using array: - value: - - channel_id: 1 - name: Content Page - is_visible: false - parent_id: 0 - sort_order: 0 - type: page - body:
Hello World!
- is_homepage: false - meta_title: My Content page - meta_keywords: string - meta_description: string - search_keywords: string - url: /my-content-page - - channel_id: 547 - name: Content Page For Secondary Channel - is_visible: false - parent_id: 0 - sort_order: 0 - type: page - body:
Hello World!
- is_homepage: false - meta_title: My Content page - meta_keywords: string - meta_description: string - search_keywords: string - url: /my-content-page-for-secondary-channel - description: '' - required: true - responses: - '201': - $ref: '#/components/responses/HTTP201CreatePages' - '207': - $ref: '#/components/responses/HTTP207Response' - '422': - description: |- - The input was not valid. This is the result of missing required fields or other invalid arguments. See the response for more details. - - When making bulk requests, an invalid input in any one entry will cause the whole request to return 422. The entries that are valid will still be created. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorDetailed' - parameters: - - $ref: '#/components/parameters/includeQuery' - - $ref: '#/components/parameters/ContentType' - summary: Create Pages - put: - operationId: updatePages - tags: - - Pages (Bulk) - description: Updates one or more content pages. This endpoint supports bulk operations. - requestBody: - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/PagePutBulk' - - type: array - items: - $ref: '#/components/schemas/PagePutBulk' - responses: - '200': - description: | - Updated. - content: - application/json: - schema: - $ref: '#/components/schemas/PagesCollectionResponse' - examples: - Update meta descriptions for two pages: - value: - data: - - id: 20 - channel_id: 1 - name: Powder detergents - meta_title: '' - is_visible: false - parent_id: 0 - sort_order: 0 - meta_keywords: null - type: page - meta_description: eco-friendly - is_homepage: false - is_customers_only: false - search_keywords: '' - - id: 19 - channel_id: 1 - name: Contact us - meta_title: '' - email: '' - is_visible: false - parent_id: 0 - sort_order: 0 - meta_keywords: null - contact_fields: '' - type: contact_form - meta_description: contact - is_homepage: false - is_customers_only: false - search_keywords: '' - meta: {} - '404': - description: Not Found - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorBrief' - examples: - Not Found: - value: - status: 0 - title: string - type: string - '422': - description: The input was not valid. This is the result of missing required fields or other invalid arguments. See the response for more details. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorDetailed' - examples: - missing required field for type raw: - value: - status: 422 - title: Input is invalid - type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' - detail: 'missing the required field: body' - parameters: - - $ref: '#/components/parameters/includeQuery' - - $ref: '#/components/parameters/ContentType' - summary: Update Pages - delete: - operationId: deletePages - tags: - - Pages (Bulk) - description: |- - Deletes one or more content pages. This endpoint supports bulk operations. - - responses: - '204': - $ref: '#/components/responses/HTTP204' - '404': - description: Not Found. One of more of the pages specified for deletion did not exist. Specified pages that did exist were successfully deleted. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorBrief' - examples: - Page not found: - value: - status: 404 - title: A Page was not found with an ID of 100 - type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' - '422': - description: Invalid input. See response for details. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorDetailed' - examples: - Missing ID: - value: - status: 422 - title: Input is invalid - type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' - detail: 'missing the required field: id' - parameters: - - $ref: '#/components/parameters/idInQueryDelete' - - $ref: '#/components/parameters/deleteChildrenQuery' - summary: Delete Pages - parameters: - - $ref: '#/components/parameters/Accept' - '/content/pages/{pageId}': - get: - operationId: getPage - tags: - - Pages (Single) - description: |- - Returns one content page. - - > #### Warning - > **Pay attention to query parameters** - > This endpoint recognizes the same query parameters as [Get Multiple Pages](/docs/rest-content/pages#get-pages). If the requested page does not meet the query parameters you specify, you will receive a 404 response even if the requested `pageId` does exist. - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SinglePageResponse' - examples: - Blog: - value: - data: - id: 3 - channel_id: 1 - name: Blog - meta_title: Blog - is_visible: false - parent_id: 0 - sort_order: 4 - meta_keywords: '' - type: blog - meta_description: '' - is_homepage: false - is_customers_only: false - search_keywords: '0' - url: /blog/ - meta: {} - Contact form: - value: - data: - id: 5 - channel_id: 1 - name: Contact Us - meta_title: '' - email: '' - is_visible: true - parent_id: 0 - sort_order: 3 - meta_keywords: contact keyword - contact_fields: 'fullname,companyname,phone,orderno,rma' - type: contact_form - meta_description: contact meta desc - is_homepage: false - is_customers_only: true - search_keywords: contact search keyword - meta: {} - Page: - value: - data: - id: 16 - channel_id: 1 - name: Powder Detergents - meta_title: '' - is_visible: false - parent_id: 0 - sort_order: 0 - meta_keywords: null - type: page - meta_description: '' - is_homepage: false - is_customers_only: false - search_keywords: '' - meta: {} - Raw: - value: - data: - id: 17 - channel_id: 1 - name: Compare Detergents - is_visible: false - parent_id: 0 - sort_order: 0 - type: raw - is_homepage: false - is_customers_only: false - search_keywords: '' - content_type: text/html - meta: {} - Link: - value: - data: - id: 18 - channel_id: 1 - name: California carcinogen list - is_visible: false - parent_id: 0 - sort_order: 0 - link: 'https://california.example.com/known-carcinogens' - type: link - is_homepage: false - is_customers_only: false - meta: {} - '404': - description: Not Found. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorBrief' - examples: - pageId does not exist: - value: - status: 404 - title: A Page was not found with an ID of 99 - type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' - '422': - description: Invalid input. One or more path parameter(s) did not have the correct datatype. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorItemized' - examples: - pageId is bar: - value: - status: 422 - title: Invalid Input. - type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' - errors: - - bar - parameters: - - $ref: '#/components/parameters/includeQuery' - summary: Get a Page - put: - operationId: updatePage - tags: - - Pages (Single) - description: Updates one content page. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PagePutObj' - description: '' - required: true - responses: - '200': - description: |- - - content: - application/json: - schema: - $ref: '#/components/schemas/SinglePageResponse' - '400': - description: Bad Request; reasons for failure include invalid query parameters. See the response for more details. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorDetailed' - '404': - description: Not Found - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorBrief' - examples: - not found: - value: - status: 404 - title: A Page was not found with an ID of 99 - type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' - '422': - description: The input was not valid. This error is the result of missing required fields or other invalid arguments. See the response for more details. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorDetailed' - parameters: - - $ref: '#/components/parameters/ContentType' - - $ref: '#/components/parameters/includeQuery' - summary: Update a Page - delete: - operationId: deletePage - tags: - - Pages (Single) - description: |- - Deletes one content page. - - > #### Warning - > **Query parameters not recognized** - > This endpoint does not recognize query parameters. - responses: - '204': - $ref: '#/components/responses/HTTP204' - '404': - description: The page specified for deletion did not exist. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ResponseErrorBrief' - examples: - example-1: - value: - status: 404 - title: A Page was not found with an ID of 99 - type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' - parameters: [] - summary: Delete a Page - parameters: - - $ref: '#/components/parameters/Accept' - - $ref: '#/components/parameters/pageIdPath' -components: - parameters: - Accept: - name: Accept - in: header - required: true - schema: - type: string - default: application/json - ContentType: - name: Content-Type - in: header - required: true - schema: - type: string - default: application/json - pageIdPath: - schema: - type: string - name: pageId - in: path - required: true - description: The ID of the page to be operated on. - includeQuery: - style: form - explode: false - schema: - type: array - items: - type: string - enum: - - body - in: query - name: include - description: 'Include the requested property in the response. The `body` property returns the page’s markup, text, or raw content.' - channelIdQuery: - schema: - type: integer - in: query - name: channel_id - description: Return only pages associated with the specified channel. - idInQueryGet: - name: 'id:in' - description: A comma-separated string of page IDs to fetch. Supports bulk operations. If none of the page IDs passed exist, the query will return an empty `data` array. - style: form - explode: false - schema: - type: array - items: - type: integer - in: query - idInQueryDelete: - name: 'id:in' - description: Request deletion of multiple pages by passing a comma-separated string of corresponding page IDs. Supports bulk operations. - style: form - explode: false - schema: - type: array - items: - type: integer - in: query - required: true - deleteChildrenQuery: - name: 'delete_children' - example: true - description: | - When you explicitly set this query parameter to `true`, deleting a parent page will recursively delete all its immediate children and their descendants. - Otherwise, if you set this query parameter to `false` or not provided, deleting a parent page will update its immediate children by setting their `parent_id` to `0` and their `is_visible` status to `false`. - schema: - type: boolean - in: query - nameQuery: - schema: - type: string - in: query - name: name - description: Name of the page. - nameLikeQuery: - schema: - type: string - in: query - name: 'name:like' - description: Return only pages whose `name` or `body` contain the supplied string. - limitQuery: - schema: - type: integer - in: query - name: limit - description: The number of results to return per request. See `meta.pagination.per_page` in the response body. - pageQuery: - schema: - type: integer - in: query - name: page - description: The ordered grouping of results to return. See `meta.pagination.current_page` in the response body. - securitySchemes: - X-Auth-Token: - name: X-Auth-Token - description: |- - ### OAuth scopes - - | UI Name | Permission | Parameter | - |:--------|:-----------|:----------| - | Content | modify |`store_v2_content`| - | Content | read-only |`store_v2_content_read_only`| - - ### Authentication header - - | Header | Argument | Description | - |:-------|:---------|:------------| - | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). | - - ### Further reading - - For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests). - - For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes). - - For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes). - type: apiKey - in: header - schemas: - ResponseErrorBrief: - type: object - description: | - Error payload for the BigCommerce API. - properties: - status: - description: | - The HTTP status code. - type: integer - title: - description: | - The error title describing the particular error. - type: string - type: - type: string - required: - - status - ResponseErrorDetailed: - type: object - description: | - Error payload for the BigCommerce API. - properties: - status: - description: | - The HTTP status code. - type: integer - title: - description: | - The error title describing the particular error. - type: string - type: - type: string - detail: - type: string - required: - - status - ResponseErrorItemized: - type: object - description: | - Error payload for the BigCommerce API. - title: ResponseErrorItemized - properties: - status: - description: | - The HTTP status code. - type: integer - title: - description: | - The error title describing the particular error. - type: string - type: - type: string - errors: - type: array - items: - type: string - required: - - status - ResponseMeta: - type: object - description: | - Data about the response, including pagination and collection totals. - properties: - pagination: - type: object - description: | - Data about the response, including pagination and collection totals. - properties: - total: - type: integer - description: | - Total number of items in the result set. - count: - type: integer - description: | - Total number of items in the collection response. - per_page: - type: integer - description: | - The amount of items returned in the collection per page, controlled by the limit parameter. - current_page: - type: integer - description: | - The page you are currently on within the collection. - total_pages: - type: integer - description: | - The total number of pages in the collection. - links: - type: object - description: | - Pagination links for the previous and next parts of the whole collection. - properties: - previous: - type: string - description: | - Link to the previous page returned in the response. - current: - type: string - description: | - Link to the current page returned in the response. - next: - type: string - description: | - Link to the next page returned in the response. - PagesCollectionResponse: - description: | - Response payload for the BigCommerce API. - type: object - title: 'Body' - properties: - data: - type: array - items: - anyOf: - - $ref: '#/components/schemas/typePage' - - $ref: '#/components/schemas/typeBlog' - - $ref: '#/components/schemas/typeContactForm' - - $ref: '#/components/schemas/typeRaw' - - $ref: '#/components/schemas/typeLink' - meta: - $ref: '#/components/schemas/ResponseMeta' - SinglePageResponse: - description: | - Response payload for a single content page. - properties: - data: - anyOf: - - $ref: '#/components/schemas/typePage' - - $ref: '#/components/schemas/typeBlog' - - $ref: '#/components/schemas/typeContactForm' - - $ref: '#/components/schemas/typeRaw' - - $ref: '#/components/schemas/typeLink' - meta: - $ref: '#/components/schemas/ResponseMeta' - title: PageResponseObject - type: object - PagePutObj: - type: object - description: Properties of the page modification request body. - properties: - channel_id: - type: integer - description: | - The ID of the channel where this page should be shown. - example: 12 - default: 1 - name: - type: string - description: | - The name of the page. Must be unique. - minLength: 1 - maxLength: 100 - example: My Store Page - is_visible: - type: boolean - description: | - Boolean value that specifies the visibility of the page in the storefront’s navigation menu. - - Indicates whether the page is available to users and visible in any menus. - parent_id: - type: integer - description: | - ID of any parent Web page. - example: 0 - default: 0 - sort_order: - type: integer - description: | - Specifies the order in which the page is displayed on the storefront. (Lower integers specify earlier display.) - example: 0 - default: 0 - type: - type: string - description: |- - Specifies the type of page. See [Pages V3 page types](/docs/rest-content/pages#page-types) for more about the differences. - example: page - enum: - - page - - raw - - contact_form - - link - - blog - body: - type: string - description: | - HTML or variable that populates the element of this page, in default/desktop view. Required in a `POST` request if the page type is `raw`. - example:
Hello World!
- nullable: true - is_homepage: - type: boolean - description: | - Boolean value that specifies whether this page is the storefront’s home page. - is_customers_only: - type: boolean - description: | - Boolean value. When `true`, this page is visible only to logged-in customers. - email: - type: string - description: 'Applicable when the page type is `contact_form`: contact email address that receives messages sent via the form. Must be unique.' - maxLength: 255 - meta_title: - type: string - nullable: true - link: - type: string - description: | - Required in a `POST` request to create a link if the page type is `link`. - contact_fields: - type: string - description: | - Applicable when the page type is `contact_form`: comma-separated list of keywords representing the fields enabled in the control panel for storefront display. Possible fields include: - - |Field|Description| - |-|-| - |`fullname`|Full name of the customer submitting the form| - |`phone`|Customer’s phone number, as submitted on the form| - |`companyname`|Customer’s submitted company name| - |`orderno`|Customer’s submitted order number| - |`rma`|Customer’s submitted RMA (Return Merchandise Authorization) number| - example: 'fullname,companyname,phone,orderno,rma' - meta_keywords: - description: | - Comma-separated list of SEO-relevant keywords to include in the element of this page. - default: '' - type: string - nullable: true - meta_description: - type: string - description: | - Description contained within the element of this page. - nullable: true - search_keywords: - type: string - description: | - Comma-separated list of keywords that shoppers can use to locate this page when searching the store. - example: 'trousers,pockets,luxury' - nullable: true - url: - type: string - description: | - Relative URL on the storefront for this page. - example: /my-store-page - PagePutBulk: - allOf: - - type: object - properties: - id: - type: integer - description: The ID of the target page. - - $ref: '#/components/schemas/PagePutObj' - required: - - id - anyTypePage: - type: object - description: | - Properties of all Pages V3 pages. - properties: - id: - type: integer - nullable: false - readOnly: true - channel_id: - type: integer - default: 1 - readOnly: true - name: - type: string - description: The name of the page. Must be unique. - minLength: 1 - maxLength: 100 - uniqueItems: true - example: About Our Company - nullable: false - readOnly: false - is_visible: - type: boolean - example: true - default: true - description: A boolean value that controls whether the page is available to users or visible in any navigation menus. - parent_id: - type: integer - description: 'ID of the parent page, if any.' - example: 0 - default: 0 - sort_order: - type: integer - description: Determines the order in which the page is displayed in the parent page’s menu. Pages with lower integers display earlier. - example: 0 - type: - type: string - description: 'Determines the type of page. See [Pages V3 page types](/docs/rest-content/pages#page-types) for more about the differences.' - nullable: false - example: page - enum: - - page - - raw - - contact_form - - link - - blog - is_homepage: - type: boolean - description: 'Determines whether this page loads at the siteʼs root route. For example, at `https://example.com/`.' - default: false - is_customers_only: - type: boolean - description: 'When `true`, this page is visible only to logged-in customers.' - default: false - url: - type: string - description: | - Relative URL on the storefront for this page. - example: /my-store-page - required: - - name - - type - typePage: - description: | - `type: page`. A user-defined plain-text page. - title: page - allOf: - - $ref: '#/components/schemas/anyTypePage' - - $ref: '#/components/schemas/pageMeta' - - $ref: '#/components/schemas/searchKeywords' - typeBlog: - description: |- - A page that contains blog posts. Use caution; `blog`-type pages can only be created in the store control panel, but you may be able to change the type of a blog page to something else with this API. Use the [blog feature of the REST Content API](/docs/rest-content/store-content/blog-posts#create-a-blog-post) to work with blog posts and tags. - title: blog - allOf: - - readOnly: true - - $ref: '#/components/schemas/anyTypePage' - - $ref: '#/components/schemas/pageMeta' - - $ref: '#/components/schemas/searchKeywords' - - type: object - properties: - url: - type: string - description: | - Relative URL on the storefront for this page. - example: /blog/ - typeContactForm: - description: |- - `type: contact_form`. A user-customizable page that contains a contact form. Body content returns HTML. - title: contact form - allOf: - - $ref: '#/components/schemas/anyTypePage' - - $ref: '#/components/schemas/pageMeta' - - $ref: '#/components/schemas/searchKeywords' - - type: object - properties: - email: - type: string - description: 'Applicable when the page type is `contact_form`: contact email address that receives messages sent using the form. Must be unique.' - maxLength: 255 - contact_fields: - type: string - description: | - A comma-separated list of the contact field forms that are enabled in the store control panel for display on the subject storefront. Possible fields include: - - | Field | Description | - |:------|:------------| - | `fullname` | The full name of the customer submitting the form. | - | `phone` | The customer’s phone number. | - | `companyname` | The customer’s company name. | - | `orderno` | A field that lets customers specify a subject order number. | - | `rma` | A customer’s submitted RMA (Return Merchandise Authorization) number. | - example: 'fullname,companyname,phone,orderno,rma' - typeRaw: - description: |- - `type: raw`. A user-defined page with a body that contains HTML markup or other stringified code. - title: raw - allOf: - - $ref: '#/components/schemas/anyTypePage' - - $ref: '#/components/schemas/searchKeywords' - - type: object - properties: - body: - type: string - description: | - HTML or variable that populates the element of this page, in default/desktop view. Required in a `POST` request if the page type is `raw`. - example: '
Hello World!
' - nullable: true - content_type: - type: string - description: The MIME type of the page body. - example: text/html - required: - - body - typeLink: - description: |- - `type: link`. A link to an external absolute URL. Displays in the menu of other pages that contain markup. Does not contain a body. - title: link - allOf: - - $ref: '#/components/schemas/anyTypePage' - - type: object - properties: - link: - type: string - description: The link for the page type `link`. - required: - - link - pageMeta: - type: object - properties: - meta_title: - type: string - nullable: true - meta_keywords: - description: | - Comma-separated list of SEO-relevant keywords to include in the element of this page. - default: '""' - type: string - nullable: true - meta_description: - type: string - default: '""' - description: | - Description contained within the element of this page. - nullable: true - searchKeywords: - type: object - properties: - search_keywords: - type: string - description: | - Comma-separated list of keywords that shoppers can use to locate this page when searching the store. - example: 'trousers,pockets,luxury' - nullable: true - default: '""' - readOnly: false - responses: - HTTP207Response: - description: 'Multiple operations have occurred and the status for each operation can be viewed in the body of the response. Typically indicates that a partial failure has occurred, such as when a `POST` or `PUT` request is successful, but saving the URL has failed.' - content: - application/json: - schema: {} - HTTP201CreatePages: - description: |- - Created. - - Response.data will inherit the data type of the request. A single entry passed as an object will return an object for the data property. Any number of entries passed in an array will return an array for the data property. - - Properties associated with a page `type` that are not required to create an entry will be created with default values. - - When you make bulk requests, an invalid input in any one entry will return 422. The entries that are valid will still be created. - content: - application/json: - schema: - type: object - properties: - data: - anyOf: - - $ref: '#/components/schemas/typePage' - - $ref: '#/components/schemas/typeBlog' - - $ref: '#/components/schemas/typeContactForm' - - $ref: '#/components/schemas/typeRaw' - - $ref: '#/components/schemas/typeLink' - meta: - $ref: '#/components/schemas/ResponseMeta' - HTTP204: - description: No content. A 204 response with no payload indicates successful deletion of all specified pages. +openapi: 3.0.3 +info: + title: Pages V3 + version: '' + termsOfService: 'http://www.bigcommerce.com/terms' + contact: + name: BigCommerce + url: 'https://www.bigcommerce.com' + email: support@bigcommerce.com + description: |- + ## Overview + + A **page** appears on a **site** that is associated with a **channel**. + + Some pages, such as blog pages, contact forms, and plain-text or HTML pages, are web pages in the traditional sense. They contain markup (a `body`) and load at a relative page location on the site itself (the `url`). Other pages, such as link pages, make external or non-visual content available from the menu of a parent page or by direct link. + + ### Bulk operations + + All endpoints without a `pageId` path parameter support bulk operations. + + ### Page types + + The following table describes the types of pages that the Pages API can manage: + + | Page Type | Description | Body | + |:----------|:------------|:-----| + | `page` | A user-defined plain-text page. | text | + | `contact_form` | A user-customizable page that contains a contact form. | HTML | + | `raw` | A user-defined page that contains HTML markup or other stringified code. | HTML, other code | + | `blog` | A page that contains blog posts. Use caution; `blog`-type pages can only be created in the store control panel, but you may be able to change the type of a blog page to something else with this API. Use the [blog feature of the REST Content API](/docs/rest-content/store-content/blog-posts#create-a-blog-post) to work with blog posts and tags. | empty string | + | `link` | A link to an external absolute URL that follows [RFC 3986 standards](https://www.rfc-editor.org/rfc/rfc3986). Displays in the menu of other pages that contain markup. | — | +servers: + - url: 'https://api.bigcommerce.com/stores/{store_hash}/v3' + variables: + store_hash: + default: store_hash + description: Permanent ID of the BigCommerce store. + description: BigCommerce API Gateway +tags: + - name: Pages (Bulk) + - name: Pages (Single) +security: + - X-Auth-Token: [] +paths: + '/content/pages': + get: + operationId: getPages + tags: + - Pages (Bulk) + description: Returns one or more content pages. This endpoint supports bulk operations. + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PagesCollectionResponse' + '400': + description: 'Bad Request; reasons for failure include passing query parameters that are not supported on this endpoint, but are common on other BigCommerce endpoints.' + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorDetailed' + '422': + description: Invalid input. Reasons for failure include passing supported parameters with values that have the incorrect datatype. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorItemized' + parameters: + - $ref: '#/components/parameters/channelIdQuery' + - $ref: '#/components/parameters/idInQueryGet' + - $ref: '#/components/parameters/nameQuery' + - $ref: '#/components/parameters/nameLikeQuery' + - $ref: '#/components/parameters/limitQuery' + - $ref: '#/components/parameters/pageQuery' + - $ref: '#/components/parameters/includeQuery' + summary: Get Pages + post: + operationId: createPages + tags: + - Pages (Bulk) + description: |- + Creates one or more content pages. This endpoint supports bulk operations. + + Web pages created via this endpoint are subject to the 4000 web page platform limit. Attempting to create pages over the limit will return an error. For more information on platform limits, see [Platform Limits (Help Center)](https://support.bigcommerce.com/s/article/Platform-Limits). + requestBody: + content: + application/json: + schema: + oneOf: + - title: "Create single page using object" + anyOf: + - $ref: '#/components/schemas/typePage' + - $ref: '#/components/schemas/typeBlog' + - $ref: '#/components/schemas/typeContactForm' + - $ref: '#/components/schemas/typeRaw' + - $ref: '#/components/schemas/typeLink' + - title: "Create multiple pages using array" + type: array + items: + anyOf: + - $ref: '#/components/schemas/typePage' + - $ref: '#/components/schemas/typeBlog' + - $ref: '#/components/schemas/typeContactForm' + - $ref: '#/components/schemas/typeRaw' + - $ref: '#/components/schemas/typeLink' + examples: + Create single page using object: + value: + channel_id: 1 + name: Content Page + is_visible: false + parent_id: 0 + sort_order: 0 + type: page + body:
Hello World!
+ is_homepage: false + meta_title: My Content page + meta_keywords: string + meta_description: string + search_keywords: string + url: /my-content-page + Create multiple pages using array: + value: + - channel_id: 1 + name: Content Page + is_visible: false + parent_id: 0 + sort_order: 0 + type: page + body:
Hello World!
+ is_homepage: false + meta_title: My Content page + meta_keywords: string + meta_description: string + search_keywords: string + url: /my-content-page + - channel_id: 547 + name: Content Page For Secondary Channel + is_visible: false + parent_id: 0 + sort_order: 0 + type: page + body:
Hello World!
+ is_homepage: false + meta_title: My Content page + meta_keywords: string + meta_description: string + search_keywords: string + url: /my-content-page-for-secondary-channel + description: '' + required: true + responses: + '201': + $ref: '#/components/responses/HTTP201CreatePages' + '207': + $ref: '#/components/responses/HTTP207Response' + '422': + description: |- + The input was not valid. This is the result of missing required fields or other invalid arguments. See the response for more details. + + When making bulk requests, an invalid input in any one entry will cause the whole request to return 422. The entries that are valid will still be created. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorDetailed' + parameters: + - $ref: '#/components/parameters/includeQuery' + - $ref: '#/components/parameters/ContentType' + summary: Create Pages + put: + operationId: updatePages + tags: + - Pages (Bulk) + description: Updates one or more content pages. This endpoint supports bulk operations. + requestBody: + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/PagePutBulk' + - type: array + items: + $ref: '#/components/schemas/PagePutBulk' + responses: + '200': + description: | + Updated. + content: + application/json: + schema: + $ref: '#/components/schemas/PagesCollectionResponse' + examples: + Update meta descriptions for two pages: + value: + data: + - id: 20 + channel_id: 1 + name: Powder detergents + meta_title: '' + is_visible: false + parent_id: 0 + sort_order: 0 + meta_keywords: null + type: page + meta_description: eco-friendly + is_homepage: false + is_customers_only: false + search_keywords: '' + - id: 19 + channel_id: 1 + name: Contact us + meta_title: '' + email: '' + is_visible: false + parent_id: 0 + sort_order: 0 + meta_keywords: null + contact_fields: '' + type: contact_form + meta_description: contact + is_homepage: false + is_customers_only: false + search_keywords: '' + meta: {} + '404': + description: Not Found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorBrief' + examples: + Not Found: + value: + status: 0 + title: string + type: string + '422': + description: The input was not valid. This is the result of missing required fields or other invalid arguments. See the response for more details. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorDetailed' + examples: + missing required field for type raw: + value: + status: 422 + title: Input is invalid + type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' + detail: 'missing the required field: body' + parameters: + - $ref: '#/components/parameters/includeQuery' + - $ref: '#/components/parameters/ContentType' + summary: Update Pages + delete: + operationId: deletePages + tags: + - Pages (Bulk) + description: |- + Deletes one or more content pages. This endpoint supports bulk operations. + + responses: + '204': + $ref: '#/components/responses/HTTP204' + '404': + description: Not Found. One of more of the pages specified for deletion did not exist. Specified pages that did exist were successfully deleted. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorBrief' + examples: + Page not found: + value: + status: 404 + title: A Page was not found with an ID of 100 + type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' + '422': + description: Invalid input. See response for details. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorDetailed' + examples: + Missing ID: + value: + status: 422 + title: Input is invalid + type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' + detail: 'missing the required field: id' + parameters: + - $ref: '#/components/parameters/idInQueryDelete' + - $ref: '#/components/parameters/deleteChildrenQuery' + summary: Delete Pages + parameters: + - $ref: '#/components/parameters/Accept' + '/content/pages/{pageId}': + get: + operationId: getPage + tags: + - Pages (Single) + description: |- + Returns one content page. + + > #### Warning + > **Pay attention to query parameters** + > This endpoint recognizes the same query parameters as [Get Multiple Pages](/docs/rest-content/pages#get-pages). If the requested page does not meet the query parameters you specify, you will receive a 404 response even if the requested `pageId` does exist. + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SinglePageResponse' + examples: + Blog: + value: + data: + id: 3 + channel_id: 1 + name: Blog + meta_title: Blog + is_visible: false + parent_id: 0 + sort_order: 4 + meta_keywords: '' + type: blog + meta_description: '' + is_homepage: false + is_customers_only: false + search_keywords: '0' + url: /blog/ + meta: {} + Contact form: + value: + data: + id: 5 + channel_id: 1 + name: Contact Us + meta_title: '' + email: '' + is_visible: true + parent_id: 0 + sort_order: 3 + meta_keywords: contact keyword + contact_fields: 'fullname,companyname,phone,orderno,rma' + type: contact_form + meta_description: contact meta desc + is_homepage: false + is_customers_only: true + search_keywords: contact search keyword + meta: {} + Page: + value: + data: + id: 16 + channel_id: 1 + name: Powder Detergents + meta_title: '' + is_visible: false + parent_id: 0 + sort_order: 0 + meta_keywords: null + type: page + meta_description: '' + is_homepage: false + is_customers_only: false + search_keywords: '' + meta: {} + Raw: + value: + data: + id: 17 + channel_id: 1 + name: Compare Detergents + is_visible: false + parent_id: 0 + sort_order: 0 + type: raw + is_homepage: false + is_customers_only: false + search_keywords: '' + content_type: text/html + meta: {} + Link: + value: + data: + id: 18 + channel_id: 1 + name: California carcinogen list + is_visible: false + parent_id: 0 + sort_order: 0 + link: 'https://california.example.com/known-carcinogens' + type: link + is_homepage: false + is_customers_only: false + meta: {} + '404': + description: Not Found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorBrief' + examples: + pageId does not exist: + value: + status: 404 + title: A Page was not found with an ID of 99 + type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' + '422': + description: Invalid input. One or more path parameter(s) did not have the correct datatype. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorItemized' + examples: + pageId is bar: + value: + status: 422 + title: Invalid Input. + type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' + errors: + - bar + parameters: + - $ref: '#/components/parameters/includeQuery' + summary: Get a Page + put: + operationId: updatePage + tags: + - Pages (Single) + description: Updates one content page. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PagePutObj' + description: '' + required: true + responses: + '200': + description: |- + + content: + application/json: + schema: + $ref: '#/components/schemas/SinglePageResponse' + '400': + description: Bad Request; reasons for failure include invalid query parameters. See the response for more details. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorDetailed' + '404': + description: Not Found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorBrief' + examples: + not found: + value: + status: 404 + title: A Page was not found with an ID of 99 + type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' + '422': + description: The input was not valid. This error is the result of missing required fields or other invalid arguments. See the response for more details. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorDetailed' + parameters: + - $ref: '#/components/parameters/ContentType' + - $ref: '#/components/parameters/includeQuery' + summary: Update a Page + delete: + operationId: deletePage + tags: + - Pages (Single) + description: |- + Deletes one content page. + + > #### Warning + > **Query parameters not recognized** + > This endpoint does not recognize query parameters. + responses: + '204': + $ref: '#/components/responses/HTTP204' + '404': + description: The page specified for deletion did not exist. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ResponseErrorBrief' + examples: + example-1: + value: + status: 404 + title: A Page was not found with an ID of 99 + type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' + parameters: [] + summary: Delete a Page + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/pageIdPath' +components: + parameters: + Accept: + name: Accept + in: header + required: true + schema: + type: string + default: application/json + ContentType: + name: Content-Type + in: header + required: true + schema: + type: string + default: application/json + pageIdPath: + schema: + type: string + name: pageId + in: path + required: true + description: The ID of the page to be operated on. + includeQuery: + style: form + explode: false + schema: + type: array + items: + type: string + enum: + - body + in: query + name: include + description: 'Include the requested property in the response. The `body` property returns the page’s markup, text, or raw content.' + channelIdQuery: + schema: + type: integer + in: query + name: channel_id + description: Return only pages associated with the specified channel. + idInQueryGet: + name: 'id:in' + description: A comma-separated string of page IDs to fetch. Supports bulk operations. If none of the page IDs passed exist, the query will return an empty `data` array. + style: form + explode: false + schema: + type: array + items: + type: integer + in: query + idInQueryDelete: + name: 'id:in' + description: Request deletion of multiple pages by passing a comma-separated string of corresponding page IDs. Supports bulk operations. + style: form + explode: false + schema: + type: array + items: + type: integer + in: query + required: true + deleteChildrenQuery: + name: 'delete_children' + example: true + description: | + When you explicitly set this query parameter to `true`, deleting a parent page will recursively delete all its immediate children and their descendants. + Otherwise, if you set this query parameter to `false` or not provided, deleting a parent page will update its immediate children by setting their `parent_id` to `0` and their `is_visible` status to `false`. + schema: + type: boolean + in: query + nameQuery: + schema: + type: string + in: query + name: name + description: Name of the page. + nameLikeQuery: + schema: + type: string + in: query + name: 'name:like' + description: Return only pages whose `name` or `body` contain the supplied string. + limitQuery: + schema: + type: integer + in: query + name: limit + description: The number of results to return per request. See `meta.pagination.per_page` in the response body. + pageQuery: + schema: + type: integer + in: query + name: page + description: The ordered grouping of results to return. See `meta.pagination.current_page` in the response body. + securitySchemes: + X-Auth-Token: + name: X-Auth-Token + description: |- + ### OAuth scopes + + | UI Name | Permission | Parameter | + |:--------|:-----------|:----------| + | Content | modify |`store_v2_content`| + | Content | read-only |`store_v2_content_read_only`| + + ### Authentication header + + | Header | Argument | Description | + |:-------|:---------|:------------| + | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). | + + ### Further reading + + For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests). + + For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes). + + For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes). + type: apiKey + in: header + schemas: + ResponseErrorBrief: + type: object + description: | + Error payload for the BigCommerce API. + properties: + status: + description: | + The HTTP status code. + type: integer + title: + description: | + The error title describing the particular error. + type: string + type: + type: string + required: + - status + ResponseErrorDetailed: + type: object + description: | + Error payload for the BigCommerce API. + properties: + status: + description: | + The HTTP status code. + type: integer + title: + description: | + The error title describing the particular error. + type: string + type: + type: string + detail: + type: string + required: + - status + ResponseErrorItemized: + type: object + description: | + Error payload for the BigCommerce API. + title: ResponseErrorItemized + properties: + status: + description: | + The HTTP status code. + type: integer + title: + description: | + The error title describing the particular error. + type: string + type: + type: string + errors: + type: array + items: + type: string + required: + - status + ResponseMeta: + type: object + description: | + Data about the response, including pagination and collection totals. + properties: + pagination: + type: object + description: | + Data about the response, including pagination and collection totals. + properties: + total: + type: integer + description: | + Total number of items in the result set. + count: + type: integer + description: | + Total number of items in the collection response. + per_page: + type: integer + description: | + The amount of items returned in the collection per page, controlled by the limit parameter. + current_page: + type: integer + description: | + The page you are currently on within the collection. + total_pages: + type: integer + description: | + The total number of pages in the collection. + links: + type: object + description: | + Pagination links for the previous and next parts of the whole collection. + properties: + previous: + type: string + description: | + Link to the previous page returned in the response. + current: + type: string + description: | + Link to the current page returned in the response. + next: + type: string + description: | + Link to the next page returned in the response. + PagesCollectionResponse: + description: | + Response payload for the BigCommerce API. + type: object + title: 'Body' + properties: + data: + type: array + items: + anyOf: + - $ref: '#/components/schemas/typePage' + - $ref: '#/components/schemas/typeBlog' + - $ref: '#/components/schemas/typeContactForm' + - $ref: '#/components/schemas/typeRaw' + - $ref: '#/components/schemas/typeLink' + meta: + $ref: '#/components/schemas/ResponseMeta' + SinglePageResponse: + description: | + Response payload for a single content page. + properties: + data: + anyOf: + - $ref: '#/components/schemas/typePage' + - $ref: '#/components/schemas/typeBlog' + - $ref: '#/components/schemas/typeContactForm' + - $ref: '#/components/schemas/typeRaw' + - $ref: '#/components/schemas/typeLink' + meta: + $ref: '#/components/schemas/ResponseMeta' + title: PageResponseObject + type: object + PagePutObj: + type: object + description: Properties of the page modification request body. + properties: + channel_id: + type: integer + description: | + The ID of the channel where this page should be shown. + example: 12 + default: 1 + name: + type: string + description: | + The name of the page. Must be unique. + minLength: 1 + maxLength: 100 + example: My Store Page + is_visible: + type: boolean + description: | + Boolean value that specifies the visibility of the page in the storefront’s navigation menu. + + Indicates whether the page is available to users and visible in any menus. + parent_id: + type: integer + description: | + ID of any parent Web page. + example: 0 + default: 0 + sort_order: + type: integer + description: | + Specifies the order in which the page is displayed on the storefront. (Lower integers specify earlier display.) + example: 0 + default: 0 + type: + type: string + description: |- + Specifies the type of page. See [Pages V3 page types](/docs/rest-content/pages#page-types) for more about the differences. + example: page + enum: + - page + - raw + - contact_form + - link + - blog + body: + type: string + description: | + HTML or variable that populates the element of this page, in default/desktop view. Required in a `POST` request if the page type is `raw`. + example:
Hello World!
+ nullable: true + is_homepage: + type: boolean + description: | + Boolean value that specifies whether this page is the storefront’s home page. + is_customers_only: + type: boolean + description: | + Boolean value. When `true`, this page is visible only to logged-in customers. + email: + type: string + description: 'Applicable when the page type is `contact_form`: contact email address that receives messages sent via the form. Must be unique.' + maxLength: 255 + meta_title: + type: string + nullable: true + link: + type: string + description: | + Required in a `POST` request to create a link if the page type is `link`. + contact_fields: + type: string + description: | + Applicable when the page type is `contact_form`: comma-separated list of keywords representing the fields enabled in the control panel for storefront display. Possible fields include: + + |Field|Description| + |-|-| + |`fullname`|Full name of the customer submitting the form| + |`phone`|Customer’s phone number, as submitted on the form| + |`companyname`|Customer’s submitted company name| + |`orderno`|Customer’s submitted order number| + |`rma`|Customer’s submitted RMA (Return Merchandise Authorization) number| + example: 'fullname,companyname,phone,orderno,rma' + meta_keywords: + description: | + Comma-separated list of SEO-relevant keywords to include in the element of this page. + default: '' + type: string + nullable: true + meta_description: + type: string + description: | + Description contained within the element of this page. + nullable: true + search_keywords: + type: string + description: | + Comma-separated list of keywords that shoppers can use to locate this page when searching the store. + example: 'trousers,pockets,luxury' + nullable: true + url: + type: string + description: | + Relative URL on the storefront for this page. + example: /my-store-page + PagePutBulk: + allOf: + - type: object + properties: + id: + type: integer + description: The ID of the target page. + - $ref: '#/components/schemas/PagePutObj' + required: + - id + anyTypePage: + type: object + description: | + Properties of all Pages V3 pages. + properties: + id: + type: integer + nullable: false + readOnly: true + channel_id: + type: integer + default: 1 + readOnly: true + name: + type: string + description: The name of the page. Must be unique. + minLength: 1 + maxLength: 100 + uniqueItems: true + example: About Our Company + nullable: false + readOnly: false + is_visible: + type: boolean + example: true + default: true + description: A boolean value that controls whether the page is available to users or visible in any navigation menus. + parent_id: + type: integer + description: 'ID of the parent page, if any.' + example: 0 + default: 0 + sort_order: + type: integer + description: Determines the order in which the page is displayed in the parent page’s menu. Pages with lower integers display earlier. + example: 0 + type: + type: string + description: 'Determines the type of page. See [Pages V3 page types](/docs/rest-content/pages#page-types) for more about the differences.' + nullable: false + example: page + enum: + - page + - raw + - contact_form + - link + - blog + is_homepage: + type: boolean + description: 'Determines whether this page loads at the siteʼs root route. For example, at `https://example.com/`.' + default: false + is_customers_only: + type: boolean + description: 'When `true`, this page is visible only to logged-in customers.' + default: false + url: + type: string + description: | + Relative URL on the storefront for this page. + example: /my-store-page + required: + - name + - type + typePage: + description: | + `type: page`. A user-defined plain-text page. + title: page + allOf: + - $ref: '#/components/schemas/anyTypePage' + - $ref: '#/components/schemas/pageMeta' + - $ref: '#/components/schemas/searchKeywords' + typeBlog: + description: |- + A page that contains blog posts. Use caution; `blog`-type pages can only be created in the store control panel, but you may be able to change the type of a blog page to something else with this API. Use the [blog feature of the REST Content API](/docs/rest-content/store-content/blog-posts#create-a-blog-post) to work with blog posts and tags. + title: blog + allOf: + - readOnly: true + - $ref: '#/components/schemas/anyTypePage' + - $ref: '#/components/schemas/pageMeta' + - $ref: '#/components/schemas/searchKeywords' + - type: object + properties: + url: + type: string + description: | + Relative URL on the storefront for this page. + example: /blog/ + typeContactForm: + description: |- + `type: contact_form`. A user-customizable page that contains a contact form. Body content returns HTML. + title: contact form + allOf: + - $ref: '#/components/schemas/anyTypePage' + - $ref: '#/components/schemas/pageMeta' + - $ref: '#/components/schemas/searchKeywords' + - type: object + properties: + email: + type: string + description: 'Applicable when the page type is `contact_form`: contact email address that receives messages sent using the form. Must be unique.' + maxLength: 255 + contact_fields: + type: string + description: | + A comma-separated list of the contact field forms that are enabled in the store control panel for display on the subject storefront. Possible fields include: + + | Field | Description | + |:------|:------------| + | `fullname` | The full name of the customer submitting the form. | + | `phone` | The customer’s phone number. | + | `companyname` | The customer’s company name. | + | `orderno` | A field that lets customers specify a subject order number. | + | `rma` | A customer’s submitted RMA (Return Merchandise Authorization) number. | + example: 'fullname,companyname,phone,orderno,rma' + typeRaw: + description: |- + `type: raw`. A user-defined page with a body that contains HTML markup or other stringified code. + title: raw + allOf: + - $ref: '#/components/schemas/anyTypePage' + - $ref: '#/components/schemas/searchKeywords' + - type: object + properties: + body: + type: string + description: | + HTML or variable that populates the element of this page, in default/desktop view. Required in a `POST` request if the page type is `raw`. + example: '
Hello World!
' + nullable: true + content_type: + type: string + description: The MIME type of the page body. + example: text/html + required: + - body + typeLink: + description: |- + `type: link`. A link to an external absolute URL. Displays in the menu of other pages that contain markup. Does not contain a body. + title: link + allOf: + - $ref: '#/components/schemas/anyTypePage' + - type: object + properties: + link: + type: string + description: The link for the page type `link`. + required: + - link + pageMeta: + type: object + properties: + meta_title: + type: string + nullable: true + meta_keywords: + description: | + Comma-separated list of SEO-relevant keywords to include in the element of this page. + default: '""' + type: string + nullable: true + meta_description: + type: string + default: '""' + description: | + Description contained within the element of this page. + nullable: true + searchKeywords: + type: object + properties: + search_keywords: + type: string + description: | + Comma-separated list of keywords that shoppers can use to locate this page when searching the store. + example: 'trousers,pockets,luxury' + nullable: true + default: '""' + readOnly: false + responses: + HTTP207Response: + description: 'Multiple operations have occurred and the status for each operation can be viewed in the body of the response. Typically indicates that a partial failure has occurred, such as when a `POST` or `PUT` request is successful, but saving the URL has failed.' + content: + application/json: + schema: {} + HTTP201CreatePages: + description: |- + Created. + + Response.data will inherit the data type of the request. A single entry passed as an object will return an object for the data property. Any number of entries passed in an array will return an array for the data property. + + Properties associated with a page `type` that are not required to create an entry will be created with default values. + + When you make bulk requests, an invalid input in any one entry will return 422. The entries that are valid will still be created. + content: + application/json: + schema: + type: object + properties: + data: + anyOf: + - $ref: '#/components/schemas/typePage' + - $ref: '#/components/schemas/typeBlog' + - $ref: '#/components/schemas/typeContactForm' + - $ref: '#/components/schemas/typeRaw' + - $ref: '#/components/schemas/typeLink' + meta: + $ref: '#/components/schemas/ResponseMeta' + HTTP204: + description: No content. A 204 response with no payload indicates successful deletion of all specified pages. diff --git a/reference/pricing.sf.yml b/reference/pricing.sf.yml index 3f89b80cf..ede634aac 100644 --- a/reference/pricing.sf.yml +++ b/reference/pricing.sf.yml @@ -1,997 +1,997 @@ -openapi: '3.0.1' -info: - title: Pricing - description: |- - Get product pricing on BigCommerce-hosted storefronts. To work with headless storefronts, use the [GraphQL Storefront API](/graphql-storefront/reference). - - The REST Storefront API uses [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) headers for authentication, and therefore has no required scopes. You do not need to send any BigCommerce-specific tokens with your requests to these endpoints. - - For info about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#same-origin-cors-authentication). - termsOfService: 'https://www.bigcommerce.com/terms' - contact: - name: BigCommerce - url: 'https://www.bigcommerce.com' - email: support@bigcommerce.com - version: '' -servers: - - url: 'https://api.bigcommerce.com/stores/{store_hash}/v3' - variables: - store_hash: - default: store_hash - description: Permanent ID of the BigCommerce store. - description: BigCommerce API Gateway -security: - - X-Auth-Token: [] -tags: - - name: Products -paths: - '/pricing/products': - post: - tags: - - Products - summary: Get Prices (Batch) - description: |- - Calculate batch pricing for products for a specific channel, currency, and customer group. - - The rounded prices in this endpoint's response will align with the currency's decimal precision as defined in the [currency](https://support.bigcommerce.com/s/article/Managing-Currencies?language=en_US#add) settings page. - - **Limits** - * Limit of 50 concurrent requests. - operationId: getPrices - requestBody: - content: - application/json: - schema: - required: - - channel_id - - currency_code - - items - type: object - properties: - channel_id: - type: integer - description: The channel ID that pricing evaluates within. The default BigCommerce storefront is channel 1. - example: 1 - currency_code: - type: string - description: The currency code of prices this request returns. - - example: USD - country_code: - type: string - description: An ISO 3166-1 alpha-2 shopper's country code representing a country or special geographic area. - example: US - customer_group_id: - type: integer - description: The customer group ID that's relevant for any customer group pricing, tax values, etc. - customer_id: - type: integer - description: The ID of the customer for whom to fetch prices. - items: - type: array - description: The items for which to fetch prices. - - items: - type: object - properties: - product_id: - type: integer - description: The (required) product ID of the item. - variant_id: - type: number - description: The (optional) variant ID of the item. - options: - type: array - description: The option configuration of the product (optional); might be partially configured for estimates. - items: - type: object - properties: - option_id: - type: integer - description: The ID of the variant option or modifier option that is being configured for this product. - value_id: - type: integer - description: |- - The ID of the value matching the option that's being configured. - - **Note:*** This must be the ID, not the value. - - description: Details/configuration for the product to request a price for. - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - description: Note that a storeʼs [tax settings](/docs/rest-management/tax-settings) may affect the calculations for `tax_inclusive` and `tax_exclusive` prices. - properties: - data: - type: array - items: - allOf: - - $ref: '#/components/schemas/ReferenceRequest' - - type: object - properties: - reference_request: - $ref: '#/components/schemas/ReferenceRequest' - - type: object - properties: - retail_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The (optional) RRP/retail price configured for this product and used for price comparison and storefront display purposes. - sale_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The merchant-entered sale price for a product overwrites the default price. The `sale_price` is optional. - - minimum_advertised_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - - description: The minimum advertised price (MAP) you can display on a storefront. A value supplied by the merchant and used for display purposes. - - saved: - type: object - description: The amount that merchants save, determined by the difference between `retail_price` and `calculated_price`. - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - - price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The merchant-entered price for a product, which could include or exclude tax. When creating a product, you must define the price, which serves as the default price. - - calculated_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The shopper price for a product, which includes modifier, option, and option set rules. The `calculated_price` may include or exclude estimates for tax. - price_range: - type: object - properties: - minimum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - maximum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - description: The minimum and maximum price that will typically apply to this product. Only used for complex products (products with variants). - retail_price_range: - type: object - properties: - minimum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - maximum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - description: The productʼs variants that will typically apply to this product. - bulk_pricing: - type: array - items: - $ref: '#/components/schemas/BulkPricingTier' - meta: - type: object - properties: {} - additionalProperties: true - description: Response metadata. - example: - data: - - product_id: 1 - variant_id: 1 - options: - - option_id: 1 - value_id: 1 - reference_request: - product_id: 1 - variant_id: 1 - options: - - option_id: 1 - value_id: 1 - retail_price: - as_entered: 1.5 - entered_inclusive: true - tax_exclusive: 1.1 - tax_inclusive: 1.5 - sale_price: - as_entered: 1.5 - entered_inclusive: true - tax_exclusive: 1.1 - tax_inclusive: 1.5 - minimum_advertised_price: - as_entered: 1.5 - entered_inclusive: true - tax_exclusive: 1.1 - tax_inclusive: 1.5 - saved: - as_entered: 1.5 - entered_inclusive: true - tax_exclusive: 1.1 - tax_inclusive: 1.5 - price: - as_entered: 1.5 - entered_inclusive: true - tax_exclusive: 1.1 - tax_inclusive: 1.5 - calculated_price: - as_entered: 1.5 - entered_inclusive: true - tax_exclusive: 1.1 - tax_inclusive: 1.5 - price_range: - minimum: - as_entered: 1.5 - entered_inclusive: true - tax_exclusive: 1.1 - tax_inclusive: 1.5 - maximum: - as_entered: 1.5 - entered_inclusive: true - tax_exclusive: 1.1 - tax_inclusive: 1.5 - retail_price_range: - minimum: - as_entered: 1.5 - entered_inclusive: true - tax_exclusive: 1.1 - tax_inclusive: 1.5 - maximum: - as_entered: 1.5 - entered_inclusive: true - tax_exclusive: 1.1 - tax_inclusive: 1.5 - bulk_pricing: - - minimum: 1 - maximum: 1 - discount_amount: 1 - discount_type: percent - tax_discount_amount: - - as_entered: 10 - tax_inclusive: 10 - tax_exclusive: 10 - entered_inclusive: false - meta: {} -components: - schemas: - ReferenceRequest: - type: object - description: You can use the original details of the request to identify the exact product variant and fetch prices. - - properties: - product_id: - type: integer - description: The (required) product ID of the item. - variant_id: - type: integer - description: The (optional) variant ID of the item. - options: - type: array - description: The optional product option configuration for this generated price. - items: - type: object - properties: - option_id: - type: integer - description: The ID of the variant option or modifier option configured for this price. - value_id: - type: integer - description: The selected value ID for the configured option. - BulkPricingTier: - type: object - properties: - minimum: - type: integer - description: The minimum quantity required to trigger this bulk pricing discount. - maximum: - type: integer - description: The maximum quantity (or 0 for unlimited) to trigger this bulk pricing discount. - discount_amount: - type: number - discount_type: - type: string - enum: - - price - - percent - - fixed - tax_discount_amount: - type: array - description: Formats the `bulk_pricing.discount_amount` into the tax price amounts. - items: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - entered_inclusive: - type: boolean - description: Determines whether the 'as_entered' price is inclusive or exclusive of tax based on the store's tax jurisdiction. - x-internal: false - PricingResponse: - type: object - properties: - data: - type: array - items: - type: object - properties: - product_id: - type: integer - description: The (required) product ID of the item. - variant_id: - type: integer - description: The (optional) variant ID of the item. - options: - type: array - description: The optional product option configuration this price was generated for - items: - type: object - properties: - option_id: - type: integer - description: The ID of the variant option or modifier option configured for this price - value_id: - type: integer - description: The selected value ID for the configured option. - retail_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The (optional) RRP/retail price configured for this product. - sale_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - minimum_advertised_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - calculated_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - price_range: - type: object - properties: - minimum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - maximum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - description: For estimated prices, the minimum/maximum price that will typically apply to this product. - retail_price_range: - type: object - properties: - minimum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - maximum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product including estimates for tax - description: For estimated prices, the minimum/maximum price that will typically apply to this product. - bulk_pricing: - type: array - items: - type: object - properties: - minimum: - type: integer - description: The minimum quantity required to trigger this bulk pricing discount. - maximum: - type: integer - description: The maximum quantity (or 0 for unlimited) to trigger this bulk pricing discount. - discount_amount: - type: number - description: The price reduction set by the merchant for this bulk pricing discount. - discount_type: - type: string - enum: - - price - - percent - - fixed - description: The format of the price reduction set by the merchant for this bulk pricing discount. - tax_discount_amount: - type: array - description: Formats the `bulk_pricing.discount_amount` into the tax price amounts. - items: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - entered_inclusive: - type: boolean - description: Determines whether the 'as_entered' price is inclusive or exclusive of tax based on the store's tax jurisdiction. - meta: - type: object - properties: {} - additionalProperties: true - description: Response metadata. - x-internal: false - PriceRange: - type: object - properties: - minimum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - maximum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - description: For estimated prices, the minimum/maximum price that will typically apply to this product. - x-internal: false - TaxPrice: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - x-internal: false - ItemPricing: - type: object - properties: - product_id: - type: integer - description: The (required) product ID of the item. - variant_id: - type: integer - description: The (optional) variant ID of the item. - options: - type: array - description: The optional product option configuration for which this price was generated. - - items: - type: object - properties: - option_id: - type: integer - description: The ID of the variant option or modifier option configured for this price. - value_id: - type: integer - description: The selected value ID for the configured option. - retail_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The (optional) RRP/retail price configured for this product. - sale_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - minimum_advertised_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - calculated_price: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - price_range: - type: object - properties: - minimum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - maximum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the stores tax. jurisdiction - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - description: For estimated prices, the minimum/maximum price that will typically apply to this product. - retail_price_range: - type: object - properties: - minimum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - maximum: - type: object - properties: - as_entered: - type: number - description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. - entered_inclusive: - type: boolean - description: Whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. - tax_exclusive: - type: number - description: The estimated tax-exclusive price for this product based on the provided customer group. - tax_inclusive: - type: number - description: The estimated tax-inclusive price for this product based on the provided customer group. - description: The price for a product, including estimates for tax. - description: For estimated prices, the minimum/maximum price that will typically apply to this product. - bulk_pricing: - type: array - items: - $ref: '#/components/schemas/BulkPricingTier' - x-internal: false - Item: - type: object - properties: - product_id: - type: integer - description: The (required) product ID of the item. - variant_id: - type: number - description: The (optional) variant ID of the item. - options: - type: array - description: The (optional) option configuration of the product. May be "partially" configured for estimates. - items: - type: object - properties: - option_id: - type: integer - description: The ID of the variant option or modifier option being configured for this product. - value_id: - type: integer - description: |- - The ID of the value matching the option being configured. - - **Note:** must be ID, not the value. - - description: Details/configuration for the product to request a price for. - x-internal: false - PricingRequest: - type: object - properties: - channel_id: - type: integer - description: The channel ID that pricing evaluates within. The default BigCommerce storefront is channel 1. - example: 1 - currency_code: - type: string - description: The currency of prices to be returned for this request. - example: USD - customer_group_id: - type: integer - description: The customer group relevant for any customer group pricing, tax values, etc. - items: - type: array - description: The items for which to fetch prices. - - items: - type: object - properties: - product_id: - type: integer - description: The (required) product ID of the item. - variant_id: - type: number - description: The (optional) variant ID of the item. - options: - type: array - description: The (optional) option configuration of the product. May be "partially" configured for estimates. - items: - type: object - properties: - option_id: - type: integer - description: The ID of the variant option or modifier option being configured for this product. - value_id: - type: integer - description: |- - The ID of the value matching the option being configured. - - **Note:** This must be the ID, not the value. - - description: Details/configuration for the product to request a price for. - x-internal: false - securitySchemes: - X-Auth-Token: - name: X-Auth-Token - description: |- - ### OAuth scopes - - | UI Name | Permission | Parameter | - |:--------|:-----------|:----------| - | Products | read-only | `store_v2_products_read_only` | - - ### Authentication header - - | Header | Argument | Description | - |:-------|:---------|:------------| - | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). | - - ### Further reading - - For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests). - - For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes). - - For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes). - type: apiKey - in: header +openapi: '3.0.1' +info: + title: Pricing + description: |- + Get product pricing on BigCommerce-hosted storefronts. To work with headless storefronts, use the [GraphQL Storefront API](/graphql-storefront/reference). + + The REST Storefront API uses [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) headers for authentication, and therefore has no required scopes. You do not need to send any BigCommerce-specific tokens with your requests to these endpoints. + + For info about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#same-origin-cors-authentication). + termsOfService: 'https://www.bigcommerce.com/terms' + contact: + name: BigCommerce + url: 'https://www.bigcommerce.com' + email: support@bigcommerce.com + version: '' +servers: + - url: 'https://api.bigcommerce.com/stores/{store_hash}/v3' + variables: + store_hash: + default: store_hash + description: Permanent ID of the BigCommerce store. + description: BigCommerce API Gateway +security: + - X-Auth-Token: [] +tags: + - name: Products +paths: + '/pricing/products': + post: + tags: + - Products + summary: Get Prices (Batch) + description: |- + Calculate batch pricing for products for a specific channel, currency, and customer group. + + The rounded prices in this endpoint's response will align with the currency's decimal precision as defined in the [currency](https://support.bigcommerce.com/s/article/Managing-Currencies?language=en_US#add) settings page. + + **Limits** + * Limit of 50 concurrent requests. + operationId: getPrices + requestBody: + content: + application/json: + schema: + required: + - channel_id + - currency_code + - items + type: object + properties: + channel_id: + type: integer + description: The channel ID that pricing evaluates within. The default BigCommerce storefront is channel 1. + example: 1 + currency_code: + type: string + description: The currency code of prices this request returns. + + example: USD + country_code: + type: string + description: An ISO 3166-1 alpha-2 shopper's country code representing a country or special geographic area. + example: US + customer_group_id: + type: integer + description: The customer group ID that's relevant for any customer group pricing, tax values, etc. + customer_id: + type: integer + description: The ID of the customer for whom to fetch prices. + items: + type: array + description: The items for which to fetch prices. + + items: + type: object + properties: + product_id: + type: integer + description: The (required) product ID of the item. + variant_id: + type: number + description: The (optional) variant ID of the item. + options: + type: array + description: The option configuration of the product (optional); might be partially configured for estimates. + items: + type: object + properties: + option_id: + type: integer + description: The ID of the variant option or modifier option that is being configured for this product. + value_id: + type: integer + description: |- + The ID of the value matching the option that's being configured. + + **Note:*** This must be the ID, not the value. + + description: Details/configuration for the product to request a price for. + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + description: Note that a storeʼs [tax settings](/docs/rest-management/tax-settings) may affect the calculations for `tax_inclusive` and `tax_exclusive` prices. + properties: + data: + type: array + items: + allOf: + - $ref: '#/components/schemas/ReferenceRequest' + - type: object + properties: + reference_request: + $ref: '#/components/schemas/ReferenceRequest' + - type: object + properties: + retail_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The (optional) RRP/retail price configured for this product and used for price comparison and storefront display purposes. + sale_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The merchant-entered sale price for a product overwrites the default price. The `sale_price` is optional. + + minimum_advertised_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + + description: The minimum advertised price (MAP) you can display on a storefront. A value supplied by the merchant and used for display purposes. + + saved: + type: object + description: The amount that merchants save, determined by the difference between `retail_price` and `calculated_price`. + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + + price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The merchant-entered price for a product, which could include or exclude tax. When creating a product, you must define the price, which serves as the default price. + + calculated_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The shopper price for a product, which includes modifier, option, and option set rules. The `calculated_price` may include or exclude estimates for tax. + price_range: + type: object + properties: + minimum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + maximum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + description: The minimum and maximum price that will typically apply to this product. Only used for complex products (products with variants). + retail_price_range: + type: object + properties: + minimum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + maximum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + description: The productʼs variants that will typically apply to this product. + bulk_pricing: + type: array + items: + $ref: '#/components/schemas/BulkPricingTier' + meta: + type: object + properties: {} + additionalProperties: true + description: Response metadata. + example: + data: + - product_id: 1 + variant_id: 1 + options: + - option_id: 1 + value_id: 1 + reference_request: + product_id: 1 + variant_id: 1 + options: + - option_id: 1 + value_id: 1 + retail_price: + as_entered: 1.5 + entered_inclusive: true + tax_exclusive: 1.1 + tax_inclusive: 1.5 + sale_price: + as_entered: 1.5 + entered_inclusive: true + tax_exclusive: 1.1 + tax_inclusive: 1.5 + minimum_advertised_price: + as_entered: 1.5 + entered_inclusive: true + tax_exclusive: 1.1 + tax_inclusive: 1.5 + saved: + as_entered: 1.5 + entered_inclusive: true + tax_exclusive: 1.1 + tax_inclusive: 1.5 + price: + as_entered: 1.5 + entered_inclusive: true + tax_exclusive: 1.1 + tax_inclusive: 1.5 + calculated_price: + as_entered: 1.5 + entered_inclusive: true + tax_exclusive: 1.1 + tax_inclusive: 1.5 + price_range: + minimum: + as_entered: 1.5 + entered_inclusive: true + tax_exclusive: 1.1 + tax_inclusive: 1.5 + maximum: + as_entered: 1.5 + entered_inclusive: true + tax_exclusive: 1.1 + tax_inclusive: 1.5 + retail_price_range: + minimum: + as_entered: 1.5 + entered_inclusive: true + tax_exclusive: 1.1 + tax_inclusive: 1.5 + maximum: + as_entered: 1.5 + entered_inclusive: true + tax_exclusive: 1.1 + tax_inclusive: 1.5 + bulk_pricing: + - minimum: 1 + maximum: 1 + discount_amount: 1 + discount_type: percent + tax_discount_amount: + - as_entered: 10 + tax_inclusive: 10 + tax_exclusive: 10 + entered_inclusive: false + meta: {} +components: + schemas: + ReferenceRequest: + type: object + description: You can use the original details of the request to identify the exact product variant and fetch prices. + + properties: + product_id: + type: integer + description: The (required) product ID of the item. + variant_id: + type: integer + description: The (optional) variant ID of the item. + options: + type: array + description: The optional product option configuration for this generated price. + items: + type: object + properties: + option_id: + type: integer + description: The ID of the variant option or modifier option configured for this price. + value_id: + type: integer + description: The selected value ID for the configured option. + BulkPricingTier: + type: object + properties: + minimum: + type: integer + description: The minimum quantity required to trigger this bulk pricing discount. + maximum: + type: integer + description: The maximum quantity (or 0 for unlimited) to trigger this bulk pricing discount. + discount_amount: + type: number + discount_type: + type: string + enum: + - price + - percent + - fixed + tax_discount_amount: + type: array + description: Formats the `bulk_pricing.discount_amount` into the tax price amounts. + items: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + entered_inclusive: + type: boolean + description: Determines whether the 'as_entered' price is inclusive or exclusive of tax based on the store's tax jurisdiction. + x-internal: false + PricingResponse: + type: object + properties: + data: + type: array + items: + type: object + properties: + product_id: + type: integer + description: The (required) product ID of the item. + variant_id: + type: integer + description: The (optional) variant ID of the item. + options: + type: array + description: The optional product option configuration this price was generated for + items: + type: object + properties: + option_id: + type: integer + description: The ID of the variant option or modifier option configured for this price + value_id: + type: integer + description: The selected value ID for the configured option. + retail_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The (optional) RRP/retail price configured for this product. + sale_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + minimum_advertised_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + calculated_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + price_range: + type: object + properties: + minimum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + maximum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + description: For estimated prices, the minimum/maximum price that will typically apply to this product. + retail_price_range: + type: object + properties: + minimum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + maximum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product including estimates for tax + description: For estimated prices, the minimum/maximum price that will typically apply to this product. + bulk_pricing: + type: array + items: + type: object + properties: + minimum: + type: integer + description: The minimum quantity required to trigger this bulk pricing discount. + maximum: + type: integer + description: The maximum quantity (or 0 for unlimited) to trigger this bulk pricing discount. + discount_amount: + type: number + description: The price reduction set by the merchant for this bulk pricing discount. + discount_type: + type: string + enum: + - price + - percent + - fixed + description: The format of the price reduction set by the merchant for this bulk pricing discount. + tax_discount_amount: + type: array + description: Formats the `bulk_pricing.discount_amount` into the tax price amounts. + items: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + entered_inclusive: + type: boolean + description: Determines whether the 'as_entered' price is inclusive or exclusive of tax based on the store's tax jurisdiction. + meta: + type: object + properties: {} + additionalProperties: true + description: Response metadata. + x-internal: false + PriceRange: + type: object + properties: + minimum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + maximum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + description: For estimated prices, the minimum/maximum price that will typically apply to this product. + x-internal: false + TaxPrice: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + x-internal: false + ItemPricing: + type: object + properties: + product_id: + type: integer + description: The (required) product ID of the item. + variant_id: + type: integer + description: The (optional) variant ID of the item. + options: + type: array + description: The optional product option configuration for which this price was generated. + + items: + type: object + properties: + option_id: + type: integer + description: The ID of the variant option or modifier option configured for this price. + value_id: + type: integer + description: The selected value ID for the configured option. + retail_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The (optional) RRP/retail price configured for this product. + sale_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + minimum_advertised_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + calculated_price: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + price_range: + type: object + properties: + minimum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + maximum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Determines whether the `as_entered` price is inclusive or exclusive of tax, based on the stores tax. jurisdiction + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + description: For estimated prices, the minimum/maximum price that will typically apply to this product. + retail_price_range: + type: object + properties: + minimum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + maximum: + type: object + properties: + as_entered: + type: number + description: The price provided by the merchant, as entered in their catalog/price list; may include or exclude tax. + entered_inclusive: + type: boolean + description: Whether the `as_entered` price is inclusive or exclusive of tax, based on the store's tax jurisdiction. + tax_exclusive: + type: number + description: The estimated tax-exclusive price for this product based on the provided customer group. + tax_inclusive: + type: number + description: The estimated tax-inclusive price for this product based on the provided customer group. + description: The price for a product, including estimates for tax. + description: For estimated prices, the minimum/maximum price that will typically apply to this product. + bulk_pricing: + type: array + items: + $ref: '#/components/schemas/BulkPricingTier' + x-internal: false + Item: + type: object + properties: + product_id: + type: integer + description: The (required) product ID of the item. + variant_id: + type: number + description: The (optional) variant ID of the item. + options: + type: array + description: The (optional) option configuration of the product. May be "partially" configured for estimates. + items: + type: object + properties: + option_id: + type: integer + description: The ID of the variant option or modifier option being configured for this product. + value_id: + type: integer + description: |- + The ID of the value matching the option being configured. + + **Note:** must be ID, not the value. + + description: Details/configuration for the product to request a price for. + x-internal: false + PricingRequest: + type: object + properties: + channel_id: + type: integer + description: The channel ID that pricing evaluates within. The default BigCommerce storefront is channel 1. + example: 1 + currency_code: + type: string + description: The currency of prices to be returned for this request. + example: USD + customer_group_id: + type: integer + description: The customer group relevant for any customer group pricing, tax values, etc. + items: + type: array + description: The items for which to fetch prices. + + items: + type: object + properties: + product_id: + type: integer + description: The (required) product ID of the item. + variant_id: + type: number + description: The (optional) variant ID of the item. + options: + type: array + description: The (optional) option configuration of the product. May be "partially" configured for estimates. + items: + type: object + properties: + option_id: + type: integer + description: The ID of the variant option or modifier option being configured for this product. + value_id: + type: integer + description: |- + The ID of the value matching the option being configured. + + **Note:** This must be the ID, not the value. + + description: Details/configuration for the product to request a price for. + x-internal: false + securitySchemes: + X-Auth-Token: + name: X-Auth-Token + description: |- + ### OAuth scopes + + | UI Name | Permission | Parameter | + |:--------|:-----------|:----------| + | Products | read-only | `store_v2_products_read_only` | + + ### Authentication header + + | Header | Argument | Description | + |:-------|:---------|:------------| + | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). | + + ### Further reading + + For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests). + + For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes). + + For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes). + type: apiKey + in: header diff --git a/reference/segments.v3.yml b/reference/segments.v3.yml index a484500f2..0ea68b6b1 100644 --- a/reference/segments.v3.yml +++ b/reference/segments.v3.yml @@ -1,748 +1,748 @@ -openapi: '3.0.3' -info: - title: Segments API - version: '1.0' - description: |- - Group customers into segments to offer them promotions and other customized shopping experiences. - termsOfService: 'https://www.bigcommerce.com/terms' - contact: - name: BigCommerce - url: 'https://www.bigcommerce.com' - email: support@bigcommerce.com -servers: - - url: 'https://api.bigcommerce.com/stores/{store_hash}/v3' - variables: - store_hash: - default: store_hash - description: Permanent ID of the BigCommerce store. - description: BigCommerce API Gateway -security: - - X-Auth-Token: [] -tags: - - name: Segments - - name: Shopper Profiles - - name: Shopper Profiles for a Segment - - name: Segments for a Shopper Profile -paths: - '/segments': - parameters: - - $ref: '#/components/parameters/Accept' - get: - summary: 'Get All Segments' - tags: - - Segments - description: Returns a paginated *Segments List*. - operationId: 'GetPaginatedSegmentsList' - parameters: - - $ref: '#/components/parameters/FilterPageParam' - - $ref: '#/components/parameters/FilterLimitParam' - - $ref: '#/components/parameters/FilterIdParam' - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentCollectionResponse' - post: - summary: 'Create Segments' - tags: - - Segments - description: | - Creates *Segments*. - - **Limits** - * Limit of 10 concurrent requests. - * Max total segements allowed per store is 1000. - parameters: - - $ref: '#/components/parameters/ContentType' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentsPostRequest' - application/xml: - schema: - type: object - properties: {} - required: true - description: '' - responses: - '201': - description: '| - An array of created *Segments*.' - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentsResponse' - '400': - description: | - The *Segment* was not valid. This is the result of either missing required fields, or because of invalid data. See the response for more details. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '409': - description: Conflict - content: - application/json: - schema: - description: '' - type: object - x-examples: - example-1: - data: [] - errors: - - status: 409 - title: Cannot have multiple segments with the same name. - type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' - errors: {} - meta: - total: 1 - success: 0 - failed: 1 - properties: - data: - type: array - items: - type: object - properties: {} - errors: - type: array - uniqueItems: true - minItems: 1 - items: - type: object - properties: - status: - type: number - title: - type: string - minLength: 1 - type: - type: string - minLength: 1 - errors: - type: object - properties: {} - required: - - status - meta: - type: object - properties: - total: - type: number - success: - type: number - failed: - type: number - required: - - data - - errors - - meta - operationId: 'SegmentsPostRequest' - put: - summary: 'Update Segments' - tags: - - Segments - description: | - Updates *Segments*. - - **Limits** - * Limit of 10 concurrent requests. - operationId: 'PutSegmentObjects' - parameters: - - $ref: '#/components/parameters/ContentType' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentsPutRequest' - required: true - responses: - '201': - description: | - An array of created *Segments*. - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentsResponse' - '400': - description: | - The *Segment* was not valid. This is the result of either missing required fields, or because of invalid data. See the response for more details. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - delete: - summary: 'Delete Segments' - tags: - - Segments - description: | - Deletes one or more *Segments* from a store. This will not delete any associated *Shopper Profiles*. - operationId: 'DeleteStoreSegment' - parameters: - - $ref: '#/components/parameters/FilterIdParam' - responses: - '204': - description: | - An empty response. - '/segments/{segmentId}/shopper-profiles': - parameters: - - $ref: '#/components/parameters/Accept' - - $ref: '#/components/parameters/SegmentIdPathParam' - get: - summary: 'Get All Shopper Profiles in a Segment' - tags: - - Shopper Profiles for a Segment - description: | - Returns a list of *Shopper Profiles* that are associated with a given *Segment*. - - **NOTE**: The `modify` Customers OAuth scope is a requirement for this endpoint. - operationId: 'GetSegmentProfiles' - parameters: - - $ref: '#/components/parameters/FilterPageParam' - - $ref: '#/components/parameters/FilterLimitParam' - responses: - '200': - description: | - An array of *Shopper Profiles* objects and metadata. - content: - application/json: - schema: - $ref: '#/components/schemas/ShopperProfilesGetResponse' - post: - summary: 'Add Shopper Profiles to a Segment' - tags: - - Shopper Profiles for a Segment - description: |- - Add *Shopper Profiles* to a specific *Segment*. - - **Limits** - * Limit of *Shopper Profiles* per request is `50`. - * Limit of 10 concurrent requests. - operationId: 'PostShopperProfile' - parameters: - - $ref: '#/components/parameters/ContentType' - responses: - '201': - description: An array of *Shopper Profiles* added to a *Segment*. - content: - application/json: - schema: - $ref: '#/components/schemas/ShopperProfilesAddResponse' - '409': - description: Conflict - content: - application/json: - schema: - description: '' - type: object - x-examples: - example-1: - data: [] - errors: - - status: 409 - title: Unable to add shopper profiles to segment due to conflicts. - type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' - errors: - '0': Shopper profile `1465bb16-eb7d-4fba-8312-0ea9d88cd6e9` already exists for segment `dfada416-eba1-49cf-ad21-0f48b48d50ad`. - meta: - total: 1 - success: 0 - failed: 1 - properties: - data: - type: array - items: - type: object - properties: {} - errors: - type: array - uniqueItems: true - minItems: 1 - items: - type: object - properties: - status: - type: number - title: - type: string - minLength: 1 - type: - type: string - minLength: 1 - errors: - type: object - properties: - '0': - type: string - minLength: 1 - meta: - type: object - required: - - total - - success - - failed - properties: - total: - type: number - success: - type: number - failed: - type: number - required: - - data - - errors - - meta - examples: - shopper-profile-conflict: - value: - data: [] - errors: - - status: 409 - title: Unable to add shopper profiles to segment due to conflicts. - type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' - errors: - '0': Shopper profile `1465bb16-eb7d-4fba-8312-0ea9d88cd6e9` already exists for segment `dfada416-eba1-49cf-ad21-0f48b48d50ad`. - meta: - total: 1 - success: 0 - failed: 1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ShopperProfilesAddRequest' - delete: - summary: 'Remove Shopper Profiles from a Segment' - tags: - - Shopper Profiles for a Segment - description: | - Remove one or more *Shopper Profiles* that are associated with a *Segment*. This operation only removes the association; it doesn't delete the *Shopper Profiles*. - operationId: 'DeleteShopperProfile' - parameters: - - $ref: '#/components/parameters/FilterIdParam' - responses: - '204': - description: | - An empty response. - '/shopper-profiles': - parameters: - - $ref: '#/components/parameters/Accept' - get: - summary: 'Get All Shopper Profiles' - tags: - - Shopper Profiles - description: | - Returns a paginated *Shopper Profiles* list. - - operationId: 'GetShopperList' - parameters: - - $ref: '#/components/parameters/FilterPageParam' - - $ref: '#/components/parameters/FilterLimitParam' - responses: - '200': - description: | - An array of *Shopper Profiles* objects and metadata. - content: - application/json: - schema: - $ref: '#/components/schemas/ShopperProfilesCollectionResponse' - post: - summary: 'Create Shopper Profiles' - tags: - - Shopper Profiles - description: | - Creates a *Shopper Profile*. - operationId: 'ShopperProfilesRequest' - parameters: - - $ref: '#/components/parameters/ContentType' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ShopperProfilesPostRequest' - required: true - responses: - '201': - description: | - An array of created *Shopper Profiles*. - content: - application/json: - schema: - $ref: '#/components/schemas/ShopperProfilesResponse' - '400': - description: | - The *Segment* was not valid. This is the result of either missing required fields, or because of invalid data. See the response for more details. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - delete: - summary: 'Delete Shopper Profiles' - tags: - - Shopper Profiles - description: | - Deletes one or more *Shopper Profiles* from a store. - operationId: 'DeleteStoreShopperProfile' - parameters: - - $ref: '#/components/parameters/FilterIdParam' - responses: - '204': - description: | - An empty response. - '/shopper-profiles/{shopperProfileId}/segments': - parameters: - - $ref: '#/components/parameters/Accept' - - $ref: '#/components/parameters/ShopperIdPathParam' - get: - summary: 'Get All Segments for a Shopper Profile' - tags: - - Segments for a Shopper Profile - description: Returns a paginated *Segments* list for a *Shopper Profile*. - operationId: 'GetListShopperProfile' - parameters: - - $ref: '#/components/parameters/FilterPageParam' - - $ref: '#/components/parameters/FilterLimitParam' - responses: - '200': - description: | - An array of *Segments* objects and metadata. - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentCollectionResponse' -components: - parameters: - Accept: - name: Accept - in: header - required: true - description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.' - schema: - type: string - default: 'application/json' - ContentType: - name: Content-Type - in: header - required: true - description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.' - schema: - type: string - default: 'application/json' - SegmentIdPathParam: - name: segmentId - description: The *Segment* ID. - in: path - schema: - type: string - format: uuid - required: true - ShopperIdPathParam: - name: shopperProfileId - description: The *Shopper Profile* ID. - in: path - schema: - type: string - format: uuid - required: true - FilterIdParam: - name: 'id:in' - description: | - Comma separated IDs. - required: false - in: query - schema: - type: array - items: - type: string - explode: true - FilterPageParam: - name: page - in: query - description: | - Page number. - required: false - schema: - type: integer - FilterLimitParam: - name: limit - in: query - description: | - Items count per page. - required: false - schema: - type: integer - schemas: - SegmentsResponse: - description: | - Response payload for the BigCommerce API. - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Segment' - meta: - type: object - properties: {} - title: '' - SegmentsPostRequest: - description: | - Request payload for the BigCommerce API. - type: array - items: - $ref: '#/components/schemas/SegmentPost' - SegmentsPutRequest: - description: | - Request payload for the BigCommerce API. - type: array - items: - $ref: '#/components/schemas/SegmentPut' - SegmentPost: - type: object - properties: - name: - type: string - description: Name of the segment - example: My Segment - description: - type: string - description: Description of the segment - example: Description - required: - - name - SegmentPut: - type: object - properties: - id: - type: string - description: ID of the segment. - format: uuid - name: - type: string - description: Name of the segment. - example: My Segment - description: - type: string - description: Description of the segment. - example: Description - required: - - id - Pagination: - type: object - description: | - Data about the response including pagination, and collection totals. - properties: - total: - type: integer - description: | - Total number of items in the result set. - example: 1 - count: - type: integer - description: | - Total number of items in the collection response. - example: 1 - per_page: - type: integer - description: | - The amount of items returned in the collection per page, controlled by the limit parameter. - example: 50 - current_page: - type: integer - description: | - The page you are currently on within the collection. - example: 1 - total_pages: - type: integer - description: | - The total number of pages in the collection. - example: 1 - CollectionMeta: - type: object - description: | - Data about the response including pagination, and collection totals. - properties: - pagination: - $ref: '#/components/schemas/Pagination' - ErrorResponse: - allOf: - - $ref: '#/components/schemas/BaseError' - - type: object - properties: - errors: - $ref: '#/components/schemas/DetailedErrors' - BaseError: - type: object - description: | - Error payload for the BigCommerce API. - properties: - status: - description: | - The HTTP status code. - type: integer - title: - description: | - The error title describing the particular error. - type: string - type: - type: string - instance: - type: string - DetailedErrors: - type: object - properties: {} - additionalProperties: - type: string - Segment: - type: object - properties: - id: - type: string - format: uuid - description: | - The ID of the segment. - name: - type: string - description: | - The name of the segment. - example: My Segment - description: - type: string - description: | - The description of the segment. - example: Description - created_at: - type: string - format: date-time - description: | - The date of which the segment was created. - example: 2022-09-15T23:44:05Z - updated_at: - type: string - format: date-time - description: | - The date of which the segment was updated. - example: 2022-09-15T23:44:05Z - SegmentCollectionResponse: - description: | - Response payload for the BigCommerce API. - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Segment' - meta: - $ref: '#/components/schemas/CollectionMeta' - ShopperProfile: - type: object - properties: - id: - type: string - format: uuid - description: | - The ID of the *Shopper Profile*. - customer_id: - type: integer - example: 1 - description: | - The ID of the registered *Customer* associated with this *Shopper Profile*. - created_at: - type: string - format: date-time - description: | - The date and time when the *Shopper Profile* was created. - updated_at: - type: string - format: date-time - description: | - The date and time when the *Shopper Profile* was last updated. - ShopperProfilesAddRequest: - type: array - description: A list of *Shopper Profiles* to associate with the segment. - items: - type: string - format: uuid - description: 'The ID of a *Shopper Profile*.' - ShopperProfilesAddResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ShopperProfile' - ShopperProfilesGetResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ShopperProfile' - meta: - $ref: '#/components/schemas/CollectionMeta' - ShopperProfilesCollectionResponse: - description: | - Response payload for the BigCommerce API. - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ShopperProfile' - meta: - $ref: '#/components/schemas/CollectionMeta' - ShopperProfilesPostRequest: - description: | - Request payload for the BigCommerce API. - type: array - items: - $ref: '#/components/schemas/ShopperProfilePost' - ShopperProfilePost: - type: object - properties: - customer_id: - type: number - description: The ID of a registered Customer to associate with the new *Shopper Profile*. - example: 1 - ShopperProfilesResponse: - description: | - Response payload for the BigCommerce API. - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ShopperProfile' - meta: - type: object - properties: {} - securitySchemes: - X-Auth-Token: - name: X-Auth-Token - description: |- - ### OAuth scopes - | UI Name | Permission | Parameter | - |:--------|:-----------|:----------| - | Customers | modify | `store_v2_customers` | - | Customers | read-only | `store_v2_customers_read_only` | - - **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a Segment](/docs/rest-management/customer-segmentation/shopper-profiles-for-a-segment#get-all-shopper-profiles-in-a-segment) endpoint which requires modify permission. - - ### Authentication header - - | Header | Argument | Description | - |:-------|:---------|:------------| - | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/docs/start/authentication). | - - ### Further reading - - For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests). - - For more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/docs/start/authentication#oauth-scopes). - - For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes). - type: apiKey - in: header +openapi: '3.0.3' +info: + title: Segments API + version: '1.0' + description: |- + Group customers into segments to offer them promotions and other customized shopping experiences. + termsOfService: 'https://www.bigcommerce.com/terms' + contact: + name: BigCommerce + url: 'https://www.bigcommerce.com' + email: support@bigcommerce.com +servers: + - url: 'https://api.bigcommerce.com/stores/{store_hash}/v3' + variables: + store_hash: + default: store_hash + description: Permanent ID of the BigCommerce store. + description: BigCommerce API Gateway +security: + - X-Auth-Token: [] +tags: + - name: Segments + - name: Shopper Profiles + - name: Shopper Profiles for a Segment + - name: Segments for a Shopper Profile +paths: + '/segments': + parameters: + - $ref: '#/components/parameters/Accept' + get: + summary: 'Get All Segments' + tags: + - Segments + description: Returns a paginated *Segments List*. + operationId: 'GetPaginatedSegmentsList' + parameters: + - $ref: '#/components/parameters/FilterPageParam' + - $ref: '#/components/parameters/FilterLimitParam' + - $ref: '#/components/parameters/FilterIdParam' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SegmentCollectionResponse' + post: + summary: 'Create Segments' + tags: + - Segments + description: | + Creates *Segments*. + + **Limits** + * Limit of 10 concurrent requests. + * Max total segements allowed per store is 1000. + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SegmentsPostRequest' + application/xml: + schema: + type: object + properties: {} + required: true + description: '' + responses: + '201': + description: '| + An array of created *Segments*.' + content: + application/json: + schema: + $ref: '#/components/schemas/SegmentsResponse' + '400': + description: | + The *Segment* was not valid. This is the result of either missing required fields, or because of invalid data. See the response for more details. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '409': + description: Conflict + content: + application/json: + schema: + description: '' + type: object + x-examples: + example-1: + data: [] + errors: + - status: 409 + title: Cannot have multiple segments with the same name. + type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' + errors: {} + meta: + total: 1 + success: 0 + failed: 1 + properties: + data: + type: array + items: + type: object + properties: {} + errors: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + status: + type: number + title: + type: string + minLength: 1 + type: + type: string + minLength: 1 + errors: + type: object + properties: {} + required: + - status + meta: + type: object + properties: + total: + type: number + success: + type: number + failed: + type: number + required: + - data + - errors + - meta + operationId: 'SegmentsPostRequest' + put: + summary: 'Update Segments' + tags: + - Segments + description: | + Updates *Segments*. + + **Limits** + * Limit of 10 concurrent requests. + operationId: 'PutSegmentObjects' + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SegmentsPutRequest' + required: true + responses: + '201': + description: | + An array of created *Segments*. + content: + application/json: + schema: + $ref: '#/components/schemas/SegmentsResponse' + '400': + description: | + The *Segment* was not valid. This is the result of either missing required fields, or because of invalid data. See the response for more details. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + delete: + summary: 'Delete Segments' + tags: + - Segments + description: | + Deletes one or more *Segments* from a store. This will not delete any associated *Shopper Profiles*. + operationId: 'DeleteStoreSegment' + parameters: + - $ref: '#/components/parameters/FilterIdParam' + responses: + '204': + description: | + An empty response. + '/segments/{segmentId}/shopper-profiles': + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/SegmentIdPathParam' + get: + summary: 'Get All Shopper Profiles in a Segment' + tags: + - Shopper Profiles for a Segment + description: | + Returns a list of *Shopper Profiles* that are associated with a given *Segment*. + + **NOTE**: The `modify` Customers OAuth scope is a requirement for this endpoint. + operationId: 'GetSegmentProfiles' + parameters: + - $ref: '#/components/parameters/FilterPageParam' + - $ref: '#/components/parameters/FilterLimitParam' + responses: + '200': + description: | + An array of *Shopper Profiles* objects and metadata. + content: + application/json: + schema: + $ref: '#/components/schemas/ShopperProfilesGetResponse' + post: + summary: 'Add Shopper Profiles to a Segment' + tags: + - Shopper Profiles for a Segment + description: |- + Add *Shopper Profiles* to a specific *Segment*. + + **Limits** + * Limit of *Shopper Profiles* per request is `50`. + * Limit of 10 concurrent requests. + operationId: 'PostShopperProfile' + parameters: + - $ref: '#/components/parameters/ContentType' + responses: + '201': + description: An array of *Shopper Profiles* added to a *Segment*. + content: + application/json: + schema: + $ref: '#/components/schemas/ShopperProfilesAddResponse' + '409': + description: Conflict + content: + application/json: + schema: + description: '' + type: object + x-examples: + example-1: + data: [] + errors: + - status: 409 + title: Unable to add shopper profiles to segment due to conflicts. + type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' + errors: + '0': Shopper profile `1465bb16-eb7d-4fba-8312-0ea9d88cd6e9` already exists for segment `dfada416-eba1-49cf-ad21-0f48b48d50ad`. + meta: + total: 1 + success: 0 + failed: 1 + properties: + data: + type: array + items: + type: object + properties: {} + errors: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + status: + type: number + title: + type: string + minLength: 1 + type: + type: string + minLength: 1 + errors: + type: object + properties: + '0': + type: string + minLength: 1 + meta: + type: object + required: + - total + - success + - failed + properties: + total: + type: number + success: + type: number + failed: + type: number + required: + - data + - errors + - meta + examples: + shopper-profile-conflict: + value: + data: [] + errors: + - status: 409 + title: Unable to add shopper profiles to segment due to conflicts. + type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes' + errors: + '0': Shopper profile `1465bb16-eb7d-4fba-8312-0ea9d88cd6e9` already exists for segment `dfada416-eba1-49cf-ad21-0f48b48d50ad`. + meta: + total: 1 + success: 0 + failed: 1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShopperProfilesAddRequest' + delete: + summary: 'Remove Shopper Profiles from a Segment' + tags: + - Shopper Profiles for a Segment + description: | + Remove one or more *Shopper Profiles* that are associated with a *Segment*. This operation only removes the association; it doesn't delete the *Shopper Profiles*. + operationId: 'DeleteShopperProfile' + parameters: + - $ref: '#/components/parameters/FilterIdParam' + responses: + '204': + description: | + An empty response. + '/shopper-profiles': + parameters: + - $ref: '#/components/parameters/Accept' + get: + summary: 'Get All Shopper Profiles' + tags: + - Shopper Profiles + description: | + Returns a paginated *Shopper Profiles* list. + + operationId: 'GetShopperList' + parameters: + - $ref: '#/components/parameters/FilterPageParam' + - $ref: '#/components/parameters/FilterLimitParam' + responses: + '200': + description: | + An array of *Shopper Profiles* objects and metadata. + content: + application/json: + schema: + $ref: '#/components/schemas/ShopperProfilesCollectionResponse' + post: + summary: 'Create Shopper Profiles' + tags: + - Shopper Profiles + description: | + Creates a *Shopper Profile*. + operationId: 'ShopperProfilesRequest' + parameters: + - $ref: '#/components/parameters/ContentType' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShopperProfilesPostRequest' + required: true + responses: + '201': + description: | + An array of created *Shopper Profiles*. + content: + application/json: + schema: + $ref: '#/components/schemas/ShopperProfilesResponse' + '400': + description: | + The *Segment* was not valid. This is the result of either missing required fields, or because of invalid data. See the response for more details. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + delete: + summary: 'Delete Shopper Profiles' + tags: + - Shopper Profiles + description: | + Deletes one or more *Shopper Profiles* from a store. + operationId: 'DeleteStoreShopperProfile' + parameters: + - $ref: '#/components/parameters/FilterIdParam' + responses: + '204': + description: | + An empty response. + '/shopper-profiles/{shopperProfileId}/segments': + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/ShopperIdPathParam' + get: + summary: 'Get All Segments for a Shopper Profile' + tags: + - Segments for a Shopper Profile + description: Returns a paginated *Segments* list for a *Shopper Profile*. + operationId: 'GetListShopperProfile' + parameters: + - $ref: '#/components/parameters/FilterPageParam' + - $ref: '#/components/parameters/FilterLimitParam' + responses: + '200': + description: | + An array of *Segments* objects and metadata. + content: + application/json: + schema: + $ref: '#/components/schemas/SegmentCollectionResponse' +components: + parameters: + Accept: + name: Accept + in: header + required: true + description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.' + schema: + type: string + default: 'application/json' + ContentType: + name: Content-Type + in: header + required: true + description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.' + schema: + type: string + default: 'application/json' + SegmentIdPathParam: + name: segmentId + description: The *Segment* ID. + in: path + schema: + type: string + format: uuid + required: true + ShopperIdPathParam: + name: shopperProfileId + description: The *Shopper Profile* ID. + in: path + schema: + type: string + format: uuid + required: true + FilterIdParam: + name: 'id:in' + description: | + Comma separated IDs. + required: false + in: query + schema: + type: array + items: + type: string + explode: true + FilterPageParam: + name: page + in: query + description: | + Page number. + required: false + schema: + type: integer + FilterLimitParam: + name: limit + in: query + description: | + Items count per page. + required: false + schema: + type: integer + schemas: + SegmentsResponse: + description: | + Response payload for the BigCommerce API. + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Segment' + meta: + type: object + properties: {} + title: '' + SegmentsPostRequest: + description: | + Request payload for the BigCommerce API. + type: array + items: + $ref: '#/components/schemas/SegmentPost' + SegmentsPutRequest: + description: | + Request payload for the BigCommerce API. + type: array + items: + $ref: '#/components/schemas/SegmentPut' + SegmentPost: + type: object + properties: + name: + type: string + description: Name of the segment + example: My Segment + description: + type: string + description: Description of the segment + example: Description + required: + - name + SegmentPut: + type: object + properties: + id: + type: string + description: ID of the segment. + format: uuid + name: + type: string + description: Name of the segment. + example: My Segment + description: + type: string + description: Description of the segment. + example: Description + required: + - id + Pagination: + type: object + description: | + Data about the response including pagination, and collection totals. + properties: + total: + type: integer + description: | + Total number of items in the result set. + example: 1 + count: + type: integer + description: | + Total number of items in the collection response. + example: 1 + per_page: + type: integer + description: | + The amount of items returned in the collection per page, controlled by the limit parameter. + example: 50 + current_page: + type: integer + description: | + The page you are currently on within the collection. + example: 1 + total_pages: + type: integer + description: | + The total number of pages in the collection. + example: 1 + CollectionMeta: + type: object + description: | + Data about the response including pagination, and collection totals. + properties: + pagination: + $ref: '#/components/schemas/Pagination' + ErrorResponse: + allOf: + - $ref: '#/components/schemas/BaseError' + - type: object + properties: + errors: + $ref: '#/components/schemas/DetailedErrors' + BaseError: + type: object + description: | + Error payload for the BigCommerce API. + properties: + status: + description: | + The HTTP status code. + type: integer + title: + description: | + The error title describing the particular error. + type: string + type: + type: string + instance: + type: string + DetailedErrors: + type: object + properties: {} + additionalProperties: + type: string + Segment: + type: object + properties: + id: + type: string + format: uuid + description: | + The ID of the segment. + name: + type: string + description: | + The name of the segment. + example: My Segment + description: + type: string + description: | + The description of the segment. + example: Description + created_at: + type: string + format: date-time + description: | + The date of which the segment was created. + example: 2022-09-15T23:44:05Z + updated_at: + type: string + format: date-time + description: | + The date of which the segment was updated. + example: 2022-09-15T23:44:05Z + SegmentCollectionResponse: + description: | + Response payload for the BigCommerce API. + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Segment' + meta: + $ref: '#/components/schemas/CollectionMeta' + ShopperProfile: + type: object + properties: + id: + type: string + format: uuid + description: | + The ID of the *Shopper Profile*. + customer_id: + type: integer + example: 1 + description: | + The ID of the registered *Customer* associated with this *Shopper Profile*. + created_at: + type: string + format: date-time + description: | + The date and time when the *Shopper Profile* was created. + updated_at: + type: string + format: date-time + description: | + The date and time when the *Shopper Profile* was last updated. + ShopperProfilesAddRequest: + type: array + description: A list of *Shopper Profiles* to associate with the segment. + items: + type: string + format: uuid + description: 'The ID of a *Shopper Profile*.' + ShopperProfilesAddResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ShopperProfile' + ShopperProfilesGetResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ShopperProfile' + meta: + $ref: '#/components/schemas/CollectionMeta' + ShopperProfilesCollectionResponse: + description: | + Response payload for the BigCommerce API. + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ShopperProfile' + meta: + $ref: '#/components/schemas/CollectionMeta' + ShopperProfilesPostRequest: + description: | + Request payload for the BigCommerce API. + type: array + items: + $ref: '#/components/schemas/ShopperProfilePost' + ShopperProfilePost: + type: object + properties: + customer_id: + type: number + description: The ID of a registered Customer to associate with the new *Shopper Profile*. + example: 1 + ShopperProfilesResponse: + description: | + Response payload for the BigCommerce API. + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ShopperProfile' + meta: + type: object + properties: {} + securitySchemes: + X-Auth-Token: + name: X-Auth-Token + description: |- + ### OAuth scopes + | UI Name | Permission | Parameter | + |:--------|:-----------|:----------| + | Customers | modify | `store_v2_customers` | + | Customers | read-only | `store_v2_customers_read_only` | + + **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a Segment](/docs/rest-management/customer-segmentation/shopper-profiles-for-a-segment#get-all-shopper-profiles-in-a-segment) endpoint which requires modify permission. + + ### Authentication header + + | Header | Argument | Description | + |:-------|:---------|:------------| + | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/docs/start/authentication). | + + ### Further reading + + For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests). + + For more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/docs/start/authentication#oauth-scopes). + + For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes). + type: apiKey + in: header diff --git a/reference/webhooks.v3.yml b/reference/webhooks.v3.yml index 21245780d..da17579ee 100644 --- a/reference/webhooks.v3.yml +++ b/reference/webhooks.v3.yml @@ -1,2980 +1,2980 @@ -openapi: '3.0.3' -info: - title: Webhooks v3 - version: '' - description: |- - Get notified when specific events occur on a BigCommerce store. For more information, see the [Webhooks Overview](/docs/integrations/webhooks), [Webhooks Events](/docs/integrations/webhooks/events), or [Webhooks Tutorial](/docs/integrations/webhooks/tutorial). - - In general, webhook usage follows the workflow - 1. Create a webhook for a specific scope using [Create a Webhook](#create-a-webhook) - 2. Receive event callback payload at the destination URL - 3. Respond to callback with success status `2xx` or any failure status - 1. On failure, await second callback attempt - 2. On success, move to event handling - 4. Handle event based on payload - - Callback payloads have a uniform structure, including the minimum information to uniquely identify what event occurred, on what store, with respect to what data, and at what time. The `data` object serves as the only variable data structure in the payload. - - For inventory and location events, `data` will include `location_id`, and `variant_id` or `product_id` as necessary. For all other events `data` will include `type`, `id`, and any scope-specific information (such as `couponId` for the `store/cart/couponApplied`). Scope-specific fields are outlined in the [Webhooks Events](/docs/integrations/webhooks/events). - - An example of payload structure is include below. Datatypes are outlined in the following table. - | Field | Type | Example | - | --- | --- | --- | - | `producer` | `string` | `stores/abc123` | - | `hash` | `string` | `dd70c0976e06b67aaf671e73f49dcb79230ebf9d` | - | `created_at` | `integer` | `1561479335` | - | `store_id` | `string` | `1025646` | - | `scope` | `string` | `store/order/created` | - | `data` | `object` | variable | - | `data.type` | `string` | `product` | - | `data.id` | `integer` | `223`| - - ```json filename="Example callback structure" copy - { - "producer": "stores/" - "hash": , - "created_at": , - "store_id": , - "scope": , - "data": { - - }, - } - ``` - termsOfService: 'https://www.bigcommerce.com/terms' - contact: - email: support@bigcommerce.com - name: BigCommerce - url: 'https://www.bigcommerce.com' -tags: - - name: Manage Webhooks (Single) - - name: Manage Webhooks (Bulk) - - name: Webhooks Admin -security: - - X-Auth-Token: [] -servers: - - url: 'https://api.bigcommerce.com/stores/{store_hash}/v3' - variables: - store_hash: - default: store_hash - description: Permanent ID of the BigCommerce store. - description: BigCommerce API Gateway -paths: - '/hooks': - post: - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/webhook_Full' - meta: {} - links: - getHook: - operationId: getWebhook - parameters: - webhook_id: $response.body#/id - '400': - $ref: '#/components/responses/400_BadRequest' - '401': - $ref: '#/components/responses/401_Unauthorized' - '422': - $ref: '#/components/responses/422_UnprocessableEntity' - summary: Create a Webhook - description: Creates a webhook. Only one webhook at a time can be created. Custom headers can be added. Destination URL must be served on port 443 (custom ports are not currently supported). - operationId: createWebhooks - parameters: - - $ref: '#/components/parameters/Accept' - - $ref: '#/components/parameters/Content-Type' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/webhook_Base' - tags: - - Manage Webhooks (Single) - get: - responses: - '200': - $ref: '#/components/responses/webhooks_Resp' - '401': - $ref: '#/components/responses/401_Unauthorized' - summary: Get Webhooks - description: |- - Returns a list of all webhooks on a store associated to the `client_id` used to authenticate the request. - - *Note: BigCommerce determines the `client_id` from the `access_token`.* - operationId: getWebhooks - tags: - - Manage Webhooks (Bulk) - parameters: - - $ref: '#/components/parameters/Accept' - - $ref: '#/components/parameters/Content-Type' - - $ref: '#/components/parameters/FilterPageParam' - - $ref: '#/components/parameters/FilterLimitParam' - - $ref: '#/components/parameters/IsActive' - - $ref: '#/components/parameters/FilterByScope' - - $ref: '#/components/parameters/FilterByDestination' - '/hooks/{webhook_id}': - get: - responses: - '200': - $ref: '#/components/responses/webhook_Resp' - '401': - $ref: '#/components/responses/401_Unauthorized' - '404': - $ref: '#/components/responses/404_NotFound' - description: Return a webhook by ID. - operationId: getWebhook - summary: Get a Webhook - tags: - - Manage Webhooks (Single) - parameters: - - $ref: '#/components/parameters/Accept' - - $ref: '#/components/parameters/Content-Type' - parameters: - - $ref: '#/components/parameters/WebhookId' - put: - responses: - '200': - $ref: '#/components/responses/webhook_Resp' - summary: Update a Webhook - description: Updates a webhook. You can add custom headers. At least one field is required to perform an update. - operationId: updateWebhook - parameters: - - $ref: '#/components/parameters/Accept' - - $ref: '#/components/parameters/Content-Type' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/webhook_Put' - tags: - - Manage Webhooks (Single) - delete: - responses: - '200': - $ref: '#/components/responses/webhook_Resp' - summary: Delete a Webhook - description: Deletes a webhook. Only one webhook at a time can be deleted. When a webhook is deleted, it is returned in the response as a 200 OK. - operationId: deleteWebhook - tags: - - Manage Webhooks (Single) - parameters: - - $ref: '#/components/parameters/Accept' - - $ref: '#/components/parameters/Content-Type' - '/hooks/admin': - get: - operationId: getHooksAdmin - summary: Get Admin Info - description: List all notification emails, webhooks, and denylisted domains associated with the API account. - parameters: - - $ref: '#/components/parameters/IsActive' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - emails: - description: Email addresses to be sent notifications. - type: array - items: - type: string - format: email - example: 'webhooks@example.com' - hooks_list: - description: 'List of all the webhooks associated with the provider API account, filtered by the `active` parameter.' - type: array - items: - type: object - properties: - id: - type: integer - description: ID of the webhook - client_id: - type: string - minLength: 1 - description: Client ID, unique to the store or app. - store_hash: - minLength: 1 - type: string - description: Permanent ID of the BigCommerce store. - scope: - type: string - minLength: 1 - description: Event you subscribe to - example: store/order/created - destination: - type: string - minLength: 1 - description: URL must be active, return a 200 response, and be served on port 443. Custom ports arenʼt currently supported. - headers: - type: object - description: You can pass in any number of custom headers to validate webhooks being returned. - properties: {} - nullable: true - additionalProperties: - type: string - is_active: - type: boolean - description: If the webhook is active or not. A webhook subscription becomes deactivated after 90 days of inactivity. - default: true - created_at: - type: integer - example: 1561488106 - description: The time the webhook was created, represented in UNIX epoch time. - updated_at: - type: integer - example: 1561488106 - description: The time the webhook was most recently updated, represented in UNIX epoch time. - status: - type: string - description: The webhook status. - enum: - - inactive - - active - - deactivated - blocked_domains: - description: List of domains (destinations) that are currently on the denylist and are not being sent webhooks. - type: array - items: - type: object - properties: - destination: - description: Domain URL to which webhooks are sent. - type: string - format: url - time_left: - description: Remaining time in seconds that the domain is on the denylist. - type: integer - reasons: - type: array - items: - type: object - properties: - failure_description: - type: string - count: - type: integer - timestamp: - type: integer - format: int64 - description: UTC timestamp in seconds that the events was created - meta: - type: object - properties: - pagination: - $ref: '#/components/schemas/Pagination' - examples: {} - '401': - $ref: '#/components/responses/401_Unauthorized' - tags: - - Webhooks Admin - put: - operationId: updateHooksAdmin - summary: Upsert Email Notifications - description: | - Update email addresses that are sent notification emails when any domain associated with the API account is denylisted or when a webhook is deactivated. Supports `upsert` functionality in the case that no email address exists yet. - requestBody: - description: List of notification emails. - content: - application/json: - schema: - type: object - properties: - emails: - type: array - items: - type: string - format: email - example: 'webhooks@example.com' - examples: - Example: - value: - emails: - - user@example.com - required: true - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/400_BadRequest' - '401': - $ref: '#/components/responses/401_Unauthorized' - '422': - $ref: '#/components/responses/422_UnprocessableEntity' - tags: - - Webhooks Admin -components: - parameters: - WebhookId: - name: webhook_id - in: path - description: The ID of a Webhook. - required: true - schema: - type: integer - minimum: 1 - example: 22561593 - IsActive: - name: is_active - in: query - description: | - Enables user to filter for webhooks that are active or not. A webhook subscription becomes deactivated after 90 days of inactivity. - schema: - type: boolean - example: true - FilterByScope: - name: scope - in: query - description: | - Enables user to filter for webhooks by scope. - schema: - type: string - FilterByDestination: - name: destination - in: query - description: | - Enables user to filter for webhooks by destination. - schema: - type: string - FilterPageParam: - name: page - in: query - description: | - Page number. - required: false - schema: - type: integer - example: 1 - FilterLimitParam: - name: limit - in: query - description: | - Items count per page. - required: false - schema: - type: integer - Accept: - in: header - name: Accept - schema: - type: string - default: application/json - Content-Type: - name: Content-Type - in: header - schema: - type: string - default: application/json - responses: - webhooks_Resp: - description: '' - content: - application/json: - schema: - description: '' - type: object - properties: - data: - type: array - uniqueItems: true - minItems: 1 - items: - type: object - properties: - id: - type: integer - client_id: - type: string - minLength: 1 - store_hash: - type: string - minLength: 1 - scope: - type: string - minLength: 1 - destination: - type: string - minLength: 1 - headers: - type: object - properties: {} - nullable: true - additionalProperties: - type: string - is_active: - type: boolean - created_at: - type: integer - description: The time the webhook was created, represented in UNIX epoch time. - updated_at: - type: integer - description: The time the webhook was most recently updated, represented in UNIX epoch time. - meta: - type: object - properties: - pagination: - $ref: '#/components/schemas/Pagination' - examples: {} - 502_GatewayError: - description: If something happens during the request that causes it to fail, a 502 response will be returned. A new request should be made; however, it could fail. - content: - application/json: - schema: - $ref: '#/components/schemas/error_Full' - examples: - response: - value: - status: 502 - title: A login URL could not be generated. Please try another request. - type: /api-docs/getting-started/api-status-codes - 503_ServiceUnavailable: - description: 'If this occurs, you should retry the request. If you are unable to successfully make a request, please check the BigCommerce [system status](https://status.bigcommerce.com/). A service is likely down and the request will need to be made again when it is back up (in several hours usually)' - content: - application/json: - schema: - $ref: '#/components/schemas/error_Full' - examples: - response: - value: - status: 503 - title: Service Unavailable - type: /api-docs/getting-started/api-status-codes - 504_GatewayTimeout: - description: 'If this occurs, you should retry the request. Typically retrying the request several times will result in a successful request; However, if you are unable to successfully make a request, please check the BigCommerce [system status](https://status.bigcommerce.com/). A service is likely down and the request will need to be made again when it is back up (in several hours usually)' - content: - application/json: - schema: - $ref: '#/components/schemas/errorDetailed_Full' - examples: - response: - value: - status: 504 - title: Gateway Timeout - type: /api-docs/getting-started/api-status-codes - errors: {} - 400_BadRequest: - description: |- - Malformed request syntax. Typically need to fix the JSON request body to resend successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/error_Full' - examples: - response: - value: - status: 400 - title: Input is invalid. - type: /api-docs/getting-started/api-status-codes - 401_Unauthorized: - description: Unauthorized - the v3 Auth client ID or token in the request are not a valid combination for this store. - content: - application/json: - schema: - $ref: '#/components/schemas/error_Full' - examples: - response: - value: - status: 401 - title: Unauthorized - the v3 Auth client ID or token in the request are not a valid combination for this store. - type: /api-docs/getting-started/api-status-codes - 403_Unauthorized: - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/error_Full' - examples: - response: - value: - status: 403 - title: Unauthorized Access. You do not have permission to make this request. - type: /api-docs/getting-started/api-status-codes - 404_NotFound: - description: If the requested webhook is not found, return a 404 Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/error_Full' - examples: - response: - value: - status: 404 - title: 'Webhook with id [{webhook_id}] not found' - type: /api-docs/getting-started/api-status-codes - 422_UnprocessableEntity: - description: This occurs when missing or unacceptable data is passed for one or more fields. Please correct the values for the fields listed in the errors object. - content: - application/json: - schema: - $ref: '#/components/schemas/errorDetailed_Full' - examples: - response: - value: - status: 422 - title: JSON data is missing or invalid - type: /api-docs/getting-started/api-status-codes - errors: - destination: error.path.missing. - webhook_Resp: - description: Example response - content: - application/json: - schema: - description: '' - type: object - properties: - data: - type: object - properties: - id: - type: integer - client_id: - type: string - minLength: 1 - store_hash: - type: string - minLength: 1 - scope: - type: string - minLength: 1 - destination: - type: string - minLength: 1 - headers: - type: object - properties: {} - nullable: true - additionalProperties: - type: string - is_active: - type: boolean - created_at: - type: integer - description: The time the webhook was created, represented in UNIX epoch time. - updated_at: - type: integer - description: The time the webhook was most recently updated, represented in UNIX epoch time. - meta: {} - examples: - application/json: - value: - data: - id: 18048287 - client_id: m9r6keqmo7h7f23btnpwernbez1kglkl - store_hash: sftg45fsd - created_at: 1561488106 - updated_at: 1561488106 - scope: store/order/created - destination: 'https://665b65a6.ngrok.io/webhooks' - is_active: true - headers: - 'custom-key': developer-defined value - meta: {} - securitySchemes: - X-Auth-Token: - name: X-Auth-Token - description: |- - ### OAuth scopes - - None required. Create and manage webhooks with the default scope of an API account. - - ### Authentication header - - | Header | Argument | Description | - |:-------|:---------|:------------| - | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). | - - ### Further reading - - For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests). - - For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes). - - For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes). - type: apiKey - in: header - schemas: - store_cart_wildcard: - description: |- - Fires for each of the following events: - * `store/cart/created` - * `store/cart/updated` - * `store/cart/deleted` - * `store/cart/couponApplied` - * `store/cart/abandoned` - * `store/cart/converted` - * `store/cart/lineItem` - - See individual events for more information. - title: store/cart/* - store_cart_created: - description: |- - This webhook fires on new cart creation when any of the following occur: - * a storefront shopper adds their first product to a cart during a new session - * an application makes a successful `POST` request to `/carts` using either the [REST Storefront](/docs/rest-storefront/carts#create-a-cart) API or the [REST Management](/docs/rest-management/carts/carts-single#create-a-cart) API - * a storefront makes a successful call to create a cart using the [GraphQL Storefront API](/docs/storefront/cart-checkout/guide/graphql-storefront) - - Cart creation also fires the `store/cart/updated` webhook. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/cart/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "cart", - "id": "09346904-4175-44fd-be53-f7e598531b6c" - } - } - ``` - title: store/cart/created - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. - properties: - type: - type: string - description: can be `cart` or `cart_line_item` - example: cart - enum: - - cart - - cart_line_item - id: - type: string - description: ID of the cart - example: 09346904-4175-44fd-be53-f7e598531b6c - x-tags: - - created - store_cart_updated: - title: store/cart/updated - description: |- - Fires when one of the following occurs: - * A cartʼs line items are modified by adding a new item to a cart, updating an existing itemʼs quantity, or deleting an item. - * A shopper enters or changes their email address during guest checkout. This includes signing in to a customer account after creating a guest cart, which associates the accountʼs email address with the cart. - - The `store/cart/created` webhook firing also triggers this webhook because adding a product to an empty cart is considered an update. - - Changes to the following fields trigger this event: - * Quantity - * Item Price - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/cart/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "cart", - "id": "09346904-4175-44fd-be53-f7e598531b6c" - } - } - ``` - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. - properties: - type: - type: string - description: can be `cart` or `cart_line_item` - example: cart - id: - type: string - description: ID of the cart - example: 09346904-4175-44fd-be53-f7e598531b6c - x-tags: - - created - store_cart_deleted: - title: store/cart/deleted - description: |- - Fires when a cart is deleted. Carts are deleted in two ways; when all items are removed from a cart, and when an API consumer explicitly removes the cart using a `DELETE` request. Cart deletion ends the cart lifecycle. The `store/cart/updated` webhook also fires when the last item is removed. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/cart/deleted", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "cart", - "id": "09346904-4175-44fd-be53-f7e598531b6c" - } - } - ``` - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. - properties: - type: - type: string - description: can be `cart` or `cart_line_item` - example: cart - id: - type: string - description: ID of the cart - example: 09346904-4175-44fd-be53-f7e598531b6c - x-tags: - - deleted - store_cart_couponApplied: - title: store/cart/couponApplied - description: |- - Fires when a new coupon code is applied to a cart. The webhook request body includes the ID of the coupon code. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/cart/couponApplied", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "cart", - "id": "09346904-4175-44fd-be53-f7e598531b6c", - "couponId": 1 - } - } - ``` - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: can be `cart` or `cart_line_item` - example: cart - id: - type: string - description: ID of the cart - example: 09346904-4175-44fd-be53-f7e598531b6c - couponId: - type: integer - description: ID of the coupon - example: 1 - x-tags: - - created - store_cart_abandoned: - title: store/cart/abandoned - description: |- - This webhook fires after a cart is abandoned. BigCommerce considers a cart abandoned when it has no activity for at least one hour. This webhook is available for all store plans, regardless of whether the Abandoned Cart Saver feature is enabled. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/cart/abandoned", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "cart", - "id": "09346904-4175-44fd-be53-f7e598531b6c", - "token": "1eed6d2d979776ff18e695ceeb10ea61" - } - } - ``` - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: can be `cart` or `cart_line_item` - example: cart - id: - type: string - description: ID of the cart - example: 09346904-4175-44fd-be53-f7e598531b6c - token: - type: string - example: 1eed6d2d979776ff18e695ceeb10ea61 - description: Use this token to obtain cart data. - store_cart_converted: - title: store/cart/converted - description: |- - Fires when a cart/checkout is converted into an order, which is typically after the checkout payment step on the storefront. At this point, the cart is automatically deleted and no longer accessible. This webhook returns both the cart/checkout ID and order ID for correlation purposes. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/cart/converted", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "cart", - "id": "09346904-4175-44fd-be53-f7e598531b6c", - "orderId": 252 - } - } - ``` - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `cart`. - default: cart - id: - type: string - description: ID of the cart - example: 09346904-4175-44fd-be53-f7e598531b6c - orderId: - type: integer - description: ID of the order created. - example: 252 - x-tags: - - created - store_cart_lineItem_wildcard: - title: store/cart/lineItem/* - description: |- - This webhook subscribes to all cart line item events. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/cart/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "cart", - "id": "09346904-4175-44fd-be53-f7e598531b6c", - "cartId": "b0386708-fef3-45de-9d8b-fbe3031450a4" - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: Can be `cart` or `cart_line_item`. - id: - type: string - description: ID of the cart. - cartId: - type: string - description: ID of the cart. - x-tags: - - created - store_cart_lineItem_created: - title: store/cart/lineItem/created - description: |- - Fires when a new item is added to the cart. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/cart/lineItem/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "cart", - "id": "09346904-4175-44fd-be53-f7e598531b6c", - "cartId": "b0386708-fef3-45de-9d8b-fbe3031450a4" - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: can be `cart` or `cart_line_item` - example: cart - id: - type: string - description: ID of the line item - example: 09346904-4175-44fd-be53-f7e598531b6c - cartId: - type: string - description: ID of the cart - example: b0386708-fef3-45de-9d8b-fbe3031450a4 - x-tags: - - created - store_cart_lineItem_updated: - title: store/cart/lineItem/updated - description: |- - Fires when an item’s quantity has changed or the product options change. - - Changes to the following fields trigger this event: - * Quantity - * Item Price - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/cart/lineItem/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "cart", - "id": "09346904-4175-44fd-be53-f7e598531b6c", - "cartId": "b0386708-fef3-45de-9d8b-fbe3031450a4" - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: can be `cart` or `cart_line_item` - example: cart - id: - type: string - description: ID of the line item - example: 09346904-4175-44fd-be53-f7e598531b6c - cartId: - type: string - description: ID of the cart - example: b0386708-fef3-45de-9d8b-fbe3031450a4 - x-tags: - - updated - store_cart_lineItem_deleted: - title: store/cart/lineItem/deleted - description: |- - Fires when an item is deleted from the cart. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/cart/lineItem/deleted", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "cart", - "id": "09346904-4175-44fd-be53-f7e598531b6c", - "cartId": "b0386708-fef3-45de-9d8b-fbe3031450a4" - } - } - ``` - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: Can be `cart` or `cart_line_item`. - example: cart - id: - type: string - description: ID of the line item. - example: 09346904-4175-44fd-be53-f7e598531b6c - cartId: - type: string - description: ID of the cart. - example: b0386708-fef3-45de-9d8b-fbe3031450a4 - x-tags: - - deleted - store_category_wildcard: - title: store/category/* - description: | - Fires for all `store/category` events. - x-tags: - - created - store_category_created: - title: store/category/created - description: |- - Fires when a category is created. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/category/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "category", - "id": 42 - } - } - ``` - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - $ref: '#/components/schemas/callback_category_data' - x-tags: - - created - store_category_updated: - title: store/category/updated - description: |- - Fires when a category is updated. - - Changes to the following fields trigger this event: - * URL - * Name - * Redirect Old URLs - * Description - * Parent Category - * Template Layout File - * Sort Order - * Default Product Sort - * Category Image - * Page Title - * Meta Keywords - * Meta Description - * Search Keywords - * Google Product Category - * Enable Google Shopping - - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/category/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "category", - "id": 42 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `category`. - default: category - id: - type: integer - description: ID of the category - example: 42 - x-tags: - - updated - store_category_deleted: - title: store/category/deleted - description: |- - Fires when a category is deleted. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/category/deleted", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "category", - "id": "42" - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `category`. - default: category - example: category - id: - type: integer - description: ID of the category - example: 42 - x-tags: - - deleted - store_channel_wildcard: - title: store/channel/* - description: Fires for all `store/channel` events. - x-tags: - - created - store_channel_created: - title: store/channel/created - description: |- - Fires when a channel is created in the control panel or by API. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/channel/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "channel", - "id": 173331 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `channel`. - default: channel - example: channel - readOnly: true - id: - type: integer - description: ID of the channel - example: 173331 - x-tags: - - created - store_channel_updated: - title: store/channel/updated - description: |- - This webhook is triggered when a channel is updated in the control panel or by API. - - Changes to the following fields trigger this event: - * name - * external_id - * status - * is_listable_from_ui - * is_visible - - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/channel/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "channel", - "id": 173331 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `channel`. - default: channel - example: channel - readOnly: true - id: - type: integer - description: ID of the channel - example: 173331 - x-tags: - - created - store_customer_wildcard: - title: store/customer/* - description: | - Fires for all `store/customer` events. - x-tags: - - created - store_customer_created: - title: store/customer/created - description: |- - Fires when a new customer is created. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/customer/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "customer", - "id": 32 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `customer`. - default: customer - example: customer - readOnly: true - id: - type: integer - description: ID of the customer - example: 32 - x-tags: - - created - store_customer_updated: - title: store/customer/updated - description: |- - This webhook is triggered when a customer is updated. In addition, this webhook is triggered when a shopper initially enters custom form field values within the account sign-up form. Please note that neither changing existing data in customer form fields nor changing a customerʼs address will trigger the webhook. - - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/customer/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "customer", - "id": 32 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `customer`. - default: customer - example: customer - readOnly: true - id: - type: integer - description: ID of the customer - example: 32 - x-tags: - - created - store_customer_deleted: - title: store/customer/deleted - description: |- - This webhook is triggered when a customer is deleted. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/customer/deleted", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "customer", - "id": 32 - } - } - ``` - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `customer`. - default: customer - example: customer - readOnly: true - id: - type: integer - description: ID of the customer. - example: 32 - x-tags: - - created - store_customer_address_updated: - title: store/customer/address/updated - description: |- - Fires when a customer address is updated. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/customer/address/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "customer", - "id": 60, - "address": { - "customer_id": 32 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `customer`. - example: customer - id: - type: integer - description: ID of the customer address. - example: 60 - address: - type: object - properties: - customer_id: - type: integer - description: ID of the customer. - example: 32 - x-tags: - - created - store_customer_address_created: - title: store/customer/address/created - description: |- - Fires when a customer address is created. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/customer/address/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "customer", - "id": 60, - "address": { - "customer_id": 32 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `customer`. - example: customer - id: - type: integer - description: ID of the customer address. - example: 60 - address: - type: object - properties: - customer_id: - type: integer - description: ID of the customer. - example: 32 - x-tags: - - created - store_customer_address_deleted: - title: store/customer/address/deleted - description: |- - Fires when a customer address is deleted. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/customer/address/deleted", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "customer", - "id": 60, - "address": { - "customer_id": 32 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `customer`. - example: customer - id: - type: integer - description: ID of the customer address. - example: 60 - address: - type: object - properties: - customer_id: - type: integer - description: ID of the customer. - example: 32 - x-tags: - - created - store_customer_payment_instrument_default_updated: - title: store/customer/payment/instrument/default/updated - description: |- - Fires when a customer default payment instrument is updated. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/customer/payment/instrument/default/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "customer", - "id": 32 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: can be `cart` or `cart_line_item` - default: '"customer"' - example: '"customer"' - readOnly: true - id: - type: integer - description: ID of the customer. - example: 32 - x-tags: - - created - store_order_wildcard: - title: store/order/* - description: Fires for all `store/order` events. - store_order_created: - title: store/order/created - description: |- - This webhook is triggered when an order is created in the control panel, using an app, or by API. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/order/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "order", - "id": 250 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `order`. - default: order - example: order - id: - type: integer - description: ID of the order. - example: 250 - x-tags: - - created - store_order_updated: - title: store/order/updated - description: |- - Fires when a previously-created order is updated. - - Changes to the following fields trigger this event: - * Status - * Coupon Code - * Billing and Shipping Address - * Product Type - * Search Keywords - * Related Products - * Warranty Information - * Page Title - * Meta Description - * Gift Wrapping options - * Bin Picking Number (BPN) - * Fixed Shipping Price - * Free Shipping - * Open Graph Sharing Type - * Availability Text - * Purchasability - * Release Date - * Remove pre-order status on this date - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/order/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "order", - "id": 250 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `order`. - default: order - example: order - id: - type: integer - description: ID of the order. - example: 250 - x-tags: - - created - store_order_archived: - title: store/order/archived - description: |- - Fires when an order is archived. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/order/archived", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "order", - "id": 250 - } - } - ``` - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `order`. - default: order - example: order - id: - type: integer - description: ID of the order. - example: 250 - x-tags: - - created - store_order_statusUpdated: - title: store/order/statusUpdated - description: |- - This webhook is triggered when an order status changes; for example, from `Pending` to `Awaiting Payment`. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/order/statusUpdated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "order", - "id": 250, - "status": { - "previous_status_id": 1, - "new_status_id": 11 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `order`. - example: order - id: - type: integer - description: ID of the order. - example: 250 - status: - type: object - properties: - previous_status_id: - type: integer - description: ID of the previous status. - example: 1 - new_status_id: - type: integer - description: ID of the updated status. - example: 11 - x-tags: - - created - store_order_message_created: - title: store/order/message/created - description: |- - This webhook is triggered when an order message is created by a customer or in the control panel. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/order/message/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "order", - "id": 250, - "message": { - "order_message_id": 3 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `order`. - example: order - id: - type: integer - description: ID of the order. - example: 250 - message: - type: object - properties: - order_message_id: - type: integer - description: ID of the message on the order. - example: 3 - x-tags: - - created - store_order_refund_created: - title: store/order/refund/created - description: |- - This webhook is triggered when a refund is submitted against an order. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/order/refund/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "order", - "id": 250, - "refund": { - "refund_id": 3 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `order`. - example: order - id: - type: integer - description: ID of the order. - example: 250 - refund: - type: object - properties: - refund_id: - type: integer - description: ID of the refund submitted against the order. - example: 3 - x-tags: - - created - store_product_wildcard: - title: store/product/* - description: Fires for all `store/product` events. - store_product_deleted: - title: store/product/deleted - description: |- - This webhook is triggered when a product is deleted. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/product/deleted", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "product", - "id": 205 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type ill always be `product`. - default: product - example: product - id: - type: integer - description: ID of the product. - example: 205 - x-tags: - - created - store_product_created: - title: store/product/created - description: |- - Fires when a new product is created. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/product/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "product", - "id": 205 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `product`. - default: product - example: product - id: - type: integer - description: ID of the product. - example: 205 - x-tags: - - created - store_product_updated: - title: store/product/updated - description: |- - Fires when product details are edited. - - Changes to the following fields trigger this event: - * Product Type - * Search Keywords - * Related Products - * Warranty Information - * Page Title - * Meta Description - * Gift Wrapping options - * Bin Picking Number (BPN) - * Fixed Shipping Price - * Free Shipping - * Open Graph Sharing Type - * Availability Text - * Purchasability - * Release Date - * Remove pre-order status on this date - * Preorder Message - * Inventory Stock - * Inventory Low Stock - * Track inventory - * Product UPC/EAN - * SKU - * Cost - * Tax Class - * Weight - * Width - * Height - * Depth - * Condition - * Show condition on storefront - * Brand - * Default Price - * Sale Price - * MSRP - * Product Name - * Description - * Visible on Storefront - * Sort Order - * Categories - * Product URL - * Set as a Featured Product on my Storefront - - However, changes to the following fields donʼt trigger this event: - - * Manufacturer Part Number (MPN) - * Global Trade Number (GTN) - * Tax Provider Tax Code - * Product Image - * Product Image Description - * Product Files - * Customs Information - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/product/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "product", - "id": 205 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type ill always be `product`. - default: product - example: product - id: - type: integer - description: ID of the product. - example: 205 - x-tags: - - created - store_product_inventory_updated: - title: store/product/inventory/updated - description: |- - This webhook is triggered when product inventory is updated. - - Changes to the following fields trigger this event: - * Inventory Stock - - However, changes to the following fields donʼt trigger this event: - * Track Inventory - * Inventory Low Stock - - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/product/inventory/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "product", - "id": 167, - "inventory": { - "product_id": 167, - "method": "absolute", - "value": 2 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `product`. - example: product - id: - type: integer - description: ID of the product. - example: 167 - inventory: - type: object - properties: - product_id: - type: integer - description: ID of the product. - example: 167 - method: - type: string - description: |- - How the inventory was adjusted. Value will be one of the following: - * `absolute` - inventory updated through the API or the control panel. - * `relative` - inventory updated by an order. - enum: - - absolute - - relative - value: - type: integer - description: 'This value is the difference between an item’s inventory count before and after the inventory updates. This value is negative if an item’s inventory count decreases. For example, reducing inventory by three returns a value of `-3`. This value is positive if an item’s inventory count increases. For example, returning two items to the inventory returns a value of `2`.' - example: 2 - x-tags: - - created - store_product_inventory_order_updated: - title: store/product/inventory/order/updated - description: |- - This webhook is triggered when a product’s inventory increases or decreases. - - Changes to the following fields trigger this event: - * Quantity - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/product/inventory/order/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "product", - "id": 167, - "inventory": { - "product_id": 167, - "method": "absolute", - "value": 2 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: Type will always be `product`. - example: product - id: - type: integer - description: ID of the product. - example: 167 - inventory: - type: object - properties: - product_id: - type: integer - description: ID of the product. - example: 167 - method: - type: string - description: |- - How the inventory was adjusted. Value will be one of the following: - * `absolute` - inventory updated using the API or the control panel. - * `relative` - inventory updated by an order. - enum: - - absolute - - relative - value: - type: integer - description: 'This value is the difference between an item’s inventory count before and after the inventory updates. This value is negative if an item’s inventory count decreases. For example, reducing inventory by three returns a value of `-3`. This value is positive if an item’s inventory count increases. For example, returning two items to the inventory returns a value of `2`.' - example: 2 - x-tags: - - created - store_shipment_wildcard: - title: store/shipment/* - description: Fires for all `store/shipment` events. - store_shipment_created: - title: store/shipment/created - description: |- - Fires when a shipment is created. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/shipment/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "shipment", - "id": 12, - "orderId": 251 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `shipment`. - example: shipment - id: - type: integer - description: ID of the shipment. - example: 12 - orderId: - type: integer - description: ID of the order. - example: 251 - x-tags: - - created - store_shipment_updated: - title: store/shipment/updated - description: |- - Fires when a shipment is updated. - - Changes to the following fields trigger this event: - * Shipping Tracking Number - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/shipment/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "shipment", - "id": 12, - "orderId": 251 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `shipment`. - example: shipment - id: - type: integer - description: ID of the shipment. - example: 12 - orderId: - type: integer - description: ID of the order. - example: 251 - x-tags: - - created - store_shipment_deleted: - title: store/shipment/deleted - description: |- - This webhook is triggered when a shipment is deleted. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/shipment/deleted", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "shipment", - "id": 12, - "orderId": 251 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `shipment`. - example: shipment - id: - type: integer - description: ID of the shipment. - example: 12 - orderId: - type: integer - description: ID of the order. - example: 251 - x-tags: - - created - store_sku_wildcard: - title: store/sku/* - description: Fires for all `store/sku` events. - store_sku_created: - title: store/sku/created - description: |- - This webhook is triggered when a new SKU is created. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/sku/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "sku", - "id": 461, - "sku": { - "product_id": 206, - "variant_id": 509 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `"sku"`. - example: sku - id: - type: integer - description: ID of the SKU. - example: 461 - sku: - type: object - properties: - product_id: - type: integer - description: ID of the product. - example: 206 - variant_id: - type: integer - description: ID of the variant. - example: 509 - x-tags: - - created - store_sku_updated: - title: store/sku/updated - description: |- - Fires when a SKU is updated. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/sku/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "sku", - "id": 461, - "sku": { - "product_id": 206, - "variant_id": 509 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `"sku"`. - example: sku - id: - type: integer - description: ID of the SKU. - example: 461 - sku: - type: object - properties: - product_id: - type: integer - description: ID of the product. - example: 206 - variant_id: - type: integer - description: ID of the variant. - example: 509 - x-tags: - - created - store_sku_deleted: - title: store/sku/deleted - description: |- - Fires when a SKU is deleted. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/sku/deleted", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "sku", - "id": 461, - "sku": { - "product_id": 206, - "variant_id": 509 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `"sku"`. - example: sku - id: - type: integer - description: ID of the SKU. - example: 461 - sku: - type: object - properties: - product_id: - type: integer - description: ID of the product. - example: 206 - variant_id: - type: integer - description: ID of the variant. - example: 509 - x-tags: - - created - store_sku_inventory_updated: - title: store/sku/inventory/updated - description: |- - Fires when a SKU is updated. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/sku/inventory/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "sku", - "id": 461, - "inventory": { - "product_id": 167, - "method": "absolute", - "value": 2, - "variant_id": 509 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `sku`. - example: sku - id: - type: integer - description: ID of the SKU. - example: 461 - inventory: - type: object - properties: - product_id: - type: integer - description: ID of the product. - example: 167 - method: - type: string - description: |- - How the inventory was adjusted. Value will be one of the following: - * `absolute` - inventory updated by an order. - * `relative` - inventory updated using the API or the control panel. - enum: - - absolute - - relative - value: - type: integer - description: 'The number of items that the inventory changed by. This can be negative if the inventory is decreased `-3` or positive if an item is returned to the inventory from an order, `2`.' - example: 2 - variant_id: - type: integer - description: ID of the variant. - example: 509 - x-tags: - - created - store_sku_inventory_order_updated: - title: store/sku/inventory/order/updated - description: |- - Fires when the inventory is updated. - - Changes to the following fields trigger this event: - * Quantity - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/sku/inventory/order/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "sku", - "id": 461, - "inventory": { - "product_id": 167, - "method": "absolute", - "value": 2, - "variant_id": 509 - } - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `sku`. - example: sku - id: - type: integer - description: ID of the SKU. - example: 461 - inventory: - type: object - properties: - product_id: - type: integer - description: ID of the product. - example: 167 - method: - type: string - description: |- - How the inventory was adjusted. Value will be one of the following: - * `absolute` - inventory updated by an order. - * `relative` - inventory updated using the API or the control panel. - enum: - - absolute - - relative - value: - type: integer - description: 'The number of items that the inventory changed by. This can be negative if the inventory is decreased `-3` or positive if an item is returned to the inventory from an order, `2`.' - example: 2 - variant_id: - type: integer - description: ID of the variant. - example: 509 - x-tags: - - created - store_app_uninstalled: - title: store/app/uninstalled - description: |- - Fires when a client store is canceled and uninstalled from the platform. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/app/uninstalled", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "store" - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `store`. - example: store - x-tags: - - created - store_information_updated: - title: store/information/updated - description: |- - Fires when changes are made to store settings. - - Changes to the following fields trigger this event: - * Store Name - * Store Address - * Store Country - * Address Type - * Email - * Phone - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/information/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "store" - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: '' - example: store - x-tags: - - created - store_subscriber_wildcard: - title: store/subscriber/* - description: Fires for all `store/subscriber` events. - store_subscriber_created: - title: store/subscriber/created - description: |- - Fires when a subscriber is created. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/subscriber/created", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "subscriber", - "id": 5 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: Will always be `subscriber` - example: subscriber - id: - type: integer - description: ID of the subscriber - example: 5 - x-tags: - - created - store_subscriber_updated: - title: store/subscriber/updated - description: |- - The webhook fires when a subscriber is updated. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/subscriber/updated", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "subscriber", - "id": 5 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `subscriber`. - example: subscriber - id: - type: integer - description: ID of the subscriber. - example: 5 - x-tags: - - created - store_subscriber_deleted: - title: store/subscriber/deleted - description: |- - This webhook is triggered when a subscriber is deleted. - - ```json filename="Example callback object" showLineNumbers - { - "created_at": 1561482670, - "store_id": "1025646", - "producer": "stores/{store_hash}", - "scope": "store/subscriber/deleted", - "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", - "data": { - "type": "subscriber", - "id": 5 - } - } - ``` - - allOf: - - $ref: '#/components/schemas/webhook_callback_base' - - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: The type will always be `subscriber`. - example: subscriber - id: - type: integer - description: ID of the subscriber. - example: 5 - x-tags: - - created - error_Full: - type: object - title: error_Full - properties: - status: - description: | - The HTTP status code. - type: integer - title: - description: | - The error title describing the particular error. - type: string - type: - description: This value is typically a link to BigCommerce API Status codes. - type: string - errorDetailed_Full: - type: object - title: errorDetailed_Full - properties: - status: - description: | - The HTTP status code. - type: integer - title: - description: | - The error title describing the particular error. - type: string - type: - description: Typically a link to BigCommerce API Status codes - type: string - errors: {} - webhook_Put: - type: object - title: webhook_Put - properties: - scope: - type: string - example: store/order/created - description: Event you subscribe to. - destination: - type: string - example: 'https://665b65a6.ngrok.io/webhooks' - description: URL must be active, return a 200 response, and be served on port 443. Custom ports arenʼt currently supported. - is_active: - type: boolean - example: true - description: Boolean value that indicates whether the webhook is active or not. - headers: - type: object - description: Headers used to validate that webhooks are active. You can pass in any number of custom headers to validate webhooks are being returned. - nullable: true - properties: {} - additionalProperties: - type: string - webhook_Base: - type: object - title: webhook_Base - properties: - scope: - type: string - example: store/order/created - description: Event you subscribe to. - destination: - type: string - example: 'https://665b65a6.ngrok.io/webhooks' - description: URL must be active, return a 200 response, and be served on port 443. Custom ports arenʼt currently supported. - is_active: - type: boolean - example: true - description: Boolean value that indicates whether the webhook is active or not. A webhook subscription becomes deactivated after 90 days of inactivity. - headers: - type: object - description: Headers used to validate that webhooks are active. You can pass in any number of custom headers to validate webhooks are being returned. - nullable: true - properties: {} - additionalProperties: - type: string - required: - - scope - - destination - webhook_Full: - allOf: - - title: webhook_Full - type: object - properties: - id: - type: integer - description: ID of the webhook. - example: 18048287 - client_id: - type: string - description: Client ID, unique to the store or app. - example: m9r6keqmo7h7f23btnpwernbez1kglkl - store_hash: - type: string - description: Permanent ID of the BigCommerce store. - example: sftg45fsd - created_at: - type: integer - example: 1561488106 - description: The time the webhook was created, represented in UNIX epoch time. - updated_at: - type: integer - example: 1561488106 - description: The time the webhook was most recently updated, represented in UNIX epoch time. - - $ref: '#/components/schemas/webhook_Base' - Pagination: - type: object - description: | - Data about the response, including pagination and collection totals. - properties: - total: - type: integer - description: Total number of returned items across all pages. - count: - type: integer - description: Number of items on current page. - per_page: - type: integer - description: Maximum number of items per page. - current_page: - type: integer - description: Current page number. - total_pages: - type: integer - description: Total number of pages. - links: - type: object - properties: - previous: - type: string - description: Link to the previous page returned in the response. - current: - type: string - description: Link to the current page returned in the response. - next: - type: string - description: Link to the next page returned in the response. - webhook_callback_base: - description: '' - title: '' - type: object - properties: - created_at: - type: integer - example: 1561488106 - description: The time the webhook was created, represented in UNIX epoch time. - readOnly: true - store_id: - type: string - minLength: 1 - example: '1025646' - description: A numerical identifier that is unique to each store. - producer: - type: string - minLength: 1 - example: 'stores/{store_hash}' - description: Will always follow the pattern `stores/store_hash`. This is the store that created the webhook. - scope: - type: string - minLength: 1 - example: store/cart/created - description: The event registered when the webhook was created. - hash: - type: string - minLength: 1 - example: 352e4afc6dd3fc85ea26bfdf3f91852604d57528 - description: The payload data encoded in JSON format and then passed through SH1 encryption. - callback_category_data: - title: callback_category_data - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - data: - type: object - description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. - properties: - type: - type: string - description: This type will always be `category`. - default: category - id: - type: integer - description: ID of the category. - example: 42 +openapi: '3.0.3' +info: + title: Webhooks v3 + version: '' + description: |- + Get notified when specific events occur on a BigCommerce store. For more information, see the [Webhooks Overview](/docs/integrations/webhooks), [Webhooks Events](/docs/integrations/webhooks/events), or [Webhooks Tutorial](/docs/integrations/webhooks/tutorial). + + In general, webhook usage follows the workflow + 1. Create a webhook for a specific scope using [Create a Webhook](#create-a-webhook) + 2. Receive event callback payload at the destination URL + 3. Respond to callback with success status `2xx` or any failure status + 1. On failure, await second callback attempt + 2. On success, move to event handling + 4. Handle event based on payload + + Callback payloads have a uniform structure, including the minimum information to uniquely identify what event occurred, on what store, with respect to what data, and at what time. The `data` object serves as the only variable data structure in the payload. + + For inventory and location events, `data` will include `location_id`, and `variant_id` or `product_id` as necessary. For all other events `data` will include `type`, `id`, and any scope-specific information (such as `couponId` for the `store/cart/couponApplied`). Scope-specific fields are outlined in the [Webhooks Events](/docs/integrations/webhooks/events). + + An example of payload structure is include below. Datatypes are outlined in the following table. + | Field | Type | Example | + | --- | --- | --- | + | `producer` | `string` | `stores/abc123` | + | `hash` | `string` | `dd70c0976e06b67aaf671e73f49dcb79230ebf9d` | + | `created_at` | `integer` | `1561479335` | + | `store_id` | `string` | `1025646` | + | `scope` | `string` | `store/order/created` | + | `data` | `object` | variable | + | `data.type` | `string` | `product` | + | `data.id` | `integer` | `223`| + + ```json filename="Example callback structure" copy + { + "producer": "stores/" + "hash": , + "created_at": , + "store_id": , + "scope": , + "data": { + + }, + } + ``` + termsOfService: 'https://www.bigcommerce.com/terms' + contact: + email: support@bigcommerce.com + name: BigCommerce + url: 'https://www.bigcommerce.com' +tags: + - name: Manage Webhooks (Single) + - name: Manage Webhooks (Bulk) + - name: Webhooks Admin +security: + - X-Auth-Token: [] +servers: + - url: 'https://api.bigcommerce.com/stores/{store_hash}/v3' + variables: + store_hash: + default: store_hash + description: Permanent ID of the BigCommerce store. + description: BigCommerce API Gateway +paths: + '/hooks': + post: + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/webhook_Full' + meta: {} + links: + getHook: + operationId: getWebhook + parameters: + webhook_id: $response.body#/id + '400': + $ref: '#/components/responses/400_BadRequest' + '401': + $ref: '#/components/responses/401_Unauthorized' + '422': + $ref: '#/components/responses/422_UnprocessableEntity' + summary: Create a Webhook + description: Creates a webhook. Only one webhook at a time can be created. Custom headers can be added. Destination URL must be served on port 443 (custom ports are not currently supported). + operationId: createWebhooks + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Type' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/webhook_Base' + tags: + - Manage Webhooks (Single) + get: + responses: + '200': + $ref: '#/components/responses/webhooks_Resp' + '401': + $ref: '#/components/responses/401_Unauthorized' + summary: Get Webhooks + description: |- + Returns a list of all webhooks on a store associated to the `client_id` used to authenticate the request. + + *Note: BigCommerce determines the `client_id` from the `access_token`.* + operationId: getWebhooks + tags: + - Manage Webhooks (Bulk) + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/FilterPageParam' + - $ref: '#/components/parameters/FilterLimitParam' + - $ref: '#/components/parameters/IsActive' + - $ref: '#/components/parameters/FilterByScope' + - $ref: '#/components/parameters/FilterByDestination' + '/hooks/{webhook_id}': + get: + responses: + '200': + $ref: '#/components/responses/webhook_Resp' + '401': + $ref: '#/components/responses/401_Unauthorized' + '404': + $ref: '#/components/responses/404_NotFound' + description: Return a webhook by ID. + operationId: getWebhook + summary: Get a Webhook + tags: + - Manage Webhooks (Single) + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Type' + parameters: + - $ref: '#/components/parameters/WebhookId' + put: + responses: + '200': + $ref: '#/components/responses/webhook_Resp' + summary: Update a Webhook + description: Updates a webhook. You can add custom headers. At least one field is required to perform an update. + operationId: updateWebhook + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Type' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/webhook_Put' + tags: + - Manage Webhooks (Single) + delete: + responses: + '200': + $ref: '#/components/responses/webhook_Resp' + summary: Delete a Webhook + description: Deletes a webhook. Only one webhook at a time can be deleted. When a webhook is deleted, it is returned in the response as a 200 OK. + operationId: deleteWebhook + tags: + - Manage Webhooks (Single) + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Type' + '/hooks/admin': + get: + operationId: getHooksAdmin + summary: Get Admin Info + description: List all notification emails, webhooks, and denylisted domains associated with the API account. + parameters: + - $ref: '#/components/parameters/IsActive' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + emails: + description: Email addresses to be sent notifications. + type: array + items: + type: string + format: email + example: 'webhooks@example.com' + hooks_list: + description: 'List of all the webhooks associated with the provider API account, filtered by the `active` parameter.' + type: array + items: + type: object + properties: + id: + type: integer + description: ID of the webhook + client_id: + type: string + minLength: 1 + description: Client ID, unique to the store or app. + store_hash: + minLength: 1 + type: string + description: Permanent ID of the BigCommerce store. + scope: + type: string + minLength: 1 + description: Event you subscribe to + example: store/order/created + destination: + type: string + minLength: 1 + description: URL must be active, return a 200 response, and be served on port 443. Custom ports arenʼt currently supported. + headers: + type: object + description: You can pass in any number of custom headers to validate webhooks being returned. + properties: {} + nullable: true + additionalProperties: + type: string + is_active: + type: boolean + description: If the webhook is active or not. A webhook subscription becomes deactivated after 90 days of inactivity. + default: true + created_at: + type: integer + example: 1561488106 + description: The time the webhook was created, represented in UNIX epoch time. + updated_at: + type: integer + example: 1561488106 + description: The time the webhook was most recently updated, represented in UNIX epoch time. + status: + type: string + description: The webhook status. + enum: + - inactive + - active + - deactivated + blocked_domains: + description: List of domains (destinations) that are currently on the denylist and are not being sent webhooks. + type: array + items: + type: object + properties: + destination: + description: Domain URL to which webhooks are sent. + type: string + format: url + time_left: + description: Remaining time in seconds that the domain is on the denylist. + type: integer + reasons: + type: array + items: + type: object + properties: + failure_description: + type: string + count: + type: integer + timestamp: + type: integer + format: int64 + description: UTC timestamp in seconds that the events was created + meta: + type: object + properties: + pagination: + $ref: '#/components/schemas/Pagination' + examples: {} + '401': + $ref: '#/components/responses/401_Unauthorized' + tags: + - Webhooks Admin + put: + operationId: updateHooksAdmin + summary: Upsert Email Notifications + description: | + Update email addresses that are sent notification emails when any domain associated with the API account is denylisted or when a webhook is deactivated. Supports `upsert` functionality in the case that no email address exists yet. + requestBody: + description: List of notification emails. + content: + application/json: + schema: + type: object + properties: + emails: + type: array + items: + type: string + format: email + example: 'webhooks@example.com' + examples: + Example: + value: + emails: + - user@example.com + required: true + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/400_BadRequest' + '401': + $ref: '#/components/responses/401_Unauthorized' + '422': + $ref: '#/components/responses/422_UnprocessableEntity' + tags: + - Webhooks Admin +components: + parameters: + WebhookId: + name: webhook_id + in: path + description: The ID of a Webhook. + required: true + schema: + type: integer + minimum: 1 + example: 22561593 + IsActive: + name: is_active + in: query + description: | + Enables user to filter for webhooks that are active or not. A webhook subscription becomes deactivated after 90 days of inactivity. + schema: + type: boolean + example: true + FilterByScope: + name: scope + in: query + description: | + Enables user to filter for webhooks by scope. + schema: + type: string + FilterByDestination: + name: destination + in: query + description: | + Enables user to filter for webhooks by destination. + schema: + type: string + FilterPageParam: + name: page + in: query + description: | + Page number. + required: false + schema: + type: integer + example: 1 + FilterLimitParam: + name: limit + in: query + description: | + Items count per page. + required: false + schema: + type: integer + Accept: + in: header + name: Accept + schema: + type: string + default: application/json + Content-Type: + name: Content-Type + in: header + schema: + type: string + default: application/json + responses: + webhooks_Resp: + description: '' + content: + application/json: + schema: + description: '' + type: object + properties: + data: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + id: + type: integer + client_id: + type: string + minLength: 1 + store_hash: + type: string + minLength: 1 + scope: + type: string + minLength: 1 + destination: + type: string + minLength: 1 + headers: + type: object + properties: {} + nullable: true + additionalProperties: + type: string + is_active: + type: boolean + created_at: + type: integer + description: The time the webhook was created, represented in UNIX epoch time. + updated_at: + type: integer + description: The time the webhook was most recently updated, represented in UNIX epoch time. + meta: + type: object + properties: + pagination: + $ref: '#/components/schemas/Pagination' + examples: {} + 502_GatewayError: + description: If something happens during the request that causes it to fail, a 502 response will be returned. A new request should be made; however, it could fail. + content: + application/json: + schema: + $ref: '#/components/schemas/error_Full' + examples: + response: + value: + status: 502 + title: A login URL could not be generated. Please try another request. + type: /api-docs/getting-started/api-status-codes + 503_ServiceUnavailable: + description: 'If this occurs, you should retry the request. If you are unable to successfully make a request, please check the BigCommerce [system status](https://status.bigcommerce.com/). A service is likely down and the request will need to be made again when it is back up (in several hours usually)' + content: + application/json: + schema: + $ref: '#/components/schemas/error_Full' + examples: + response: + value: + status: 503 + title: Service Unavailable + type: /api-docs/getting-started/api-status-codes + 504_GatewayTimeout: + description: 'If this occurs, you should retry the request. Typically retrying the request several times will result in a successful request; However, if you are unable to successfully make a request, please check the BigCommerce [system status](https://status.bigcommerce.com/). A service is likely down and the request will need to be made again when it is back up (in several hours usually)' + content: + application/json: + schema: + $ref: '#/components/schemas/errorDetailed_Full' + examples: + response: + value: + status: 504 + title: Gateway Timeout + type: /api-docs/getting-started/api-status-codes + errors: {} + 400_BadRequest: + description: |- + Malformed request syntax. Typically need to fix the JSON request body to resend successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/error_Full' + examples: + response: + value: + status: 400 + title: Input is invalid. + type: /api-docs/getting-started/api-status-codes + 401_Unauthorized: + description: Unauthorized - the v3 Auth client ID or token in the request are not a valid combination for this store. + content: + application/json: + schema: + $ref: '#/components/schemas/error_Full' + examples: + response: + value: + status: 401 + title: Unauthorized - the v3 Auth client ID or token in the request are not a valid combination for this store. + type: /api-docs/getting-started/api-status-codes + 403_Unauthorized: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/error_Full' + examples: + response: + value: + status: 403 + title: Unauthorized Access. You do not have permission to make this request. + type: /api-docs/getting-started/api-status-codes + 404_NotFound: + description: If the requested webhook is not found, return a 404 Not Found. + content: + application/json: + schema: + $ref: '#/components/schemas/error_Full' + examples: + response: + value: + status: 404 + title: 'Webhook with id [{webhook_id}] not found' + type: /api-docs/getting-started/api-status-codes + 422_UnprocessableEntity: + description: This occurs when missing or unacceptable data is passed for one or more fields. Please correct the values for the fields listed in the errors object. + content: + application/json: + schema: + $ref: '#/components/schemas/errorDetailed_Full' + examples: + response: + value: + status: 422 + title: JSON data is missing or invalid + type: /api-docs/getting-started/api-status-codes + errors: + destination: error.path.missing. + webhook_Resp: + description: Example response + content: + application/json: + schema: + description: '' + type: object + properties: + data: + type: object + properties: + id: + type: integer + client_id: + type: string + minLength: 1 + store_hash: + type: string + minLength: 1 + scope: + type: string + minLength: 1 + destination: + type: string + minLength: 1 + headers: + type: object + properties: {} + nullable: true + additionalProperties: + type: string + is_active: + type: boolean + created_at: + type: integer + description: The time the webhook was created, represented in UNIX epoch time. + updated_at: + type: integer + description: The time the webhook was most recently updated, represented in UNIX epoch time. + meta: {} + examples: + application/json: + value: + data: + id: 18048287 + client_id: m9r6keqmo7h7f23btnpwernbez1kglkl + store_hash: sftg45fsd + created_at: 1561488106 + updated_at: 1561488106 + scope: store/order/created + destination: 'https://665b65a6.ngrok.io/webhooks' + is_active: true + headers: + 'custom-key': developer-defined value + meta: {} + securitySchemes: + X-Auth-Token: + name: X-Auth-Token + description: |- + ### OAuth scopes + + None required. Create and manage webhooks with the default scope of an API account. + + ### Authentication header + + | Header | Argument | Description | + |:-------|:---------|:------------| + | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). | + + ### Further reading + + For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests). + + For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes). + + For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes). + type: apiKey + in: header + schemas: + store_cart_wildcard: + description: |- + Fires for each of the following events: + * `store/cart/created` + * `store/cart/updated` + * `store/cart/deleted` + * `store/cart/couponApplied` + * `store/cart/abandoned` + * `store/cart/converted` + * `store/cart/lineItem` + + See individual events for more information. + title: store/cart/* + store_cart_created: + description: |- + This webhook fires on new cart creation when any of the following occur: + * a storefront shopper adds their first product to a cart during a new session + * an application makes a successful `POST` request to `/carts` using either the [REST Storefront](/docs/rest-storefront/carts#create-a-cart) API or the [REST Management](/docs/rest-management/carts/carts-single#create-a-cart) API + * a storefront makes a successful call to create a cart using the [GraphQL Storefront API](/docs/storefront/cart-checkout/guide/graphql-storefront) + + Cart creation also fires the `store/cart/updated` webhook. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/cart/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "cart", + "id": "09346904-4175-44fd-be53-f7e598531b6c" + } + } + ``` + title: store/cart/created + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. + properties: + type: + type: string + description: can be `cart` or `cart_line_item` + example: cart + enum: + - cart + - cart_line_item + id: + type: string + description: ID of the cart + example: 09346904-4175-44fd-be53-f7e598531b6c + x-tags: + - created + store_cart_updated: + title: store/cart/updated + description: |- + Fires when one of the following occurs: + * A cartʼs line items are modified by adding a new item to a cart, updating an existing itemʼs quantity, or deleting an item. + * A shopper enters or changes their email address during guest checkout. This includes signing in to a customer account after creating a guest cart, which associates the accountʼs email address with the cart. + + The `store/cart/created` webhook firing also triggers this webhook because adding a product to an empty cart is considered an update. + + Changes to the following fields trigger this event: + * Quantity + * Item Price + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/cart/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "cart", + "id": "09346904-4175-44fd-be53-f7e598531b6c" + } + } + ``` + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. + properties: + type: + type: string + description: can be `cart` or `cart_line_item` + example: cart + id: + type: string + description: ID of the cart + example: 09346904-4175-44fd-be53-f7e598531b6c + x-tags: + - created + store_cart_deleted: + title: store/cart/deleted + description: |- + Fires when a cart is deleted. Carts are deleted in two ways; when all items are removed from a cart, and when an API consumer explicitly removes the cart using a `DELETE` request. Cart deletion ends the cart lifecycle. The `store/cart/updated` webhook also fires when the last item is removed. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/cart/deleted", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "cart", + "id": "09346904-4175-44fd-be53-f7e598531b6c" + } + } + ``` + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. + properties: + type: + type: string + description: can be `cart` or `cart_line_item` + example: cart + id: + type: string + description: ID of the cart + example: 09346904-4175-44fd-be53-f7e598531b6c + x-tags: + - deleted + store_cart_couponApplied: + title: store/cart/couponApplied + description: |- + Fires when a new coupon code is applied to a cart. The webhook request body includes the ID of the coupon code. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/cart/couponApplied", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "cart", + "id": "09346904-4175-44fd-be53-f7e598531b6c", + "couponId": 1 + } + } + ``` + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: can be `cart` or `cart_line_item` + example: cart + id: + type: string + description: ID of the cart + example: 09346904-4175-44fd-be53-f7e598531b6c + couponId: + type: integer + description: ID of the coupon + example: 1 + x-tags: + - created + store_cart_abandoned: + title: store/cart/abandoned + description: |- + This webhook fires after a cart is abandoned. BigCommerce considers a cart abandoned when it has no activity for at least one hour. This webhook is available for all store plans, regardless of whether the Abandoned Cart Saver feature is enabled. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/cart/abandoned", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "cart", + "id": "09346904-4175-44fd-be53-f7e598531b6c", + "token": "1eed6d2d979776ff18e695ceeb10ea61" + } + } + ``` + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: can be `cart` or `cart_line_item` + example: cart + id: + type: string + description: ID of the cart + example: 09346904-4175-44fd-be53-f7e598531b6c + token: + type: string + example: 1eed6d2d979776ff18e695ceeb10ea61 + description: Use this token to obtain cart data. + store_cart_converted: + title: store/cart/converted + description: |- + Fires when a cart/checkout is converted into an order, which is typically after the checkout payment step on the storefront. At this point, the cart is automatically deleted and no longer accessible. This webhook returns both the cart/checkout ID and order ID for correlation purposes. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/cart/converted", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "cart", + "id": "09346904-4175-44fd-be53-f7e598531b6c", + "orderId": 252 + } + } + ``` + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `cart`. + default: cart + id: + type: string + description: ID of the cart + example: 09346904-4175-44fd-be53-f7e598531b6c + orderId: + type: integer + description: ID of the order created. + example: 252 + x-tags: + - created + store_cart_lineItem_wildcard: + title: store/cart/lineItem/* + description: |- + This webhook subscribes to all cart line item events. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/cart/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "cart", + "id": "09346904-4175-44fd-be53-f7e598531b6c", + "cartId": "b0386708-fef3-45de-9d8b-fbe3031450a4" + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: Can be `cart` or `cart_line_item`. + id: + type: string + description: ID of the cart. + cartId: + type: string + description: ID of the cart. + x-tags: + - created + store_cart_lineItem_created: + title: store/cart/lineItem/created + description: |- + Fires when a new item is added to the cart. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/cart/lineItem/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "cart", + "id": "09346904-4175-44fd-be53-f7e598531b6c", + "cartId": "b0386708-fef3-45de-9d8b-fbe3031450a4" + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: can be `cart` or `cart_line_item` + example: cart + id: + type: string + description: ID of the line item + example: 09346904-4175-44fd-be53-f7e598531b6c + cartId: + type: string + description: ID of the cart + example: b0386708-fef3-45de-9d8b-fbe3031450a4 + x-tags: + - created + store_cart_lineItem_updated: + title: store/cart/lineItem/updated + description: |- + Fires when an item’s quantity has changed or the product options change. + + Changes to the following fields trigger this event: + * Quantity + * Item Price + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/cart/lineItem/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "cart", + "id": "09346904-4175-44fd-be53-f7e598531b6c", + "cartId": "b0386708-fef3-45de-9d8b-fbe3031450a4" + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: can be `cart` or `cart_line_item` + example: cart + id: + type: string + description: ID of the line item + example: 09346904-4175-44fd-be53-f7e598531b6c + cartId: + type: string + description: ID of the cart + example: b0386708-fef3-45de-9d8b-fbe3031450a4 + x-tags: + - updated + store_cart_lineItem_deleted: + title: store/cart/lineItem/deleted + description: |- + Fires when an item is deleted from the cart. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/cart/lineItem/deleted", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "cart", + "id": "09346904-4175-44fd-be53-f7e598531b6c", + "cartId": "b0386708-fef3-45de-9d8b-fbe3031450a4" + } + } + ``` + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: Can be `cart` or `cart_line_item`. + example: cart + id: + type: string + description: ID of the line item. + example: 09346904-4175-44fd-be53-f7e598531b6c + cartId: + type: string + description: ID of the cart. + example: b0386708-fef3-45de-9d8b-fbe3031450a4 + x-tags: + - deleted + store_category_wildcard: + title: store/category/* + description: | + Fires for all `store/category` events. + x-tags: + - created + store_category_created: + title: store/category/created + description: |- + Fires when a category is created. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/category/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "category", + "id": 42 + } + } + ``` + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - $ref: '#/components/schemas/callback_category_data' + x-tags: + - created + store_category_updated: + title: store/category/updated + description: |- + Fires when a category is updated. + + Changes to the following fields trigger this event: + * URL + * Name + * Redirect Old URLs + * Description + * Parent Category + * Template Layout File + * Sort Order + * Default Product Sort + * Category Image + * Page Title + * Meta Keywords + * Meta Description + * Search Keywords + * Google Product Category + * Enable Google Shopping + + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/category/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "category", + "id": 42 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `category`. + default: category + id: + type: integer + description: ID of the category + example: 42 + x-tags: + - updated + store_category_deleted: + title: store/category/deleted + description: |- + Fires when a category is deleted. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/category/deleted", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "category", + "id": "42" + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `category`. + default: category + example: category + id: + type: integer + description: ID of the category + example: 42 + x-tags: + - deleted + store_channel_wildcard: + title: store/channel/* + description: Fires for all `store/channel` events. + x-tags: + - created + store_channel_created: + title: store/channel/created + description: |- + Fires when a channel is created in the control panel or by API. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/channel/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "channel", + "id": 173331 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `channel`. + default: channel + example: channel + readOnly: true + id: + type: integer + description: ID of the channel + example: 173331 + x-tags: + - created + store_channel_updated: + title: store/channel/updated + description: |- + This webhook is triggered when a channel is updated in the control panel or by API. + + Changes to the following fields trigger this event: + * name + * external_id + * status + * is_listable_from_ui + * is_visible + + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/channel/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "channel", + "id": 173331 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `channel`. + default: channel + example: channel + readOnly: true + id: + type: integer + description: ID of the channel + example: 173331 + x-tags: + - created + store_customer_wildcard: + title: store/customer/* + description: | + Fires for all `store/customer` events. + x-tags: + - created + store_customer_created: + title: store/customer/created + description: |- + Fires when a new customer is created. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/customer/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "customer", + "id": 32 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `customer`. + default: customer + example: customer + readOnly: true + id: + type: integer + description: ID of the customer + example: 32 + x-tags: + - created + store_customer_updated: + title: store/customer/updated + description: |- + This webhook is triggered when a customer is updated. In addition, this webhook is triggered when a shopper initially enters custom form field values within the account sign-up form. Please note that neither changing existing data in customer form fields nor changing a customerʼs address will trigger the webhook. + + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/customer/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "customer", + "id": 32 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `customer`. + default: customer + example: customer + readOnly: true + id: + type: integer + description: ID of the customer + example: 32 + x-tags: + - created + store_customer_deleted: + title: store/customer/deleted + description: |- + This webhook is triggered when a customer is deleted. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/customer/deleted", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "customer", + "id": 32 + } + } + ``` + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `customer`. + default: customer + example: customer + readOnly: true + id: + type: integer + description: ID of the customer. + example: 32 + x-tags: + - created + store_customer_address_updated: + title: store/customer/address/updated + description: |- + Fires when a customer address is updated. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/customer/address/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "customer", + "id": 60, + "address": { + "customer_id": 32 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `customer`. + example: customer + id: + type: integer + description: ID of the customer address. + example: 60 + address: + type: object + properties: + customer_id: + type: integer + description: ID of the customer. + example: 32 + x-tags: + - created + store_customer_address_created: + title: store/customer/address/created + description: |- + Fires when a customer address is created. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/customer/address/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "customer", + "id": 60, + "address": { + "customer_id": 32 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `customer`. + example: customer + id: + type: integer + description: ID of the customer address. + example: 60 + address: + type: object + properties: + customer_id: + type: integer + description: ID of the customer. + example: 32 + x-tags: + - created + store_customer_address_deleted: + title: store/customer/address/deleted + description: |- + Fires when a customer address is deleted. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/customer/address/deleted", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "customer", + "id": 60, + "address": { + "customer_id": 32 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `customer`. + example: customer + id: + type: integer + description: ID of the customer address. + example: 60 + address: + type: object + properties: + customer_id: + type: integer + description: ID of the customer. + example: 32 + x-tags: + - created + store_customer_payment_instrument_default_updated: + title: store/customer/payment/instrument/default/updated + description: |- + Fires when a customer default payment instrument is updated. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/customer/payment/instrument/default/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "customer", + "id": 32 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: can be `cart` or `cart_line_item` + default: '"customer"' + example: '"customer"' + readOnly: true + id: + type: integer + description: ID of the customer. + example: 32 + x-tags: + - created + store_order_wildcard: + title: store/order/* + description: Fires for all `store/order` events. + store_order_created: + title: store/order/created + description: |- + This webhook is triggered when an order is created in the control panel, using an app, or by API. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/order/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "order", + "id": 250 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `order`. + default: order + example: order + id: + type: integer + description: ID of the order. + example: 250 + x-tags: + - created + store_order_updated: + title: store/order/updated + description: |- + Fires when a previously-created order is updated. + + Changes to the following fields trigger this event: + * Status + * Coupon Code + * Billing and Shipping Address + * Product Type + * Search Keywords + * Related Products + * Warranty Information + * Page Title + * Meta Description + * Gift Wrapping options + * Bin Picking Number (BPN) + * Fixed Shipping Price + * Free Shipping + * Open Graph Sharing Type + * Availability Text + * Purchasability + * Release Date + * Remove pre-order status on this date + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/order/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "order", + "id": 250 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `order`. + default: order + example: order + id: + type: integer + description: ID of the order. + example: 250 + x-tags: + - created + store_order_archived: + title: store/order/archived + description: |- + Fires when an order is archived. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/order/archived", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "order", + "id": 250 + } + } + ``` + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `order`. + default: order + example: order + id: + type: integer + description: ID of the order. + example: 250 + x-tags: + - created + store_order_statusUpdated: + title: store/order/statusUpdated + description: |- + This webhook is triggered when an order status changes; for example, from `Pending` to `Awaiting Payment`. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/order/statusUpdated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "order", + "id": 250, + "status": { + "previous_status_id": 1, + "new_status_id": 11 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `order`. + example: order + id: + type: integer + description: ID of the order. + example: 250 + status: + type: object + properties: + previous_status_id: + type: integer + description: ID of the previous status. + example: 1 + new_status_id: + type: integer + description: ID of the updated status. + example: 11 + x-tags: + - created + store_order_message_created: + title: store/order/message/created + description: |- + This webhook is triggered when an order message is created by a customer or in the control panel. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/order/message/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "order", + "id": 250, + "message": { + "order_message_id": 3 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `order`. + example: order + id: + type: integer + description: ID of the order. + example: 250 + message: + type: object + properties: + order_message_id: + type: integer + description: ID of the message on the order. + example: 3 + x-tags: + - created + store_order_refund_created: + title: store/order/refund/created + description: |- + This webhook is triggered when a refund is submitted against an order. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/order/refund/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "order", + "id": 250, + "refund": { + "refund_id": 3 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `order`. + example: order + id: + type: integer + description: ID of the order. + example: 250 + refund: + type: object + properties: + refund_id: + type: integer + description: ID of the refund submitted against the order. + example: 3 + x-tags: + - created + store_product_wildcard: + title: store/product/* + description: Fires for all `store/product` events. + store_product_deleted: + title: store/product/deleted + description: |- + This webhook is triggered when a product is deleted. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/product/deleted", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "product", + "id": 205 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type ill always be `product`. + default: product + example: product + id: + type: integer + description: ID of the product. + example: 205 + x-tags: + - created + store_product_created: + title: store/product/created + description: |- + Fires when a new product is created. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/product/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "product", + "id": 205 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `product`. + default: product + example: product + id: + type: integer + description: ID of the product. + example: 205 + x-tags: + - created + store_product_updated: + title: store/product/updated + description: |- + Fires when product details are edited. + + Changes to the following fields trigger this event: + * Product Type + * Search Keywords + * Related Products + * Warranty Information + * Page Title + * Meta Description + * Gift Wrapping options + * Bin Picking Number (BPN) + * Fixed Shipping Price + * Free Shipping + * Open Graph Sharing Type + * Availability Text + * Purchasability + * Release Date + * Remove pre-order status on this date + * Preorder Message + * Inventory Stock + * Inventory Low Stock + * Track inventory + * Product UPC/EAN + * SKU + * Cost + * Tax Class + * Weight + * Width + * Height + * Depth + * Condition + * Show condition on storefront + * Brand + * Default Price + * Sale Price + * MSRP + * Product Name + * Description + * Visible on Storefront + * Sort Order + * Categories + * Product URL + * Set as a Featured Product on my Storefront + + However, changes to the following fields donʼt trigger this event: + + * Manufacturer Part Number (MPN) + * Global Trade Number (GTN) + * Tax Provider Tax Code + * Product Image + * Product Image Description + * Product Files + * Customs Information + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/product/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "product", + "id": 205 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type ill always be `product`. + default: product + example: product + id: + type: integer + description: ID of the product. + example: 205 + x-tags: + - created + store_product_inventory_updated: + title: store/product/inventory/updated + description: |- + This webhook is triggered when product inventory is updated. + + Changes to the following fields trigger this event: + * Inventory Stock + + However, changes to the following fields donʼt trigger this event: + * Track Inventory + * Inventory Low Stock + + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/product/inventory/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "product", + "id": 167, + "inventory": { + "product_id": 167, + "method": "absolute", + "value": 2 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `product`. + example: product + id: + type: integer + description: ID of the product. + example: 167 + inventory: + type: object + properties: + product_id: + type: integer + description: ID of the product. + example: 167 + method: + type: string + description: |- + How the inventory was adjusted. Value will be one of the following: + * `absolute` - inventory updated through the API or the control panel. + * `relative` - inventory updated by an order. + enum: + - absolute + - relative + value: + type: integer + description: 'This value is the difference between an item’s inventory count before and after the inventory updates. This value is negative if an item’s inventory count decreases. For example, reducing inventory by three returns a value of `-3`. This value is positive if an item’s inventory count increases. For example, returning two items to the inventory returns a value of `2`.' + example: 2 + x-tags: + - created + store_product_inventory_order_updated: + title: store/product/inventory/order/updated + description: |- + This webhook is triggered when a product’s inventory increases or decreases. + + Changes to the following fields trigger this event: + * Quantity + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/product/inventory/order/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "product", + "id": 167, + "inventory": { + "product_id": 167, + "method": "absolute", + "value": 2 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: Type will always be `product`. + example: product + id: + type: integer + description: ID of the product. + example: 167 + inventory: + type: object + properties: + product_id: + type: integer + description: ID of the product. + example: 167 + method: + type: string + description: |- + How the inventory was adjusted. Value will be one of the following: + * `absolute` - inventory updated using the API or the control panel. + * `relative` - inventory updated by an order. + enum: + - absolute + - relative + value: + type: integer + description: 'This value is the difference between an item’s inventory count before and after the inventory updates. This value is negative if an item’s inventory count decreases. For example, reducing inventory by three returns a value of `-3`. This value is positive if an item’s inventory count increases. For example, returning two items to the inventory returns a value of `2`.' + example: 2 + x-tags: + - created + store_shipment_wildcard: + title: store/shipment/* + description: Fires for all `store/shipment` events. + store_shipment_created: + title: store/shipment/created + description: |- + Fires when a shipment is created. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/shipment/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "shipment", + "id": 12, + "orderId": 251 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `shipment`. + example: shipment + id: + type: integer + description: ID of the shipment. + example: 12 + orderId: + type: integer + description: ID of the order. + example: 251 + x-tags: + - created + store_shipment_updated: + title: store/shipment/updated + description: |- + Fires when a shipment is updated. + + Changes to the following fields trigger this event: + * Shipping Tracking Number + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/shipment/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "shipment", + "id": 12, + "orderId": 251 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `shipment`. + example: shipment + id: + type: integer + description: ID of the shipment. + example: 12 + orderId: + type: integer + description: ID of the order. + example: 251 + x-tags: + - created + store_shipment_deleted: + title: store/shipment/deleted + description: |- + This webhook is triggered when a shipment is deleted. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/shipment/deleted", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "shipment", + "id": 12, + "orderId": 251 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `shipment`. + example: shipment + id: + type: integer + description: ID of the shipment. + example: 12 + orderId: + type: integer + description: ID of the order. + example: 251 + x-tags: + - created + store_sku_wildcard: + title: store/sku/* + description: Fires for all `store/sku` events. + store_sku_created: + title: store/sku/created + description: |- + This webhook is triggered when a new SKU is created. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/sku/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "sku", + "id": 461, + "sku": { + "product_id": 206, + "variant_id": 509 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `"sku"`. + example: sku + id: + type: integer + description: ID of the SKU. + example: 461 + sku: + type: object + properties: + product_id: + type: integer + description: ID of the product. + example: 206 + variant_id: + type: integer + description: ID of the variant. + example: 509 + x-tags: + - created + store_sku_updated: + title: store/sku/updated + description: |- + Fires when a SKU is updated. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/sku/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "sku", + "id": 461, + "sku": { + "product_id": 206, + "variant_id": 509 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `"sku"`. + example: sku + id: + type: integer + description: ID of the SKU. + example: 461 + sku: + type: object + properties: + product_id: + type: integer + description: ID of the product. + example: 206 + variant_id: + type: integer + description: ID of the variant. + example: 509 + x-tags: + - created + store_sku_deleted: + title: store/sku/deleted + description: |- + Fires when a SKU is deleted. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/sku/deleted", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "sku", + "id": 461, + "sku": { + "product_id": 206, + "variant_id": 509 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `"sku"`. + example: sku + id: + type: integer + description: ID of the SKU. + example: 461 + sku: + type: object + properties: + product_id: + type: integer + description: ID of the product. + example: 206 + variant_id: + type: integer + description: ID of the variant. + example: 509 + x-tags: + - created + store_sku_inventory_updated: + title: store/sku/inventory/updated + description: |- + Fires when a SKU is updated. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/sku/inventory/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "sku", + "id": 461, + "inventory": { + "product_id": 167, + "method": "absolute", + "value": 2, + "variant_id": 509 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `sku`. + example: sku + id: + type: integer + description: ID of the SKU. + example: 461 + inventory: + type: object + properties: + product_id: + type: integer + description: ID of the product. + example: 167 + method: + type: string + description: |- + How the inventory was adjusted. Value will be one of the following: + * `absolute` - inventory updated by an order. + * `relative` - inventory updated using the API or the control panel. + enum: + - absolute + - relative + value: + type: integer + description: 'The number of items that the inventory changed by. This can be negative if the inventory is decreased `-3` or positive if an item is returned to the inventory from an order, `2`.' + example: 2 + variant_id: + type: integer + description: ID of the variant. + example: 509 + x-tags: + - created + store_sku_inventory_order_updated: + title: store/sku/inventory/order/updated + description: |- + Fires when the inventory is updated. + + Changes to the following fields trigger this event: + * Quantity + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/sku/inventory/order/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "sku", + "id": 461, + "inventory": { + "product_id": 167, + "method": "absolute", + "value": 2, + "variant_id": 509 + } + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `sku`. + example: sku + id: + type: integer + description: ID of the SKU. + example: 461 + inventory: + type: object + properties: + product_id: + type: integer + description: ID of the product. + example: 167 + method: + type: string + description: |- + How the inventory was adjusted. Value will be one of the following: + * `absolute` - inventory updated by an order. + * `relative` - inventory updated using the API or the control panel. + enum: + - absolute + - relative + value: + type: integer + description: 'The number of items that the inventory changed by. This can be negative if the inventory is decreased `-3` or positive if an item is returned to the inventory from an order, `2`.' + example: 2 + variant_id: + type: integer + description: ID of the variant. + example: 509 + x-tags: + - created + store_app_uninstalled: + title: store/app/uninstalled + description: |- + Fires when a client store is canceled and uninstalled from the platform. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/app/uninstalled", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "store" + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `store`. + example: store + x-tags: + - created + store_information_updated: + title: store/information/updated + description: |- + Fires when changes are made to store settings. + + Changes to the following fields trigger this event: + * Store Name + * Store Address + * Store Country + * Address Type + * Email + * Phone + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/information/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "store" + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: '' + example: store + x-tags: + - created + store_subscriber_wildcard: + title: store/subscriber/* + description: Fires for all `store/subscriber` events. + store_subscriber_created: + title: store/subscriber/created + description: |- + Fires when a subscriber is created. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/subscriber/created", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "subscriber", + "id": 5 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: Will always be `subscriber` + example: subscriber + id: + type: integer + description: ID of the subscriber + example: 5 + x-tags: + - created + store_subscriber_updated: + title: store/subscriber/updated + description: |- + The webhook fires when a subscriber is updated. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/subscriber/updated", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "subscriber", + "id": 5 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `subscriber`. + example: subscriber + id: + type: integer + description: ID of the subscriber. + example: 5 + x-tags: + - created + store_subscriber_deleted: + title: store/subscriber/deleted + description: |- + This webhook is triggered when a subscriber is deleted. + + ```json filename="Example callback object" showLineNumbers + { + "created_at": 1561482670, + "store_id": "1025646", + "producer": "stores/{store_hash}", + "scope": "store/subscriber/deleted", + "hash": "352e4afc6dd3fc85ea26bfdf3f91852604d57528", + "data": { + "type": "subscriber", + "id": 5 + } + } + ``` + + allOf: + - $ref: '#/components/schemas/webhook_callback_base' + - type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: The type will always be `subscriber`. + example: subscriber + id: + type: integer + description: ID of the subscriber. + example: 5 + x-tags: + - created + error_Full: + type: object + title: error_Full + properties: + status: + description: | + The HTTP status code. + type: integer + title: + description: | + The error title describing the particular error. + type: string + type: + description: This value is typically a link to BigCommerce API Status codes. + type: string + errorDetailed_Full: + type: object + title: errorDetailed_Full + properties: + status: + description: | + The HTTP status code. + type: integer + title: + description: | + The error title describing the particular error. + type: string + type: + description: Typically a link to BigCommerce API Status codes + type: string + errors: {} + webhook_Put: + type: object + title: webhook_Put + properties: + scope: + type: string + example: store/order/created + description: Event you subscribe to. + destination: + type: string + example: 'https://665b65a6.ngrok.io/webhooks' + description: URL must be active, return a 200 response, and be served on port 443. Custom ports arenʼt currently supported. + is_active: + type: boolean + example: true + description: Boolean value that indicates whether the webhook is active or not. + headers: + type: object + description: Headers used to validate that webhooks are active. You can pass in any number of custom headers to validate webhooks are being returned. + nullable: true + properties: {} + additionalProperties: + type: string + webhook_Base: + type: object + title: webhook_Base + properties: + scope: + type: string + example: store/order/created + description: Event you subscribe to. + destination: + type: string + example: 'https://665b65a6.ngrok.io/webhooks' + description: URL must be active, return a 200 response, and be served on port 443. Custom ports arenʼt currently supported. + is_active: + type: boolean + example: true + description: Boolean value that indicates whether the webhook is active or not. A webhook subscription becomes deactivated after 90 days of inactivity. + headers: + type: object + description: Headers used to validate that webhooks are active. You can pass in any number of custom headers to validate webhooks are being returned. + nullable: true + properties: {} + additionalProperties: + type: string + required: + - scope + - destination + webhook_Full: + allOf: + - title: webhook_Full + type: object + properties: + id: + type: integer + description: ID of the webhook. + example: 18048287 + client_id: + type: string + description: Client ID, unique to the store or app. + example: m9r6keqmo7h7f23btnpwernbez1kglkl + store_hash: + type: string + description: Permanent ID of the BigCommerce store. + example: sftg45fsd + created_at: + type: integer + example: 1561488106 + description: The time the webhook was created, represented in UNIX epoch time. + updated_at: + type: integer + example: 1561488106 + description: The time the webhook was most recently updated, represented in UNIX epoch time. + - $ref: '#/components/schemas/webhook_Base' + Pagination: + type: object + description: | + Data about the response, including pagination and collection totals. + properties: + total: + type: integer + description: Total number of returned items across all pages. + count: + type: integer + description: Number of items on current page. + per_page: + type: integer + description: Maximum number of items per page. + current_page: + type: integer + description: Current page number. + total_pages: + type: integer + description: Total number of pages. + links: + type: object + properties: + previous: + type: string + description: Link to the previous page returned in the response. + current: + type: string + description: Link to the current page returned in the response. + next: + type: string + description: Link to the next page returned in the response. + webhook_callback_base: + description: '' + title: '' + type: object + properties: + created_at: + type: integer + example: 1561488106 + description: The time the webhook was created, represented in UNIX epoch time. + readOnly: true + store_id: + type: string + minLength: 1 + example: '1025646' + description: A numerical identifier that is unique to each store. + producer: + type: string + minLength: 1 + example: 'stores/{store_hash}' + description: Will always follow the pattern `stores/store_hash`. This is the store that created the webhook. + scope: + type: string + minLength: 1 + example: store/cart/created + description: The event registered when the webhook was created. + hash: + type: string + minLength: 1 + example: 352e4afc6dd3fc85ea26bfdf3f91852604d57528 + description: The payload data encoded in JSON format and then passed through SH1 encryption. + callback_category_data: + title: callback_category_data + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + data: + type: object + description: A lightweight description of the event that triggered the webhook. Will vary depending on the event registered. + properties: + type: + type: string + description: This type will always be `category`. + default: category + id: + type: integer + description: ID of the category. + example: 42