From a6bb4e67299be3012ef823c6b2e989b3fc7e734b Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Wed, 25 Sep 2024 11:45:29 -0500 Subject: [PATCH 01/17] remove
tags in catalog (#547) No ticket ## What changed? removed br tags ## Release notes draft n/a ## Anything else? ping {names} --- docs/b2b-edition/specs/storefront/storefront/catalog.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/b2b-edition/specs/storefront/storefront/catalog.yaml b/docs/b2b-edition/specs/storefront/storefront/catalog.yaml index 7f39886f6..7766df704 100644 --- a/docs/b2b-edition/specs/storefront/storefront/catalog.yaml +++ b/docs/b2b-edition/specs/storefront/storefront/catalog.yaml @@ -64,7 +64,7 @@ paths: operationId: get-catalogs-variants description: |- Get variants list. -
Equivalent Storefront GraphQL API Query: `productVariantsInfo`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).
+ Equivalent Storefront GraphQL API Query: `productVariantsInfo`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). parameters: - schema: type: string @@ -217,7 +217,7 @@ paths: description: 'Variant SKU names, split by "|".' description: |- Get the catalogʼs product information by requesting the [Get All Products](https://developer.bigcommerce.com/docs/rest-catalog/products#get-all-products) BigCommerceʼs API. -
Equivalent Storefront GraphQL API Query: `variantSku`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).
+ Equivalent Storefront GraphQL API Query: `variantSku`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Catalog parameters: [] @@ -351,7 +351,7 @@ paths: modifiers: [] description: |- Get products quickly. -
Equivalent Storefront GraphQL API Query: `variantSku`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).
+ Equivalent Storefront GraphQL API Query: `variantSku`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Catalog parameters: From 582f2f4cb8050ef2bccc9c2b682d010fe5b251ab Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Wed, 25 Sep 2024 12:09:04 -0500 Subject: [PATCH 02/17] Issue-538 (#546) # [Issue-538](https://github.com/bigcommerce/docs/issues/538) ## What changed? removed Resources and Additional resources because the one reference is outdated. See slack conversation: https://bigcommerce.slack.com/archives/C05CZVCC23Z/p1727273685497769 ## Release notes draft Bug Fix: legacy references that has been replaced by the native shopper consent functionality ## Anything else? ping {names} --- docs/storefront/stencil/utils/events.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/storefront/stencil/utils/events.mdx b/docs/storefront/stencil/utils/events.mdx index 96bb0c4b9..6b106ce35 100644 --- a/docs/storefront/stencil/utils/events.mdx +++ b/docs/storefront/stencil/utils/events.mdx @@ -106,8 +106,3 @@ searchEvents() { | data-faceted-search-facet | click | facetedSearch-facet-clicked | event | | data-faceted-search-range | submit | facetedSearch-range-submitted | event | - -## Resources - -### Additional Resources -* [cookieNotification.js](https://github.com/bigcommerce/cornerstone/blob/637ef1b0ff130333aea128663daa6d1a4d37fb78/assets/js/theme/global/cookieNotification.js) (BigCommerce GitHub) From c52d90ef958dd9ce3f6d10b283dd8c21d695e2c1 Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Wed, 25 Sep 2024 12:13:11 -0500 Subject: [PATCH 03/17] DEVDOCS-5655:[update] b2b-sales-rep.yml (#541) # [DEVDOCS-5655] ## What changed? Updated the sales-rep.yaml file. ## Release notes draft N/A ## Anything else? ping {names} [DEVDOCS-5655]: https://bigcommercecloud.atlassian.net/browse/DEVDOCS-5655?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- .../specs/storefront/storefront/sales-rep.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/b2b-edition/specs/storefront/storefront/sales-rep.yaml b/docs/b2b-edition/specs/storefront/storefront/sales-rep.yaml index 491f723d6..f0de01fae 100644 --- a/docs/b2b-edition/specs/storefront/storefront/sales-rep.yaml +++ b/docs/b2b-edition/specs/storefront/storefront/sales-rep.yaml @@ -81,7 +81,7 @@ paths: phoneNumber: '123456789' description: |- Update status for when a super admin masquerades as a company by userId and companyId. -
Equivalent Storefront GraphQL API Mutation: `superAdminBeginMasquerade`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `superAdminBeginMasquerade`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Super Admin security: @@ -137,7 +137,7 @@ paths: data: {} description: |- Update status for when a super admin masquerades as a company by userId and companyId. -
Equivalent Storefront GraphQL API Mutation: `superAdminEndMasquerade`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `superAdminEndMasquerade`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Super Admin security: @@ -273,8 +273,8 @@ paths: fieldValue: test operationId: get-sales-reps-customerId-companies-masquerading description: |- - Get company info for the current super admin masquerading. -
Equivalent Storefront GraphQL API Query: `superAdminMasquerading`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Get company information for the current super admin masquerading. + Equivalent Storefront GraphQL API Query: `superAdminMasquerading`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Super Admin '/sales-reps/{salesRepId}/companies': @@ -453,7 +453,7 @@ paths: operationId: get-sales-reps-salesRepId-companies description: |- Get companies by Super Admin ID. -
Equivalent Storefront GraphQL API Query: `superAdminCompanies`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Query: `superAdminCompanies`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Super Admin security: @@ -548,6 +548,7 @@ components: securitySchemes: authToken: name: authToken + description: Include the `authToken` in a header parameter. type: apiKey in: header security: From f937b8edd0348610ef6df0f1dd0aec68a531e593 Mon Sep 17 00:00:00 2001 From: Jasper Pajar <45197791+jpajar@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:26:20 +1000 Subject: [PATCH 04/17] ORDERS-6362: [add] is_tax_inclusive_pricing field in orders response (#530) https://bigcommercecloud.atlassian.net/browse/ORDERS-6362 ## What changed? * Added is_tax_inclusive_pricing field in orders response Swagger Proof: https://github.com/user-attachments/assets/86560ebf-3fc7-482d-93b3-4190699b8c96 --- reference/orders.v2.oas2.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/reference/orders.v2.oas2.yml b/reference/orders.v2.oas2.yml index 5ae75018f..513278f12 100644 --- a/reference/orders.v2.oas2.yml +++ b/reference/orders.v2.oas2.yml @@ -3918,10 +3918,6 @@ components: description: Override value for the total, including tax. If specified, the field `total_ex_tax` is also required. The value can't be negative. (Float, Float-As-String, Integer) example: '225.0000' type: string - is_tax_inclusive_pricing: - description: Indicates whether the order total is inclusive of tax. - example: false - type: boolean wrapping_cost_ex_tax: description: The value of the wrapping cost, excluding tax. The value can't be negative. (Float, Float-As-String, Integer) example: '0.0000' @@ -4137,7 +4133,12 @@ components: example: false type: boolean is_tax_inclusive_pricing: - description: Indicates whether the order total is inclusive of tax. + description: |- + Indicate whether the order's base prices include tax. + + If true, the base prices are inclusive of tax, and the values of `subtotal_inc_tax`, `shipping_cost_inc_tax`, `handling_cost_inc_tax`, `wrapping_cost_inc_tax` and `total_inc_tax` are not estimated but actual values and can be reliable for accounting purposes. + + If false, the base prices are exclusive of tax, and the values of `subtotal_ex_tax`, `shipping_cost_ex_tax`, `handling_cost_ex_tax`, `wrapping_cost_ex_tax` and `total_ex_tax` are not estimated but actual values and can be reliable for accounting purposes. example: false type: boolean is_email_opt_in: From ff88c9f6ac77a852ef33e3f4b3d777a0d439b8b0 Mon Sep 17 00:00:00 2001 From: Roman Liukshyn <79109064+bc-romanliukshyn@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:16:37 +0200 Subject: [PATCH 05/17] Update MSF and Catalog ownership (#510) ## What changed? * In order to ensure that public documentation remains up-to-date with development, the Catalog and Multi-Storefront teams want to have more visibility over the updating process. This includes introducing code ownership through the CODEOWNERS file, allowing for better visibility and control over changes to documentation. --- .github/CODEOWNERS | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bc5fb189f..de07cbbbf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,3 +6,12 @@ # be identified in the format @org/team-name. Teams must have # explicit write access to the repository. In this example, # the octocats team in the octo-org organization owns all .md files. + +# @bigcommerce/team-catalog-ops +reference/catalog @bigcommerce/team-catalog-ops +archive/rest-catalog @bigcommerce/team-catalog-ops + +# @bigcommerce/team-multi-storefront +docs/storefront/multi-storefront @bigcommerce/team-multi-storefront +reference/channels.v3.yml @bigcommerce/team-multi-storefront +reference/sites.v3.yml @bigcommerce/team-multi-storefront \ No newline at end of file From dc932a5f060060644541883a941fc457a7665897 Mon Sep 17 00:00:00 2001 From: Tom Robertshaw Date: Thu, 26 Sep 2024 14:41:31 +0100 Subject: [PATCH 06/17] Correct category description field description (#536) ## What changed? * Correct category description field description ## Release notes draft * Corrected the description of the category description field in the API docs. --- reference/catalog/categories_catalog.v3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/catalog/categories_catalog.v3.yml b/reference/catalog/categories_catalog.v3.yml index 8b4bdbd3e..8cf1643c1 100644 --- a/reference/catalog/categories_catalog.v3.yml +++ b/reference/catalog/categories_catalog.v3.yml @@ -262,7 +262,7 @@ paths: description: type: string description: | - The product description, which can include HTML formatting. + The category description, which can include HTML formatting. example:

We offer a wide variety of products perfect for relaxing

views: type: integer From 6e4600371308bc49865038dd366eebc15febac14 Mon Sep 17 00:00:00 2001 From: Nate Stewart Date: Fri, 27 Sep 2024 09:59:51 -0400 Subject: [PATCH 07/17] Combine B2B invoice, payments, and receipt specs (#539) This enables the specs to be organized under "Invoice Management" in the dev center. Once this is merged and devcenter updates, we can remove the separate invoice, payment, and receipt files. --------- Co-authored-by: Traci Porter --- .../specs/api-v3/invoice-management.yaml | 4385 +++++++++++++++++ 1 file changed, 4385 insertions(+) create mode 100644 docs/b2b-edition/specs/api-v3/invoice-management.yaml diff --git a/docs/b2b-edition/specs/api-v3/invoice-management.yaml b/docs/b2b-edition/specs/api-v3/invoice-management.yaml new file mode 100644 index 000000000..4346d7302 --- /dev/null +++ b/docs/b2b-edition/specs/api-v3/invoice-management.yaml @@ -0,0 +1,4385 @@ +openapi: '3.0.1' +info: + title: BigCommerce B2B Edition API + description: API for Invoices, Payments, and Receipts in BigCommerce B2B Edition + version: v3 + termsOfService: 'https://www.bigcommerce.com/terms' + contact: + name: BigCommerce + url: 'https://www.bigcommerce.com' + email: support@bigcommerce.com +servers: + - url: "https://api-b2b.bigcommerce.com/api/v3/io/ip" +security: + - authToken: [] +tags: + - name: Invoice + description: Invoice + - name: Payments + description: Payments + - name: Receipt + description: Receipt +components: + responses: + "Invoice404": + description: Example response + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + errMsg: + type: string + minLength: 1 + required: + - errMsg + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 404 + data: + errMsg: Invoice does not exist + meta: + message: Not Found Error + examples: + example-1: + value: + code: 404 + data: + errMsg: Invoice does not exist + meta: + message: Not Found Error + "Payment400": + description: Example response + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + errMsg: + type: string + minLength: 1 + required: + - errMsg + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 400 + data: + errMsg: The payment operation is not allowed. + meta: + message: Not Found Error + examples: + example-1: + value: + code: 400 + data: + errMsg: The payment operation is not allowed. + meta: + message: Not Found Error + example-2: + value: + code: 400 + data: + errMsg: The payment processing status is not allowed. + meta: + message: Not Found Error + "Payment404": + description: Example response + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + errMsg: + type: string + minLength: 1 + required: + - errMsg + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 404 + data: + errMsg: Payment does not exist + meta: + message: Not Found Error + examples: + example: + value: + code: 404 + data: + errMsg: Payment does not exist + meta: + message: Not Found Error + "Payment422": + description: Example response + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 422 + meta: + message: Parameter Error + data: + lineItems: + - This field is required. + properties: + code: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + data: + type: object + required: + - currency + properties: + currency: + type: array + items: + type: string + required: + - code + - meta + - data + examples: + example: + value: + code: 422 + meta: + message: Parameter Error + data: + currency: [USD] + "Receipt404": + description: Example response + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + errMsg: + type: string + minLength: 1 + required: + - errMsg + meta: + type: object + properties: + message: + type: string + minLength: 1 + required: + - message + required: + - code + - data + - meta + x-examples: + example-1: + code: 404 + data: + errMsg: Receipt does not exist + meta: + message: Not Found Error + examples: + example-1: + value: + code: 404 + data: + errMsg: Receipt does not exist + meta: + message: Not Found Error + schemas: {} + securitySchemes: + authToken: + name: authToken + description: Include the `authToken` in a header parameter. + type: apiKey + in: header +paths: + "/invoices/{invoiceId}": + parameters: + - schema: + type: string + name: invoiceId + in: path + required: true + description: invoice id + get: + summary: Get invoice detail + operationId: get-invoices-invoiceId + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + allOf: + - $ref: '../../models/invoice_portal/invoice.yaml' + - $ref: '../../models/extra_fields/extra_field_values.yaml' + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - meta + examples: + "200": + value: + code: 200 + data: + id: 9 + customerId: "95075" + externalId: "23" + externalCustomerId: "123" + invoiceNumber: "00000009" + type: Invoice on Shipment + dueDate: 1617675497 + status: 1 + orderNumber: "104" + purchaseOrderNumber: "123" + details: + type: StandardInvoiceDetails + header: + costLines: + - amount: + code: USD + value: "349.5000" + description: Subtotal + - amount: + code: USD + value: "0.0000" + description: Freight + - amount: + code: USD + value: "0.0000" + description: Sales Tax + orderDate: 1616809386 + billingAddress: + city: 成都 + state: District of Columbia + country: United States + street1: tianfuwujie + street2: ruanjianyuan + zipCode: "123" + lastName: xu + firstName: stanton + customFields: {} + customerFields: {} + shippingAddresses: + - city: 成都 + state: District of Columbia + country: United States + street1: tianfuwujie + street2: ruanjianyuan + zipCode: "123" + lastName: xu + firstName: stanton + customFields: {} + details: + shipments: + - addressIndex: string + shipDate: string + shipVia: string + trackingNumber: string + comments: string + customFields: {} + lineItems: + - sku: DPB + type: physical + comments: "physical item" + quantity: "10" + unitPrice: + code: USD + value: "34.95" + description: "[Sample] Dustpan & Brush" + customFields: {} + unitDiscount: + code: USD + value: "12" + - sku: DD + type: product + comments: "product DD" + quantity: "10" + unitPrice: + code: USD + value: "3" + description: "[Sample] Dustpan " + customFields: {} + unitDiscount: + code: USD + value: "1" + isPendingPayment: 1 + source: 0 + originalBalance: + code: USD + value: "349.5000" + openBalance: + code: USD + value: "913.4300" + customerName: silk + meta: + message: SUCCESS + example-1: + value: + code: 0 + data: + id: 0 + customerId: string + externalCustomerId: string + externalId: string + invoiceNumber: string + type: string + dueDate: 0 + status: 0 + orderNumber: string + purchaseOrderNumber: string + details: + type: string + header: + costLines: + - amount: + code: string + value: string + description: string + orderDate: 0 + billingAddress: + city: string + state: string + country: string + street1: string + street2: string + zipCode: string + lastName: string + firstName: string + customFields: {} + customerFields: {} + shippingAddresses: + - city: string + state: string + country: string + street1: string + street2: string + zipCode: string + lastName: string + firstName: string + customFields: {} + details: + shipments: + - addressIndex: string + shipDate: string + shipVia: string + trackingNumber: string + comments: string + customFields: {} + lineItems: + - sku: string + type: string + comments: string + quantity: string + unitPrice: + code: USA + value: string + description: string + customFields: {} + unitDiscount: + code: string + value: string + isPendingPayment: 0 + source: 0 + originalBalance: + code: string + value: string + openBalance: + code: string + value: string + customerName: string + createdAt: string + updatedAt: string + channelId: "1" + channelName: string + meta: + message: string + "404": + $ref: "#/components/responses/Invoice404" + description: get invoice detail + parameters: [] + tags: + - Invoice + put: + summary: Update an invoice + operationId: put-invoices-invoiceId + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - id + properties: + id: + type: number + description: Invoice ID + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 33 + meta: + message: SUCCESS + "400": + value: + code: 400 + meta: + message: Bad Requests Error + errors: "Please enter a valid number; " + data: + id: 33 + description: update an invoice + parameters: [] + requestBody: + content: + application/json: + schema: + description: "" + x-examples: + example-1: + id: 0 + customerId: string + externalCustomerId: string + externalId: string + invoiceNumber: string + type: string + dueDate: 0 + status: 0 + orderNumber: string + purchaseOrderNumber: string + details: + type: string + header: + costLines: + - amount: + code: string + value: string + description: string + orderDate: 0 + billingAddress: + city: string + state: string + country: string + street1: string + street2: string + zipCode: string + lastName: string + firstName: string + customFields: {} + customerFields: string + shippingAddresses: + - city: string + state: string + country: string + street1: string + street2: string + zipCode: string + lastName: string + firstName: string + customFields: {} + details: + shipments: + - addressIndex: string + shipDate: string + shipVia: string + trackingNumber: string + comments: string + customFields: {} + lineItems: + - sku: string + type: string + comments: string + quantity: string + unitPrice: + code: USA + value: string + description: string + customFields: {} + unitDiscount: + code: string + value: string + isPendingPayment: 0 + source: 0 + originalBalance: + code: string + value: string + openBalance: + code: string + value: string + customerName: string + createdAt: string + updatedAt: string + allOf: + - type: object + properties: + customerId: + type: string + minLength: 1 + description: B2B Edition Company ID + externalCustomerId: + type: string + minLength: 1 + description: Ext Customer ID + externalId: + type: string + minLength: 1 + description: Ext Invoice ID + invoiceNumber: + type: string + minLength: 1 + description: "Invoice Number, must be unique" + type: + type: string + minLength: 1 + dueDate: + type: number + description: Invoice due date + status: + type: number + description: "invoice status, noted status will be auto set to 2 when open balance is <= 0" + purchaseOrderNumber: + type: string + minLength: 1 + description: PO Number + details: + type: object + description: "Details that will show on the invoice. When updating this field, the new value will completely replace the existing details. To preserve existing details while making updates, retrieve the current details first, and make your edits to that object before submitting the changes." + properties: + header: + type: object + properties: + costLines: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + amount: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + description: + type: string + minLength: 1 + required: + - amount + - description + billingAddress: + type: object + properties: + city: + type: string + minLength: 1 + state: + type: string + minLength: 1 + country: + type: string + minLength: 1 + street1: + type: string + minLength: 1 + street2: + type: string + minLength: 1 + zipCode: + type: string + minLength: 1 + lastName: + type: string + minLength: 1 + firstName: + type: string + minLength: 1 + customFields: + type: string + required: + - city + - state + - country + - street1 + - street2 + - zipCode + - lastName + - firstName + - customFields + shippingAddresses: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + city: + type: string + minLength: 1 + state: + type: string + minLength: 1 + country: + type: string + minLength: 1 + street1: + type: string + minLength: 1 + street2: + type: string + minLength: 1 + zipCode: + type: string + minLength: 1 + lastName: + type: string + minLength: 1 + firstName: + type: string + minLength: 1 + required: + - city + - state + - country + - street1 + - street2 + - zipCode + - lastName + - firstName + details: + type: object + properties: + shipments: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + addressIndex: + type: string + minLength: 1 + shipDate: + type: string + minLength: 1 + shipVia: + type: string + minLength: 1 + trackingNumber: + type: string + minLength: 1 + comments: + type: string + minLength: 1 + required: + - addressIndex + - shipDate + - shipVia + - trackingNumber + - comments + lineItems: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + sku: + type: string + minLength: 1 + type: + type: string + minLength: 1 + comments: + type: string + minLength: 1 + quantity: + type: string + minLength: 1 + unitPrice: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + description: + type: string + description: Product description or product name. This field is required for custom product. + minLength: 1 + unitDiscount: + type: object + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + required: + - sku + - quantity + - unitPrice + source: + type: number + description: "Mark the source of the invoice, 0 for B2B Edition, 1 for external." + originalBalance: + type: object + description: Invoice original balance + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + openBalance: + type: object + description: Invoice balance awaiting for payment + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + createdAt: + type: integer + externalPdfUrl: + type: string + description: The URL of an externally hosted PDF file to be associated with this invoice. The file size must not exceed 5 MB. Ensure that the file hosting service supports Cross-Origin Resource Sharing (CORS) to allow our system to access the file. To remove an existing PDF link, use an empty string. + - $ref: '../../models/extra_fields/extra_field_values.yaml' + examples: + Update body with details field: + value: + customerId: "3" + dueDate: 1619826907 + details: + header: + costLines: + - amount: + code: USD + value: "400.0000" + description: Subtotal + - amount: + code: USD + value: "0.0000" + description: Freight + - amount: + code: USD + value: "0.0000" + description: Sales Tax + details: + lineItems: + - sku: CLC + type: physical + comments: "item comments" + quantity: "2" + unitPrice: + code: USD + value: "200.0000" + description: "[Sample] Canvas Laundry Cart" + openBalance: + code: USD + value: "12.0000" + Update body without details field: + value: + openBalance: + code: USD + value: "12.0000" + tags: + - Invoice + delete: + summary: Delete an invoice + operationId: delete-invoices-invoiceId + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + id: + type: number + description: Invoice ID + meta: + type: object + required: + - message + properties: + message: + type: string + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 12 + meta: + message: Success + "404": + $ref: "#/components/responses/Invoice404" + description: delete an invoice + parameters: [] + tags: + - Invoice + /invoices: + post: + summary: Create Invoice + operationId: post-invoices + description: Create Invoice + parameters: [] + requestBody: + content: + application/json: + schema: + allOf: + - type: object + properties: + invoiceNumber: + type: string + description: Invoice no. + type: + type: string + default: Invoice + description: Invoice type + dueDate: + type: integer + description: "The due date for this invoice, specified as a Unix timestamp. If left empty, it will be set to the current date plus a pre-configured number of days (set in your B2B Edition control panel settings)." + status: + type: integer + default: 0 + enum: + - 0 + - 1 + - 2 + description: |- + Invoice status. Possible values: + 0: Open (default) + 1: Partially paid + 2: Completed + + The status will automatically be set to Completed (2) when the open balance becomes zero or negative. + orderNumber: + type: string + description: BigCommerce order ID associated with this invoice. + purchaseOrderNumber: + type: string + description: PO Number + originalBalance: + type: object + description: Original balance + required: + - code + - value + properties: + code: + type: string + description: Currency code + example: USD + value: + type: number + description: Amount + openBalance: + type: object + description: "Open balance , when it is <= 0, status will be auto set to 2" + required: + - code + - value + properties: + code: + type: string + description: Currency code + example: USD + value: + type: number + description: Amount + issuedAt: + type: number + description: When the invoice was created. The current timestamp is the default. + details: + type: object + description: Invoice details + properties: + header: + type: object + properties: + costLines: + type: array + description: "Invoice cost information. This field is optional. If provided, it should contain an array of cost line items. The information in this field will be displayed on the invoice detail page." + items: + type: object + properties: + amount: + type: object + description: cost amount + required: + - code + - value + properties: + code: + type: string + description: currency code + value: + type: string + description: amount + description: + type: string + description: Price description, e.g., subtotal or other types of prices or fees. + required: + - amount + - description + billingAddress: + type: object + description: "Invoice billing address. This field is optional. If provided, it should contain an object with address details." + properties: + city: + type: string + state: + type: string + country: + type: string + street1: + type: string + street2: + type: string + zipCode: + type: string + lastName: + type: string + firstName: + type: string + required: + - city + - state + - country + - street1 + - street2 + - zipCode + - lastName + - firstName + shippingAddresses: + type: array + description: "Invoice shipping address. This field is optional. If provided, it should contain an object with address details." + items: + type: object + properties: + city: + type: string + state: + type: string + country: + type: string + street1: + type: string + street2: + type: string + zipCode: + type: string + lastName: + type: string + firstName: + type: string + required: + - city + - state + - country + - street1 + - street2 + - zipCode + - lastName + - firstName + details: + type: object + properties: + shipments: + type: array + description: "Invoice shipments. This field is optional. If provided, it should contain an array of shipments. Required fields within each shipment object can be an empty string." + items: + type: object + properties: + addressIndex: + type: string + description: address ID + shipDate: + type: string + description: shipment time + shipVia: + type: string + trackingNumber: + type: string + description: tracking number + comments: + type: string + required: + - addressIndex + - shipDate + - shipVia + - trackingNumber + - comments + lineItems: + type: array + description: "Products within the invoice. This field is optional. If provided, it should contain an array of products." + items: + type: object + properties: + sku: + type: string + description: product sku + type: + type: string + description: product type + comments: + type: string + quantity: + type: string + description: product quantity + unitPrice: + type: object + description: product unit price + required: + - code + - value + properties: + code: + type: string + description: currency code + value: + type: string + description: amount + description: + type: string + description: Product description or product name. This field is required for custom product. + unitDiscount: + type: object + description: "Product level discount details. This field is optional. If provided, it should contain a discount object." + properties: + code: + type: string + description: currency code + value: + type: string + description: amount + required: + - code + - value + required: + - sku + - quantity + - unitPrice + source: + type: number + default: 0 + description: |- + The source of the invoice. Possible values: + 0: B2B Edition + 1: External + enum: + - 0 + - 1 + customerId: + type: string + description: B2B Edition Company ID + externalId: + type: string + description: ERP Invoice ID + externalCustomerId: + type: string + description: ERP Customer ID + channelId: + type: integer + description: BigCommerce Channel ID + externalPdfUrl: + type: string + description: The URL of an externally hosted PDF file to be associated with this invoice. The file size must not exceed 5 MB. Ensure that the file hosting service supports Cross-Origin Resource Sharing (CORS) to allow our system to access the file. + termsConditions: + type: string + description: Terms & Conditions. Visible on the default Invoice PDF. + required: + - invoiceNumber + - originalBalance + - openBalance + - customerId + - $ref: '../../models/extra_fields/extra_field_values.yaml' + examples: + Invoice body with details info: + value: + invoiceNumber: "0000001" + dueDate: 1619161808 + status: 0 + originalBalance: + code: USD + value: 100 + openBalance: + code: USD + value: 100 + issuedAt: 1619161808 + details: + header: + costLines: + - amount: + code: USD + value: "90.00" + description: Subtotal + - amount: + code: USD + value: "10.00" + description: Freight + - amount: + code: USD + value: "0.00" + description: Sales Tax + billingAddress: + city: Chengdu + state: Sichuan + country: China + street1: TianFuWuJie + street2: "" + zipCode: "12345" + lastName: Test + firstName: B2B + shippingAddresses: + - city: Chengdu + state: Sichuan + country: China + street1: TianFuWuJie + street2: "" + zipCode: "12345" + lastName: Test + firstName: B2B + details: + lineItems: + - sku: Test-1 + quantity: "2" + unitPrice: + code: USD + value: "40.00" + description: A custom product requires a description. + customerId: "12345" + channelId: 1 + Invoice body without details info: + value: + invoiceNumber: "0000001" + originalBalance: + code: USD + value: 100 + openBalance: + code: USD + value: 100 + customerId: "12345" + channelId: 1 + description: "" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + description: "200" + data: + type: object + properties: + id: + type: number + description: Invoice ID + meta: + type: object + properties: + message: + type: string + description: Success + errors: + type: string + examples: + "200": + value: + code: 200 + data: + id: 12 + meta: + message: Success + "400": + value: + code: 400 + data: + errMsg: The invoice number already exists. + meta: + message: Bad Requests Error + tags: + - Invoice + parameters: [] + get: + summary: Get invoices + operationId: get-invoices + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + allOf: + - $ref: '../../models/invoice_portal/invoice.yaml' + - $ref: '../../models/extra_fields/extra_field_values.yaml' + meta: + type: object + x-stoplight: + id: pht8y928miqy9 + properties: + message: + type: string + x-stoplight: + id: 2jm99sqmjeuty + pagination: + type: object + x-stoplight: + id: mqkl3sn242e8h + properties: + totalCount: + type: integer + x-stoplight: + id: 9mfisvvpi367o + limit: + type: integer + x-stoplight: + id: orpbdnwbh09j8 + offset: + type: integer + x-stoplight: + id: hhcd4o48fb5k6 + examples: + example: + value: + code: 200 + data: + - id: 33 + customerId: "3" + externalId: "123" + externalCustomerId: "123" + invoiceNumber: "00000033" + type: Invoice on Shipment + dueDate: 1619826907 + status: 0 + orderNumber: "132" + purchaseOrderNumber: "123" + details: + type: StandardInvoiceDetails + header: + costLines: + - amount: + code: USD + value: "400.0000" + description: Subtotal + - amount: + code: USD + value: "0.0000" + description: Freight + - amount: + code: USD + value: "0.0000" + description: Sales Tax + orderDate: 1618246864 + billingAddress: + city: montreal + state: California + country: United States + street1: test + street2: test + zipCode: "111111" + lastName: test + firstName: test + customFields: {} + customerFields: {} + shippingAddresses: + - city: montreal + state: California + country: United States + street1: test + street2: test + zipCode: "111111" + lastName: test + firstName: test + customFields: {} + details: + lineItems: + - sku: CLC + type: physical + comments: "item comments" + quantity: "2" + unitPrice: + code: USD + value: "200.0000" + description: "[Sample] Canvas Laundry Cart" + customFields: {} + unitDiscount: + code: USD + value: "0" + shipments: + - addressIndex: string + shipDate: string + shipVia: string + trackingNumber: string + comments: string + customFields: {} + isPendingPayment: 1 + source: 0 + originalBalance: + code: USD + value: "400.0000" + openBalance: + code: USD + value: "400.0000" + customerName: ABC123 + channelId: "1" + channelName: string + description: get invoices + parameters: + - schema: + type: number + in: query + name: offset + - schema: + type: number + in: query + name: limit + - schema: + type: string + enum: + - DESC + - ASC + example: DESC + in: query + name: orderBy + description: '"DESC" or "ASC"' + - schema: + type: string + enum: + - invoiceNumber + - createdAt + - customerId + - externalCustomerId + - dueDate + - updatedAt + - isPendingPayment + - openBalance + - originalBalance + - status + example: invoiceNumber + in: query + name: sortBy + description: Sort by the field value + - schema: + type: string + enum: + - invoiceNumber + - type + - orderNumber + - purchaseOrderNumber + - customerId + - externalCustomerId + example: invoiceNumber + in: query + name: searchBy + description: Filter by a field + - schema: + type: string + in: query + name: q + description: 'You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".' + - schema: + type: string + in: query + name: customerName + description: Query by invoice B2B Edition company name + - schema: + type: string + in: query + name: customerId + description: Query by invoice B2B Edition company ID + - schema: + type: integer + enum: + - 0 + - 1 + - 2 + example: 1 + in: query + name: status + description: Query by invoice status + - schema: + type: string + in: query + name: beginDateAt + description: 'Query by the created timestamp, along with the "endDateAt" parameter' + - schema: + type: string + in: query + name: endDateAt + description: 'Query by the created timestamp, along with the with the "beginDateAt" parameter' + - schema: + type: array + items: + type: number + in: query + name: "externalId[]" + description: Query by the invoice external ID + - schema: + type: string + enum: + - "0" + - "1" + in: query + name: isIncludeExtraFields + description: Determine if extra fields should show in the response + - schema: + type: array + items: + type: number + in: query + name: channelIds + description: BigCommerce Channel IDs + tags: + - Invoice + /invoices/export: {} + "/orders/{orderId}/invoices": + parameters: + - schema: + type: number + name: orderId + in: path + required: true + description: B2B Edition order ID + post: + summary: Create invoice from order + tags: + - Invoice + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - invoiceNumber + - invoiceId + properties: + invoiceNumber: + type: string + minLength: 1 + description: Invoice number + invoiceId: + type: number + description: Invoice ID + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + invoiceNumber: "00000036" + invoiceId: 36 + meta: + message: SUCCESS + "404": + value: + code: 404 + data: + invoiceId: 36 + invoiceNumber: "00000036" + errMsg: Order does not exist + meta: + message: Not Found Error + operationId: post-orders-orderId-invoices + description: create invoice from B2B Edition order + parameters: [] + "/invoices/{invoiceId}/download-pdf": + parameters: + - schema: + type: string + name: invoiceId + in: path + required: true + get: + summary: invoice download pdf + operationId: get-invoices-invoiceId-download-pdf + description: Get invoice download PDF + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: integer + data: + type: object + properties: + url: + type: string + externalPdfUrl: + type: string + description: The URL of an externally hosted PDF file to be associated with this invoice. The file size must not exceed 5 MB. Ensure that the file hosting service supports Cross-Origin Resource Sharing (CORS) to allow our system to access the file. + meta: + type: object + properties: + message: + type: string + x-examples: + example-1: + code: 200 + data: + url: "https://s3-us-west-2.amazonaws.com/bundleb2b-v2.0-quote-staging/B3_V3_dev_00000012.pdf" + meta: + message: SUCCESS + examples: {} + "404": + description: Not Found + content: + application/json: + schema: + type: object + properties: + code: + type: integer + data: + type: object + properties: + errMsg: + type: string + meta: + type: object + properties: + message: + type: string + x-examples: + example-1: + code: 404 + data: + errMsg: Invoice does not exist + meta: + message: Not Found Error + tags: + - Invoice + "/invoices/{invoiceId}/send-mail": + parameters: + - schema: + type: string + name: invoiceId + in: path + required: true + /invoices/extra-fields: + get: + summary: Get invoice extra field configs + tags: + - Invoice + responses: + "200": + description: OK + content: + application/json: + schema: + allOf: + - $ref: '../../models/utils/response-object.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../../models/extra_fields/extra_fields.yaml' + meta: + $ref: '../../models/utils/pagination.yaml' + operationId: get-invoices-extra-fields + description: Get invoice extra field configs + parameters: + - $ref: '../../specs/api-v3/user/user.yaml#/components/parameters/offset' + - $ref: '../../specs/api-v3/user/user.yaml#/components/parameters/limit' + + /payments: + get: + summary: Get Payments + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + x-examples: + example-1: + code: 200 + data: + - id: 117 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + payerName: Check + payerCustomerId: "6041" + details: + memo: k + moduleName: payments_offline + fees: [] + moduleData: + transactions: + - memo: k + type: OfflineTransaction + rawTransaction: null + processingStatus: 3 + appliedStatus: 1 + fundingStatus: 2 + total: + code: GBP + value: "0.7800" + lineItems: + - paymentId: 117 + invoiceId: 141 + invoiceNumber: "00000141" + amount: + code: GBP + value: "0.7800" + customerName: "" + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + payerName: + type: string + minLength: 1 + payerCustomerId: + type: string + minLength: 1 + details: + type: object + properties: + memo: + type: string + minLength: 1 + required: + - memo + moduleName: + type: string + minLength: 1 + fees: + type: array + items: + type: number + moduleData: + type: object + properties: + transactions: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + memo: + type: string + minLength: 1 + type: + type: string + minLength: 1 + rawTransaction: + type: array + nullable: true + items: {} + required: + - memo + - type + required: + - transactions + processingStatus: + type: number + appliedStatus: + type: number + fundingStatus: + type: number + total: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + lineItems: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + paymentId: + type: number + invoiceId: + type: number + invoiceNumber: + type: string + minLength: 1 + amount: + type: object + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + required: + - paymentId + - invoiceId + - invoiceNumber + customerName: + type: string + allowedOperations: + type: array + items: + type: number + allowedStatuses: + type: array + items: + type: number + channelId: + type: string + description: BigCommerce Channel ID + channelName: + type: string + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - payerName + - payerCustomerId + - moduleName + - processingStatus + - appliedStatus + - fundingStatus + - total + - lineItems + - customerName + meta: + type: object + required: + - pagination + - message + properties: + pagination: + type: object + required: + - totalCount + - offset + - limit + properties: + totalCount: + type: number + offset: + type: number + limit: + type: number + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + - id: 70 + createdAt: 1618800393 + updatedAt: 1618803026 + storeHash: jexy81vb0h + customerId: "95075" + externalId: null + externalCustomerId: null + payerName: Store offline payment + payerCustomerId: "95075" + details: + memo: "memo" + moduleName: payments_offline + fees: [] + moduleData: + transactions: + - memo: k + type: OfflineTransaction + rawTransaction: null + processingStatus: 3 + appliedStatus: 1 + fundingStatus: 2 + total: + code: USD + value: "6.0000" + lineItems: + - paymentId: 70 + invoiceId: 26 + invoiceNumber: "00000141" + amount: + code: USD + value: "6.0000" + customerName: silk + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + - id: 66 + createdAt: 1618590401 + updatedAt: 1618797215 + storeHash: jexy81vb0h + customerId: "3" + externalId: null + externalCustomerId: null + payerName: Store offline payment + payerCustomerId: "3" + details: + memo: "Check#:12345" + moduleName: payments_offline + fees: [] + moduleData: + transactions: + - memo: k + type: OfflineTransaction + rawTransaction: null + processingStatus: 2 + appliedStatus: 1 + fundingStatus: 2 + total: + code: USD + value: "30.0000" + lineItems: + - paymentId: 66 + invoiceId: 30 + invoiceNumber: "00000141" + amount: + code: USD + value: "10.0000" + - paymentId: 66 + invoiceId: 28 + invoiceNumber: "00000141" + amount: + code: USD + value: "20.0000" + customerName: ABC123 + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + - id: 65 + createdAt: 1618502653 + updatedAt: 1618502653 + storeHash: jexy81vb0h + customerId: "3" + externalId: null + externalCustomerId: null + payerName: Store offline payment + payerCustomerId: "3" + details: + memo: "123456" + moduleName: payments_offline + fees: [] + moduleData: + transactions: + - memo: k + type: OfflineTransaction + rawTransaction: null + processingStatus: 3 + appliedStatus: 1 + fundingStatus: 2 + total: + code: USD + value: "30.0000" + lineItems: + - paymentId: 65 + invoiceId: 30 + invoiceNumber: "00000141" + amount: + code: USD + value: "10.0000" + - paymentId: 65 + invoiceId: 28 + invoiceNumber: "00000141" + amount: + code: USD + value: "20.0000" + customerName: ABC123 + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + channelId: "1" + channelName: string + meta: + pagination: + totalCount: 59 + offset: 0 + limit: 10 + message: SUCCESS + operationId: get-payments + description: Get payment list + parameters: + - schema: + type: number + in: query + name: offset + description: Pagination offset + - schema: + type: number + in: query + name: limit + description: Pagination limit + - schema: + type: string + enum: + - DESC + - ASC + example: DESC + in: query + name: orderBy + description: '"DESC" or "ASC"' + - schema: + type: string + example: createdAt + enum: + - moduleName + - processingStatus + - appliedStatus + - createdAt + - customerId + - externalCustomerId + - fundingStatus + - updatedAt + - totalAmount + in: query + name: sortBy + description: Sort by the field value + - schema: + type: string + enum: + - id + - customerId + - externalId + - externalCustomerId + in: query + name: searchBy + description: Filter by a field + - schema: + type: string + in: query + name: q + description: 'You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".' + - schema: + type: string + in: query + name: customerName + description: Query by invoice B2B Edition company name + - schema: + type: number + in: query + name: invoiceId + description: Query by Invoice ID + - schema: + type: number + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + example: 3 + in: query + name: processingStatus + description: 'payment processing status(0="Incomplete", 1="Awaiting Processing", 2="Processing", 3="Completed", 4="Refunded")' + - schema: + type: array + items: + type: number + in: query + name: channelIds + description: Query by BigCommerce Channel IDs. This parameter is not needed if you don't have multiple storefront channels. + "/payments/{paymentId}": + parameters: + - schema: + type: number + name: paymentId + in: path + required: true + description: Payment ID + get: + summary: Get Payment Detail + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + x-examples: + example-1: + code: 200 + data: + id: 117 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + payerName: Check + payerCustomerId: "6041" + details: + memo: k + moduleName: payments_offline + fees: [] + moduleData: + transactions: + - memo: k + type: OfflineTransaction + rawTransaction: null + processingStatus: 3 + appliedStatus: 1 + fundingStatus: 2 + total: + code: GBP + value: "0.7800" + lineItems: + - paymentId: 117 + invoiceId: 141 + invoiceNumber: "00000141" + amount: + code: GBP + value: "0.7800" + customerName: "" + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + meta: + message: SUCCESS + properties: + code: + type: number + data: + type: object + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - payerName + - payerCustomerId + - details + - moduleName + - fees + - moduleData + - processingStatus + - appliedStatus + - fundingStatus + - total + - lineItems + - customerName + - allowedOperations + - allowedStatuses + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + payerName: + type: string + minLength: 1 + payerCustomerId: + type: string + minLength: 1 + details: + type: object + properties: + memo: + type: string + minLength: 1 + moduleName: + type: string + minLength: 1 + fees: + type: array + items: + type: number + moduleData: + type: object + required: + - transactions + properties: + transactions: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + memo: + type: string + minLength: 1 + type: + type: string + minLength: 1 + rawTransaction: {} + required: + - type + processingStatus: + type: number + appliedStatus: + type: number + fundingStatus: + type: number + total: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + lineItems: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + paymentId: + type: number + invoiceId: + type: number + invoiceNumber: + type: string + minLength: 1 + amount: + type: object + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + required: + - paymentId + - invoiceId + - invoiceNumber + customerName: + type: string + allowedOperations: + type: array + description: |- + Allowed payment actions: + (0, "Apply to Invoice Balances"), + (1, "Revert Invoice Balances"), + (2, "Pull Updates From Order"), + items: + type: number + allowedStatuses: + type: array + description: |- + Allowed payment status: + (1, 'Awaiting Processing'), + (2, 'Processing'), + (3, 'Completed'), + (4, 'Refunded'), + items: + type: number + channelId: + type: string + description: BigCommerce Channel ID + channelName: + type: string + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 20 + createdAt: 1617761431 + updatedAt: 1617762957 + storeHash: jexy81vb0h + customerId: "95075" + externalId: null + externalCustomerId: null + payerName: Hannah Admin + payerCustomerId: "95075" + details: + memo: "memo" + moduleName: payments_bigcommerce_sales_order + fees: [] + moduleData: + cartId: d0afeab8-ff76-4b4e-867a-0675c0ea6e6e + orderId: 121 + transactions: + - type: UnknownTransaction + rawTransaction: null + processingStatus: 4 + appliedStatus: 0 + fundingStatus: 2 + total: + code: USD + value: "11.0000" + lineItems: + - paymentId: 20 + invoiceId: 9 + invoiceNumber: "00000141" + amount: + code: USD + value: "11.0000" + customerName: silk + allowedOperations: [] + allowedStatuses: + - 1 + - 2 + - 3 + - 4 + channelId: "1" + channelName: string + meta: + message: SUCCESS + "404": + $ref: "#/components/responses/Payment404" + operationId: get-payments-paymentId + description: Get payment detail + parameters: [] + delete: + summary: Delete a Payment + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - id + properties: + id: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 1 + meta: + message: SUCCESS + "404": + $ref: "#/components/responses/Payment404" + operationId: delete-a-payment + description: Delete a payment + parameters: [] + "/payments/{paymentId}/operations": + parameters: + - schema: + type: number + name: paymentId + in: path + required: true + description: Payment ID + get: + summary: Get a Payment Operation + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - allowedOperations + - allowedStatuses + properties: + allowedOperations: + type: array + description: A list of allowable action codes for current payments. + items: {} + allowedStatuses: + type: array + description: The current payment method allows for the modification of the states listed. + items: {} + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + allowedOperations: [] + allowedStatuses: + - "1" + - "2" + - "3" + - "4" + meta: + message: Success + "404": + $ref: "#/components/responses/Payment404" + operationId: get-payment-operations-operations + description: Get a payment for all operations + parameters: [] + post: + summary: Performing Payment Operation + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - id + properties: + id: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 4 + meta: + message: SUCCESS + "400": + $ref: "#/components/responses/Payment400" + operationId: post-payments-paymentId-operations + description: Performing payment operation + parameters: [] + requestBody: + content: + application/json: + schema: + description: "" + type: object + properties: + operationCode: + type: number + description: "Payment operation code. The list of allowed operations for this payment." + enum: + - 0 + - 1 + - 2 + - 3 + example: 0 + required: + - operationCode + examples: + "200": + value: + operationCode: 0 + description: "" + "/payments/{paymentId}/processing-status": + parameters: + - schema: + type: number + name: paymentId + in: path + required: true + description: Payment ID + put: + summary: Update Payment Processing Status + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - id + properties: + id: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + id: 2 + meta: + message: SUCCESS + "400": + $ref: "#/components/responses/Payment400" + operationId: put-payments-paymentId-processing-status + description: Update payment processing status + parameters: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + processingStatus: + type: number + description: 'payment processing status(1="Awaiting Processing", 2="Processing", 3="Completed", 4="Refunded")' + required: + - processingStatus + "/payments/{paymentId}/transactions": + parameters: + - schema: + type: number + name: paymentId + in: path + required: true + description: Payment ID + get: + summary: Get Payment Transactions + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + - type: CreditCardTransaction + gateway: test + transactionId: "521263" + authCode: null + event: capture + card: + type: Visa + last4: "1111" + expiryYear: 2050 + expiryMonth: 12 + rawTransaction: null + meta: + message: SUCCESS + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + description: "The array contains payment transaction information that varies and depends on the payment gateway." + items: + type: object + properties: + type: + type: string + minLength: 1 + gateway: + type: string + minLength: 1 + transactionId: + type: string + minLength: 1 + authCode: + type: string + event: + type: string + minLength: 1 + card: + type: object + properties: + type: + type: string + minLength: 1 + last4: + type: string + minLength: 1 + expiryYear: + type: number + expiryMonth: + type: number + rawTransaction: + type: string + required: + - type + - rawTransaction + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + - type: CreditCardTransaction + gateway: test + transactionId: "521263" + authCode: "" + event: capture + card: + type: Visa + last4: "1111" + expiryYear: 2050 + expiryMonth: 12 + rawTransaction: "" + meta: + message: SUCCESS + "404": + $ref: "#/components/responses/Payment404" + operationId: get-payments-paymentId-transactions + description: Get payment transactions + parameters: [] + "/payments/offline": + post: + summary: Create Offline Payment + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + required: + - paymentId + properties: + paymentId: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + paymentId: 112 + meta: + message: SUCCESS + "422": + $ref: "#/components/responses/Payment422" + operationId: post-payments-offline + description: Create offline payment + parameters: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + lineItems: + type: array + items: + type: object + properties: + invoiceId: + type: number + amount: + type: string + required: + - invoiceId + - amount + currency: + type: string + details: + type: object + properties: + memo: + type: string + externalId: + type: string + customerId: + type: string + description: B2B Edition Company ID + externalCustomerId: + type: string + payerName: + type: string + default: Store offline payment + description: Default is "Store Offline Payment " if no value is passed in. + payerCustomerId: + type: string + description: The default value is the same as the customerId. + processingStatus: + type: number + default: 3 + enum: + - 1 + - 2 + - 3 + - 4 + example: 3 + description: "payment status, 3 is the default " + channelId: + type: integer + description: BigCommerce channel ID + required: + - lineItems + - currency + - details + - customerId + examples: + example: + value: + lineItems: + - invoiceId: 13 + amount: "20.00" + currency: USD + details: + memo: Test + customerId: "113" + payerName: Store offline payment + payerCustomerId: "113" + processingStatus: 3 + fundingStatus: "2" + "/payments/offline/{paymentId}": + parameters: + - schema: + type: number + name: paymentId + in: path + required: true + description: Payment ID + put: + summary: Update an Offline Payment + tags: + - Payments + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + properties: + code: + type: number + data: + type: object + properties: + paymentId: + type: number + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + errors: + type: string + required: + - code + - data + - meta + examples: + "200": + value: + code: 200 + data: + paymentId: 112 + meta: + message: SUCCESS + "422": + $ref: "#/components/responses/Payment422" + operationId: put-payments-offline-paymentId + description: Update offline payment + parameters: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + lineItems: + type: array + items: + type: object + properties: + invoiceId: + type: number + amount: + type: string + required: + - invoiceId + - amount + currency: + type: string + details: + type: object + properties: + memo: + type: string + externalId: + type: string + customerId: + type: string + description: B2B Edition Company ID + externalCustomerId: + type: string + payerName: + type: string + default: Store offline payment + description: Default is "Store Offline Payment " if no value is passed in. + payerCustomerId: + type: string + description: The default is the same as the customerId. + processingStatus: + type: number + default: 3 + enum: + - 1 + - 2 + - 3 + - 4 + example: 3 + fundingStatus: + type: number + default: 2 + enum: + - 0 + - 1 + - 2 + - 3 + required: + - lineItems + - currency + - details + - customerId + examples: + example: + value: + lineItems: + - invoiceId: 13 + amount: "20.00" + currency: USD + details: + memo: Test + customerId: "113" + payerName: Store offline payment + payerCustomerId: "113" + processingStatus: 3 + fundingStatus: 2 + + /receipts: + get: + summary: Get receipts + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + - id: 101 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + payerName: Check + payerCustomerId: "6041" + details: + paymentDetails: + memo: k + transactionType: Paid + paymentType: Offline + referenceNumber: k + paymentId: 117 + total: + code: GBP + value: "0.7800" + - id: 100 + createdAt: 1634785181 + updatedAt: 1634785181 + storeHash: rtmh8fqr05 + customerId: "6046" + externalId: null + externalCustomerId: null + payerName: Check + payerCustomerId: "6046" + details: + paymentDetails: + memo: "1" + transactionType: Paid + paymentType: Offline + referenceNumber: "1" + paymentId: 116 + total: + code: USD + value: "1.0000" + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + payerName: + type: string + minLength: 1 + payerCustomerId: + type: string + minLength: 1 + details: + type: object + properties: + paymentDetails: + type: object + required: + - memo + properties: + memo: + type: string + minLength: 1 + required: + - paymentDetails + transactionType: + type: string + minLength: 1 + paymentType: + type: string + minLength: 1 + referenceNumber: + type: string + minLength: 1 + paymentId: + type: number + total: + type: object + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + required: + - code + - value + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - payerName + - payerCustomerId + - transactionType + - paymentType + - referenceNumber + - paymentId + meta: + type: object + required: + - pagination + - message + properties: + pagination: + type: object + required: + - totalCount + - offset + - limit + properties: + totalCount: + type: number + offset: + type: number + limit: + type: number + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + example-1: + value: + code: 200 + data: + - id: 85 + createdAt: 1630658187 + updatedAt: 1630658187 + storeHash: 1i6zpxpe3g + customerId: "5485" + externalId: "" + externalCustomerId: "" + payerName: k Admin + payerCustomerId: "5485" + details: + paymentDetails: + memo: "payment memo" + transactionType: Paid + paymentType: Visa ending in 1111 + referenceNumber: "375026" + paymentId: 92 + total: + code: USD + value: "122.9500" + - id: 84 + createdAt: 1630638069 + updatedAt: 1630638069 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + payerName: Cash + payerCustomerId: "5707" + details: + paymentDetails: + memo: test + transactionType: Paid + paymentType: Offline + referenceNumber: test + paymentId: 91 + total: + code: CNY + value: "0.8900" + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + operationId: get-ip-receipts + parameters: + - schema: + type: integer + exclusiveMinimum: true + minimum: 0 + in: query + name: offset + description: "Pagination offset default: 0" + style: form + - schema: + type: integer + default: 10 + minimum: 1 + maximum: 250 + in: query + name: limit + description: "Pagination limit default: 10" + - schema: + type: string + default: DESC + enum: + - DESC + - ASC + in: query + name: orderBy + description: "Allow: 'DESC', 'ASC'" + - schema: + type: string + default: createdAt + enum: + - customerId + - externalCustomerId + - paymentId + - total + - transactionType + - referenceNumber + - createdAt + - updatedAt + in: query + name: sortBy + description: The response sorted by which field + - schema: + type: string + in: query + name: q + description: 'You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".' + - schema: + type: string + enum: + - payerName + - referenceNumber + - customerId + - externalId + - externalCustomerId + in: query + name: searchBy + description: The response search by which field + - schema: + type: array + items: + type: number + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + in: query + name: "paymentStatus[]" + description: "Payment processing status. 0 means ‘Incomplete’ status, 1 means ‘Awaiting Processing’ status, 2 means ‘Processing’ status, 3 means ‘Completed’ status, 4 means ‘Refunded' status" + description: "Get receipts, with pagination data" + tags: + - Receipt + "/receipts/{receiptId}": + parameters: + - schema: + type: string + name: receiptId + in: path + required: true + description: The unique ID of the receipt. + get: + summary: Get a receipt + tags: + - Receipt + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + id: 101 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + payerName: Check + payerCustomerId: "6041" + details: + paymentDetails: + memo: k + transactionType: Paid + paymentType: Offline + referenceNumber: k + paymentId: 117 + total: + code: GBP + value: "0.7800" + meta: + message: SUCCESS + properties: + code: + type: number + data: + type: object + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - externalId + - externalCustomerId + - payerName + - payerCustomerId + - details + - transactionType + - paymentType + - referenceNumber + - paymentId + - total + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + payerName: + type: string + minLength: 1 + payerCustomerId: + type: string + minLength: 1 + details: + type: object + required: + - paymentDetails + properties: + paymentDetails: + type: object + required: + - memo + properties: + memo: + type: string + minLength: 1 + transactionType: + type: string + minLength: 1 + paymentType: + type: string + minLength: 1 + referenceNumber: + type: string + minLength: 1 + paymentId: + type: number + total: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + example-1: + value: + code: 200 + data: + id: 83 + createdAt: 1630570416 + updatedAt: 1630570416 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + payerName: Cash + payerCustomerId: "5707" + details: + paymentDetails: + memo: test + transactionType: Paid + paymentType: Offline + referenceNumber: test + paymentId: 90 + total: + code: CNY + value: "1.2000" + meta: + message: SUCCESS + "404": + $ref: "#/components/responses/Receipt404" + operationId: get-ip-receipts-receiptId + description: Get a receipt detail + delete: + summary: Delete a receipt + tags: + - Receipt + operationId: delete-ip-receipts-receiptId + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + description: Response code of a successful request. + data: + type: object + properties: + id: + type: integer + description: The unique receipt ID. + meta: + type: object + properties: + message: + type: string + description: Response message of a request + examples: + example-1: + value: + code: 200 + data: + id: 3 + meta: + message: SUCCESS + "404": + $ref: "#/components/responses/Receipt404" + description: Delete a receipt + /receipt-lines: + get: + summary: Get all receipt lines + tags: + - Receipt + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + - id: 114 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + receiptId: 101 + invoiceId: 141 + amount: + code: GBP + value: "0.7800" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000141" + paymentId: 117 + referenceNumber: k + transactionType: Paid + - id: 113 + createdAt: 1634785181 + updatedAt: 1634785181 + storeHash: rtmh8fqr05 + customerId: "6046" + externalId: null + externalCustomerId: null + receiptId: 100 + invoiceId: 134 + amount: + code: USD + value: "1.0000" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000134" + paymentId: 116 + referenceNumber: "1" + transactionType: Paid + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + receiptId: + type: number + invoiceId: + type: number + amount: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + paymentStatus: + type: number + paymentType: + type: string + minLength: 1 + invoiceNumber: + type: string + minLength: 1 + paymentId: + type: number + referenceNumber: + type: string + minLength: 1 + transactionType: + type: string + minLength: 1 + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - externalId + - externalCustomerId + - receiptId + - invoiceId + - amount + - paymentStatus + - paymentType + - invoiceNumber + - paymentId + - referenceNumber + - transactionType + meta: + type: object + required: + - pagination + - message + properties: + pagination: + type: object + required: + - totalCount + - offset + - limit + properties: + totalCount: + type: number + offset: + type: number + limit: + type: number + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + example-1: + value: + code: 200 + data: + - id: 95 + createdAt: 1630658187 + updatedAt: 1630658187 + storeHash: 1i6zpxpe3g + customerId: "5485" + externalId: "" + externalCustomerId: "" + receiptId: 85 + invoiceId: 38 + amount: + code: USD + value: "122.9500" + paymentStatus: 1 + paymentType: Visa ending in 1111 + invoiceNumber: "00000038" + paymentId: 92 + referenceNumber: "375026" + transactionType: Paid + - id: 94 + createdAt: 1630638069 + updatedAt: 1630638069 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + receiptId: 84 + invoiceId: 14 + amount: + code: CNY + value: "0.0900" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000014" + paymentId: 91 + referenceNumber: test + transactionType: Paid + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + operationId: get-ip-receipt-lines + parameters: + - schema: + type: integer + minimum: 0 + in: query + name: offset + description: "Pagination offset default: 0" + - schema: + type: integer + minimum: 1 + maximum: 250 + default: 10 + in: query + name: limit + description: "Pagination limit default: 10" + - schema: + type: string + enum: + - DESC + - ASC + default: DESC + in: query + name: orderBy + description: "Allow: 'DESC', 'ASC'" + - schema: + type: array + items: + type: number + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + in: query + name: "paymentStatus[]" + description: "Payment processing status. 0 means ‘Incomplete’ status, 1 means ‘Awaiting Processing’ status, 2 means ‘Processing’ status, 3 means ‘Completed’ status, 4 means ‘Refunded' status" + - schema: + type: string + in: query + name: q + description: 'You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".' + - schema: + type: string + enum: + - customerId + - externalId + - externalCustomerId + - payerName + - payerCustomerId + - referenceNumber + - invoiceId + in: query + name: searchBy + description: The response search by which field + - schema: + type: string + default: createdAt + enum: + - customerId + - externalCustomerId + - receiptId + - invoiceId + - amount + - createdAt + - updatedAt + in: query + name: sortBy + description: The response sorted by which field + description: "Get all receipt lines, with pagination data" + "/receipts/{receiptId}/lines": + get: + summary: Get lines of a receipt + tags: + - Receipt + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + - id: 114 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + receiptId: 101 + invoiceId: 141 + amount: + code: GBP + value: "0.7800" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000141" + paymentId: 117 + referenceNumber: k + transactionType: Paid + meta: + pagination: + totalCount: 1 + offset: 0 + limit: 10 + message: SUCCESS + properties: + code: + type: number + data: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + receiptId: + type: number + invoiceId: + type: number + amount: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + paymentStatus: + type: number + paymentType: + type: string + minLength: 1 + invoiceNumber: + type: string + minLength: 1 + paymentId: + type: number + referenceNumber: + type: string + minLength: 1 + transactionType: + type: string + minLength: 1 + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - externalId + - externalCustomerId + - receiptId + - invoiceId + - amount + - paymentStatus + - paymentType + - invoiceNumber + - paymentId + - referenceNumber + - transactionType + meta: + type: object + required: + - pagination + - message + properties: + pagination: + type: object + required: + - totalCount + - offset + - limit + properties: + totalCount: + type: number + offset: + type: number + limit: + type: number + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + example-1: + value: + code: 200 + data: + - id: 92 + createdAt: 1630570416 + updatedAt: 1630570416 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + receiptId: 83 + invoiceId: 19 + amount: + code: CNY + value: "0.7000" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000019" + paymentId: 90 + referenceNumber: test + transactionType: Paid + - id: 91 + createdAt: 1630570416 + updatedAt: 1630570416 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + receiptId: 83 + invoiceId: 22 + amount: + code: CNY + value: "0.5000" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000022" + paymentId: 90 + referenceNumber: test + transactionType: Paid + meta: + pagination: + totalCount: 2 + offset: 0 + limit: 10 + message: SUCCESS + "404": + $ref: "#/components/responses/Receipt404" + operationId: get-ip-lines-of-receipt + parameters: + - schema: + type: integer + minimum: 0 + in: query + name: offset + description: "Pagination offset default: 0" + - schema: + type: integer + minimum: 1 + maximum: 250 + default: 10 + in: query + name: limit + description: "Pagination limit default: 10" + - schema: + type: string + enum: + - DESC + - ASC + default: DESC + in: query + name: orderBy + description: "Allow: 'DESC', 'ASC'" + - schema: + type: array + items: + type: number + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + in: query + name: "paymentStatus[]" + description: "Payment processing status. 0 means ‘Incomplete’ status, 1 means ‘Awaiting Processing’ status, 2 means ‘Processing’ status, 3 means ‘Completed’ status, 4 means ‘Refunded' status" + - schema: + type: string + in: query + name: q + description: 'You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".' + - schema: + type: string + enum: + - customerId + - externalId + - externalCustomerId + - payerName + - payerCustomerId + - referenceNumber + - invoiceId + in: query + name: searchBy + description: The response search by which field + - schema: + type: string + default: createdAt + enum: + - customerId + - externalCustomerId + - receiptId + - invoiceId + - amount + - createdAt + - updatedAt + in: query + name: sortBy + description: The response sorted by which field + description: "Get lines of a receipt, with pagination data" + parameters: + - schema: + type: string + name: receiptId + in: path + required: true + description: The unique ID of the receipt. + "/receipts/{receiptId}/lines/{receiptLineId}": + parameters: + - schema: + type: string + name: receiptId + in: path + required: true + description: The unique ID of the receipt. + - schema: + type: string + name: receiptLineId + in: path + required: true + description: The unique ID of the receipt line. + get: + summary: Get a receipt line detail + tags: + - Receipt + responses: + "200": + description: OK + content: + application/json: + schema: + description: "" + type: object + x-examples: + example-1: + code: 200 + data: + id: 114 + createdAt: 1635932127 + updatedAt: 1635932127 + storeHash: rtmh8fqr05 + customerId: "6041" + externalId: null + externalCustomerId: null + receiptId: 101 + invoiceId: 141 + amount: + code: GBP + value: "0.7800" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000141" + paymentId: 117 + referenceNumber: k + transactionType: Paid + meta: + message: SUCCESS + properties: + code: + type: number + data: + type: object + required: + - id + - createdAt + - updatedAt + - storeHash + - customerId + - externalId + - externalCustomerId + - receiptId + - invoiceId + - amount + - paymentStatus + - paymentType + - invoiceNumber + - paymentId + - referenceNumber + - transactionType + properties: + id: + type: number + createdAt: + type: number + updatedAt: + type: number + storeHash: + type: string + minLength: 1 + customerId: + type: string + minLength: 1 + externalId: + type: string + nullable: true + externalCustomerId: + type: string + nullable: true + receiptId: + type: number + invoiceId: + type: number + amount: + type: object + required: + - code + - value + properties: + code: + type: string + minLength: 1 + value: + type: string + minLength: 1 + paymentStatus: + type: number + paymentType: + type: string + minLength: 1 + invoiceNumber: + type: string + minLength: 1 + paymentId: + type: number + referenceNumber: + type: string + minLength: 1 + transactionType: + type: string + minLength: 1 + meta: + type: object + required: + - message + properties: + message: + type: string + minLength: 1 + required: + - code + - data + - meta + examples: + example-1: + value: + code: 200 + data: + id: 92 + createdAt: 1630570416 + updatedAt: 1630570416 + storeHash: 1i6zpxpe3g + customerId: "5707" + externalId: "" + externalCustomerId: "" + receiptId: 83 + invoiceId: 19 + amount: + code: CNY + value: "0.7000" + paymentStatus: 3 + paymentType: Offline + invoiceNumber: "00000019" + paymentId: 90 + referenceNumber: test + transactionType: Paid + meta: + message: SUCCESS + operationId: get-ip-receipts-receiptId-lines-receiptLineId + description: Get a receipt line detail + delete: + summary: Delete a receipt line + tags: + - Receipt + operationId: delete-ip-receipts-receiptId-lines-receiptLineId + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + code: + type: number + description: Response code of a successful request. + data: + type: object + properties: + id: + type: integer + description: The unique ID of the receipt line. + meta: + type: object + properties: + message: + type: string + description: Response message of the request + examples: + example-1: + value: + code: 200 + data: + id: 92 + meta: + message: SUCCESS + description: Delete a receipt line From 6fb335df29e57950056b8e6177d61eec7470b0b3 Mon Sep 17 00:00:00 2001 From: Lucki2501 <120939817+Lucki2501@users.noreply.github.com> Date: Fri, 27 Sep 2024 15:45:59 +0100 Subject: [PATCH 08/17] Add copy of order_source for POST/PUT request params (#361) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copied existing content for `order_source` attribute to show as request param for POST/PUT requests. # [DEVDOCS-6008] `order_source` missing from request parameters ## What changed? * Addition of `order_source` as a request parameter for Order [POST](https://developer.bigcommerce.com/docs/rest-management/orders#create-an-order)/[PUT ](https://developer.bigcommerce.com/docs/rest-management/orders#update-an-order) requests. * Added in order_Put an order_Shared YAML objects. ## Release notes draft * Addition of `order_source` as a request parameter for Order [POST](https://developer.bigcommerce.com/docs/rest-management/orders#create-an-order)/[PUT ](https://developer.bigcommerce.com/docs/rest-management/orders#update-an-order) requests. ## Anything else? * Twined with DEVDOCS-6009: Re-work of order_source parameter description [DEVDOCS-6008]: https://bigcommercecloud.atlassian.net/browse/DEVDOCS-6008?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- reference/orders.v2.oas2.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/reference/orders.v2.oas2.yml b/reference/orders.v2.oas2.yml index 513278f12..b810ced0e 100644 --- a/reference/orders.v2.oas2.yml +++ b/reference/orders.v2.oas2.yml @@ -3788,6 +3788,17 @@ components: description: Amount of discount for this transaction. The value can't be negative. (Float, Float-As-String, Integer) example: '0.0000' type: string + order_source: + description: |- + The `order_source` reflects the origin of the order. It will indicate whether the order was created by one of the following: + * storefront + * control panel + * manual order + * /v2/orders API + * Checkout API + * or by an integration with an external platform such as Facebook by Meta or Amazon. + example: 'www' + type: string ebay_order_id: description: If the order was placed through eBay, the eBay order number will be included. Otherwise, the value will be `0`. example: '0' @@ -4465,6 +4476,17 @@ components: description: Amount of discount for this transaction. The value can't be negative. (Float, Float-As-String, Integer) example: '0.0000' type: string + order_source: + description: |- + The `order_source` reflects the origin of the order. It will indicate whether the order was created by one of the following: + * storefront + * control panel + * manual order + * /v2/orders API + * Checkout API + * or by an integration with an external platform such as Facebook by Meta or Amazon. + example: 'www' + type: string ebay_order_id: description: If the order was placed through eBay, the eBay order number will be included. Otherwise, the value will be `0`. example: '0' From 5292a57762bfa164907288bce6bac4887dd3e180 Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Mon, 30 Sep 2024 08:11:40 -0500 Subject: [PATCH 09/17] Issue-522 (#551) #Issue-522 ## What changed? Correct the first Update an Order request example ## Release notes draft Big Fix ## Anything else? ping {names} --- reference/orders.v2.oas2.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/reference/orders.v2.oas2.yml b/reference/orders.v2.oas2.yml index b810ced0e..592dd28f8 100644 --- a/reference/orders.v2.oas2.yml +++ b/reference/orders.v2.oas2.yml @@ -146,6 +146,7 @@ paths: price_inc_tax: 50 price_ex_tax: 45 - product_id: 184 + quanity: 1 product_options: - id: 200 value: '180' From 07cc5f7cc440990e87430c6333a732b27b2897bc Mon Sep 17 00:00:00 2001 From: JamessenLiu <49837274+JamessenLiu@users.noreply.github.com> Date: Mon, 30 Sep 2024 21:36:20 +0800 Subject: [PATCH 10/17] B2B-1322: [update] remove old version extra fields (#540) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [B2B-1322](https://bigcommercecloud.atlassian.net/browse/B2B-1322) ## What changed? The old version of extra fields is now hardly used by any merchants, so it is necessary to remove the relevant fields and descriptions from the B2B Edition documentation. * Remove old version extra fields, Including extraInt, extraStr, etc; * Added descriptions of the new version of extraFields to some documents, which were missing in the current documentation. ## Release notes draft N/A ## Anything else? ping {names} [B2B-1322]: https://bigcommercecloud.atlassian.net/browse/B2B-1322?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- .../b2b-edition/models/order/order-extra.yaml | 74 ----- docs/b2b-edition/specs/api-v2/openAPI.yaml | 286 ------------------ .../specs/api-v3/company/company.yaml | 60 +--- .../b2b-edition/specs/api-v3/order/order.yaml | 183 ++--------- .../specs/storefront/app/company.yaml | 121 -------- .../specs/storefront/storefront.yaml | 114 ------- .../specs/storefront/storefront/order.yaml | 94 +++--- 7 files changed, 63 insertions(+), 869 deletions(-) delete mode 100644 docs/b2b-edition/models/order/order-extra.yaml diff --git a/docs/b2b-edition/models/order/order-extra.yaml b/docs/b2b-edition/models/order/order-extra.yaml deleted file mode 100644 index b2bea297c..000000000 --- a/docs/b2b-edition/models/order/order-extra.yaml +++ /dev/null @@ -1,74 +0,0 @@ -title: orderExtra -type: object -example: - extraInt1: 42 - extraInt2: 42 - extraInt3: 42 - extraInt4: 42 - extraInt5: 42 - extraStr1: customize additional information - extraStr2: customize additional information - extraStr3: customize additional information - extraStr4: customize additional information - extraStr5: customize additional information - extraText: customize additional information - extraInfo: - addressExtraFields: - shippingAddressExtraFields: - - fieldName: test - fieldValue: test - billingAddressExtraFields: - - fieldName: test - fieldValue: test -properties: - extraInt1: - type: integer - description: Extra field of this order - example: 42 - extraInt2: - type: integer - description: Extra field of this order - example: 42 - extraInt3: - type: integer - description: Extra field of this order - example: 42 - extraInt4: - type: integer - description: Extra field of this order - example: 42 - extraInt5: - type: integer - description: Extra field of this order - example: 42 - extraStr1: - type: string - description: Extra string field of this order - example: customize additional information - extraStr2: - type: string - description: Extra string field of this order - example: customize additional information - extraStr3: - type: string - description: Extra string field of this order - example: customize additional information - extraStr4: - type: string - description: Extra string field of this order - example: customize additional information - extraStr5: - type: string - description: Extra string field of this order - example: customize additional information - extraText: - type: string - description: Extra text field of this order - example: customize additional information - extraInfo: - description: Extra info of this order such as address extra fields - example: customize additional information - oneOf: - - type: string - - type: object -x-internal: false diff --git a/docs/b2b-edition/specs/api-v2/openAPI.yaml b/docs/b2b-edition/specs/api-v2/openAPI.yaml index 632f2404a..e16e0896a 100644 --- a/docs/b2b-edition/specs/api-v2/openAPI.yaml +++ b/docs/b2b-edition/specs/api-v2/openAPI.yaml @@ -234,59 +234,6 @@ paths: type: string fieldValue: type: string - extraInt1: - type: number - description: "The default extra integer field, you can also use\ - \ this field to create a company with it.(include extraInt1\ - \ ~ extraInt5, extraStr1 ~ extraStr5, extraText) \n\n But there\ - \ is an important point you need to know. After the B3 team\ - \ helped you configure the custom extra fields, if you still\ - \ need to use these default fields, you need to know the correspondence\ - \ between the custom extra fields and the default extra fields.\ - \ Otherwise, when you pass in both custom and default extra\ - \ fields, if the custom extra field is bound to the default\ - \ extra field you pass in, the value of the custom extra field\ - \ will override the default extra field." - extraInt2: - type: number - description: "Company create extra integer value, please refer\ - \ to the description of extraInt1 above." - extraInt3: - type: number - description: "Company create extra integer value, please refer\ - \ to the description of extraInt1 above." - extraInt4: - type: number - description: "Company create extra integer value, please refer\ - \ to the description of extraInt1 above." - extraInt5: - type: number - description: "Company create extra integer value, please refer\ - \ to the description of extraInt1 above." - extraStr1: - type: string - description: "Company create extra string value, please refer\ - \ to the description of extraInt1 above." - extraStr2: - type: string - description: "Company create extra string value, please refer\ - \ to the description of extraInt1 above." - extraStr3: - type: string - description: "Company create extra string value, please refer\ - \ to the description of extraInt1 above." - extraStr4: - type: string - description: "Company create extra string value, please refer\ - \ to the description of extraInt1 above." - extraStr5: - type: string - description: "Company create extra string value, please refer\ - \ to the description of extraInt1 above." - extraText: - type: string - description: "Company create extra text value, please refer to\ - \ the description of extraInt1 above." phoneNumber: type: string state: @@ -481,7 +428,6 @@ paths: totalIncTax: type: number description: Total incTax - - $ref: '#/components/schemas/order-extra' required: true responses: "200": @@ -1948,59 +1894,6 @@ paths: type: string fieldValue: type: string - extraInt1: - type: number - description: "The default extra integer field, you can also use\ - \ this field to create a company with it.(include extraInt1 ~\ - \ extraInt5, extraStr1 ~ extraStr5, extraText) \n\n But there\ - \ is an important point you need to know. After the B3 team helped\ - \ you configure the custom extra fields, if you still need to\ - \ use these default fields, you need to know the correspondence\ - \ between the custom extra fields and the default extra fields.\ - \ Otherwise, when you pass in both custom and default extra fields,\ - \ if the custom extra field is bound to the default extra field\ - \ you pass in, the value of the custom extra field will override\ - \ the default extra field." - extraInt2: - type: number - description: "Company update extra integer value, please refer to\ - \ the description of extraInt1 above." - extraInt3: - type: number - description: "Company update extra integer value, please refer to\ - \ the description of extraInt1 above." - extraInt4: - type: number - description: "Company update extra integer value, please refer to\ - \ the description of extraInt1 above." - extraInt5: - type: number - description: "Company update extra integer value, please refer to\ - \ the description of extraInt1 above." - extraStr1: - type: string - description: "Company update extra string value, please refer to\ - \ the description of extraInt1 above." - extraStr2: - type: string - description: "Company update extra string value, please refer to\ - \ the description of extraInt1 above." - extraStr3: - type: string - description: "Company update extra string value, please refer to\ - \ the description of extraInt1 above." - extraStr4: - type: string - description: "Company update extra string value, please refer to\ - \ the description of extraInt1 above." - extraStr5: - type: string - description: "Company update extra string value, please refer to\ - \ the description of extraInt1 above." - extraText: - type: string - description: "Company update extra string value, please refer to\ - \ the description of extraInt1 above." phoneNumber: type: string state: @@ -2418,56 +2311,6 @@ paths: description: "Switch show extra fields, allow: 0, 1" schema: type: string - - name: extraStr1 - in: query - description: Extra field filter - schema: - type: string - - name: extraStr2 - in: query - description: Extra field filter - schema: - type: string - - name: extraStr3 - in: query - description: Extra field filter - schema: - type: string - - name: extraStr4 - in: query - description: Extra field filter - schema: - type: string - - name: extraStr5 - in: query - description: Extra field filter - schema: - type: string - - name: extraInt1 - in: query - description: Extra field filter - schema: - type: number - - name: extraInt2 - in: query - description: Extra field filter - schema: - type: number - - name: extraInt3 - in: query - description: Extra field filter - schema: - type: number - - name: extraInt4 - in: query - description: Extra field filter - schema: - type: number - - name: extraInt5 - in: query - description: Extra field filter - schema: - type: number - name: channelId in: query description: BigComerce channel id @@ -3261,7 +3104,6 @@ paths: totalIncTax: type: number description: Total incTax - - $ref: '#/components/schemas/order-extra' required: true responses: "200": @@ -5456,36 +5298,6 @@ paths: customerGroupId: type: string description: company customer group id - extraInt1: - type: number - description: Extra number - extraInt2: - type: number - description: Extra number - extraInt3: - type: number - description: Extra number - extraInt4: - type: number - description: Extra number - extraInt5: - type: number - description: Extra number - extraStr1: - type: string - description: Extra string - extraStr2: - type: string - description: Extra string - extraStr3: - type: string - description: Extra string - extraStr4: - type: string - description: Extra string - extraStr5: - type: string - description: Extra string message: type: string description: Response message @@ -5495,16 +5307,6 @@ paths: companyId: "2" companyName: ABC.LLC customerGroupId: "11" - extraInt1: 0 - extraInt2: 0 - extraInt3: 0 - extraInt4: 0 - extraInt5: 0 - extraStr1: "" - extraStr2: "" - extraStr3: "" - extraStr4: "" - extraStr5: "" message: Success "400": description: Response Bad Request @@ -6195,7 +5997,6 @@ paths: channelName: type: string description: Channel name - - $ref: '#/components/schemas/order-extra' message: type: string description: Response message @@ -6376,20 +6177,6 @@ paths: wrapping_cost_inc_tax: "0.0000" wrapping_cost_tax: "0.0000" wrapping_cost_tax_class_id: 3 - extraStr1: customize additional information - extraStr2: customize additional information - extraStr3: customize additional information - extraStr4: customize additional information - extraStr5: customize additional information - extraText: customize additional information - extraInfo: - addressExtraFields: - shippingAddressExtraFields: - - fieldName: test - fieldValue: test - billingAddressExtraFields: - - fieldName: test - fieldValue: test message: SUCCESS "404": description: Not Found Error @@ -7154,79 +6941,6 @@ components: - fieldName: string fieldValue: string x-internal: false - order-extra: - title: orderExtra - type: object - properties: - extraInt1: - type: integer - description: Extra field of this order - example: 42 - extraInt2: - type: integer - description: Extra field of this order - example: 42 - extraInt3: - type: integer - description: Extra field of this order - example: 42 - extraInt4: - type: integer - description: Extra field of this order - example: 42 - extraInt5: - type: integer - description: Extra field of this order - example: 42 - extraStr1: - type: string - description: Extra string field of this order - example: customize additional information - extraStr2: - type: string - description: Extra string field of this order - example: customize additional information - extraStr3: - type: string - description: Extra string field of this order - example: customize additional information - extraStr4: - type: string - description: Extra string field of this order - example: customize additional information - extraStr5: - type: string - description: Extra string field of this order - example: customize additional information - extraText: - type: string - description: Extra text field of this order - example: customize additional information - extraInfo: - type: object - description: Extra info of this order such as address extra fields - example: customize additional information - example: - extraInt1: 42 - extraInt2: 42 - extraInt3: 42 - extraInt4: 42 - extraInt5: 42 - extraStr1: customize additional information - extraStr2: customize additional information - extraStr3: customize additional information - extraStr4: customize additional information - extraStr5: customize additional information - extraText: customize additional information - extraInfo: - addressExtraFields: - shippingAddressExtraFields: - - fieldName: test - fieldValue: test - billingAddressExtraFields: - - fieldName: test - fieldValue: test - x-internal: false extra_field_values: title: Extra field values type: object diff --git a/docs/b2b-edition/specs/api-v3/company/company.yaml b/docs/b2b-edition/specs/api-v3/company/company.yaml index baa47ec4f..fd1933cf4 100644 --- a/docs/b2b-edition/specs/api-v3/company/company.yaml +++ b/docs/b2b-edition/specs/api-v3/company/company.yaml @@ -111,18 +111,12 @@ paths: - name: extraFields in: query description: |- - Filter the company list on extra fields. (include extraInt1 ~ extraInt5, extraStr1 ~ extraStr5 and other customizable) - - When you create the company, you can pass a value into the custom extra field configured by the B3 team. - - If you know the correspondence between the custom extra field and the default extra field, you can use the default extra field filter to obtain data. - - You can also filter by key-value pairs passed into custom fields: - https://api-b2b.bigcommerce.com/api/v2/io/companies/?extraFields=extraInt1:1&extraFields=companyTax:un42 + Filter by extra fields. style: form explode: false schema: type: array + example: extraFields=externalID:abc - schema: type: integer example: 2 @@ -252,46 +246,6 @@ paths: - isRequired - dataType - fieldType - extraInt1: - type: integer - description: Extra field of this order - example: 42 - extraInt2: - type: integer - description: Extra field of this order - example: 42 - extraInt3: - type: integer - description: Extra field of this order - example: 42 - extraInt4: - type: integer - description: Extra field of this order - example: 42 - extraInt5: - type: integer - description: Extra field of this order - example: 42 - extraStr1: - type: string - description: Extra string field of this order - example: customize additional information - extraStr2: - type: string - description: Extra string field of this order - example: customize additional information - extraStr3: - type: string - description: Extra string field of this order - example: customize additional information - extraStr4: - type: string - description: Extra string field of this order - example: customize additional information - extraStr5: - type: string - description: Extra string field of this order - example: customize additional information bcGroupId: type: integer priceListAssign: @@ -361,16 +315,6 @@ paths: fieldValue: extra_text isRequired: "0" labelName: Enter your license - extraInt1: 42 - extraInt2: 42 - extraInt3: 42 - extraInt4: 42 - extraInt5: 42 - extraStr1: customize additional information - extraStr2: customize additional information - extraStr3: customize additional information - extraStr4: customize additional information - extraStr5: customize additional information bcGroupId: 0 meta: message: SUCCESS diff --git a/docs/b2b-edition/specs/api-v3/order/order.yaml b/docs/b2b-edition/specs/api-v3/order/order.yaml index 26dbd5810..f761f37fd 100644 --- a/docs/b2b-edition/specs/api-v3/order/order.yaml +++ b/docs/b2b-edition/specs/api-v3/order/order.yaml @@ -57,7 +57,6 @@ paths: items: allOf: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/order/order.yaml - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/order/order-extra.yaml - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/extra_fields/extra_field_values.yaml type: object examples: @@ -103,19 +102,12 @@ paths: status: completed customStatus: my-completed money: '{"currency_location": "left", "currency_token": "$", "decimal_token": ".", "decimal_places": 2, "thousands_token": ","}' - extraInt1: 42 - extraInt2: 42 - extraInt3: 42 - extraInt4: 42 - extraInt5: 42 - extraStr1: customize additional information - extraStr2: customize additional information - extraStr3: customize additional information - extraStr4: customize additional information - extraStr5: customize additional information - extraText: customize additional information channelId: 1 channelName: string + extraFields: [{ + "fieldName": "test field", + "fieldValue": "test" + }] operationId: get-orders security: - authToken: [] @@ -162,81 +154,6 @@ paths: in: query name: showExtra description: Show extra field in response - - schema: - type: integer - format: int32 - example: 42 - in: query - name: extraInt1 - description: '**Order query extra integer value, you can use this value to filter the order list.(include extraInt1 ...extraInt5, extraStr1 ...extraStr5) This value may be passed into the custom extra field configured by the B3 team when you create the order. If you clearly know the correspondence between the custom extra field and the default extra field, you can use the default extra field filter to obtain data, Of course, you can also filter by key-value pairs passed into custom fields.**' - - schema: - type: integer - format: int32 - example: 42 - in: query - name: extraInt2 - description: 'Query extra int field ' - - schema: - type: integer - format: int32 - example: 42 - in: query - name: extraInt3 - description: 'Query extra int field ' - - schema: - type: integer - format: int32 - example: 42 - in: query - name: extraInt4 - description: 'Query extra int field ' - - schema: - type: integer - format: int32 - example: 42 - in: query - name: extraInt5 - description: 'Query extra int field ' - - schema: - type: string - example: don't panic - minLength: 0 - maxLength: 200 - in: query - name: extraStr1 - description: Query extra string field - - schema: - type: string - example: don't panic - minLength: 0 - maxLength: 200 - in: query - name: extraStr2 - description: Query extra string field - - schema: - type: string - example: don't panic - minLength: 0 - maxLength: 200 - in: query - name: extraStr3 - description: Query extra string field - - schema: - type: string - example: don't panic - minLength: 0 - maxLength: 200 - in: query - name: extraStr4 - description: Query extra string field - - schema: - type: string - example: don't panic - minLength: 0 - maxLength: 200 - in: query - name: extraStr5 - description: Query extra string field - schema: type: integer example: 1 @@ -266,7 +183,6 @@ paths: data: allOf: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/order/order.yaml - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/order/order-extra.yaml description: Successful created examples: example-1: @@ -290,17 +206,6 @@ paths: money: '{"currency_location": "left", "currency_token": "$", "decimal_token": ".", "decimal_places": 2, "thousands_token": ","}' id: 1 channelName: msf1 - extraInt1: 42 - extraInt2: 42 - extraInt3: 42 - extraInt4: 42 - extraInt5: 42 - extraStr1: customize additional information - extraStr2: customize additional information - extraStr3: customize additional information - extraStr4: customize additional information - extraStr5: customize additional information - extraText: customize additional information '400': $ref: '#/components/responses/400' description: Create an order @@ -323,7 +228,6 @@ paths: required: - bcOrderId - customerId - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/order/order-extra.yaml - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/extra_fields/extra_field_values.yaml examples: example-1: @@ -331,25 +235,10 @@ paths: bcOrderId: 0 customerId: 0 poNumber: bc156 - extraInt1: 42 - extraInt2: 42 - extraInt3: 42 - extraInt4: 42 - extraInt5: 42 - extraStr1: don't panic - extraStr2: don't panic - extraStr3: don't panic - extraStr4: don't panic - extraStr5: don't panic - extraText: don't panic - extraInfo: - addressExtraFields: - shippingAddressExtraFields: - - fieldName: test - fieldValue: test - billingAddressExtraFields: - - fieldName: test - fieldValue: test + extraFields: [{ + "fieldName": "test field", + "fieldValue": "test" + }] '/orders/{bcOrderId}': parameters: - $ref: '#/components/parameters/bcOrderId' @@ -370,7 +259,6 @@ paths: data: allOf: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/order/order.yaml - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/order/order-extra.yaml - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/extra_fields/extra_field_values.yaml examples: example-1: @@ -393,25 +281,10 @@ paths: customStatus: my-completed money: '{"currency_location": "left", "currency_token": "$", "decimal_token": ".", "decimal_places": 2, "thousands_token": ","}' id: 1 - extraInt1: 42 - extraInt2: 42 - extraInt3: 42 - extraInt4: 42 - extraInt5: 42 - extraStr1: customize additional information - extraStr2: customize additional information - extraStr3: customize additional information - extraStr4: customize additional information - extraStr5: customize additional information - extraText: customize additional information - extraInfo: - addressExtraFields: - shippingAddressExtraFields: - - fieldName: test - fieldValue: test - billingAddressExtraFields: - - fieldName: test - fieldValue: test + extraFields: [{ + "fieldName": "test field", + "fieldValue": "test" + }] channelId: 1 channelName: string '404': @@ -438,7 +311,6 @@ paths: data: allOf: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/order/order.yaml - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/order/order-extra.yaml examples: example-1: value: @@ -460,17 +332,10 @@ paths: customStatus: my-completed money: '{"currency_location": "left", "currency_token": "$", "decimal_token": ".", "decimal_places": 2, "thousands_token": ","}' id: 1 - extraInt1: 42 - extraInt2: 42 - extraInt3: 42 - extraInt4: 42 - extraInt5: 42 - extraStr1: customize additional information - extraStr2: customize additional information - extraStr3: customize additional information - extraStr4: customize additional information - extraStr5: customize additional information - extraText: customize additional information + extraFields: [{ + "fieldName": "test field", + "fieldValue": "test" + }] '404': $ref: '#/components/responses/404' description: Update order's poNumnber and extraFields. you shoud send least one field. @@ -498,23 +363,15 @@ paths: x-stoplight: id: 5l2853rc7hqzc description: Sync channel info from BC. Only can be used when MSF is enabled. - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/order/order-extra.yaml - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/extra_fields/extra_field_values.yaml examples: example-1: value: poNumber: bj256 - extraInt1: 42 - extraInt2: 42 - extraInt3: 42 - extraInt4: 42 - extraInt5: 42 - extraStr1: don't panic - extraStr2: don't panic - extraStr3: don't panic - extraStr4: don't panic - extraStr5: don't panic - extraText: don't panic + extraFields: [{ + "fieldName": "test", + "fieldValue": "test" + }] '/customers/{customerId}/orders/company': put: tags: diff --git a/docs/b2b-edition/specs/storefront/app/company.yaml b/docs/b2b-edition/specs/storefront/app/company.yaml index 24c06f232..ca0a2713b 100644 --- a/docs/b2b-edition/specs/storefront/app/company.yaml +++ b/docs/b2b-edition/specs/storefront/app/company.yaml @@ -231,17 +231,6 @@ paths: catalogName: test1 updatedAt: '1622169445' createdAt: '1598955819' - extraInt1: 0 - extraInt2: 0 - extraInt3: 0 - extraInt4: 0 - extraInt5: 0 - extraStr1: string - extraStr2: string - extraStr3: string - extraStr4: string - extraStr5: string - extraText: string pagination: totalCount: 0 offset: 0 @@ -322,56 +311,6 @@ paths: in: query name: includeExtra description: Is show extra fields in the response - - schema: - type: integer - in: query - name: extraInt1 - description: Query extra int fields 1 - - schema: - type: integer - in: query - name: extraInt2 - description: Query extra int fields 2 - - schema: - type: integer - in: query - name: extraInt3 - description: Query extra int fields 3 - - schema: - type: integer - in: query - name: extraInt4 - description: Query extra int fields 4 - - schema: - type: integer - in: query - name: extraInt5 - description: Query extra int fields 5 - - schema: - type: string - in: query - name: extraStr1 - description: Query extra string fields 1 - - schema: - type: string - in: query - name: extraStr2 - description: Query extra string fields 2 - - schema: - type: string - in: query - name: extraStr3 - description: Query extra string fields 3 - - schema: - type: string - in: query - name: extraStr4 - description: Query extra string fields 4 - - schema: - type: string - in: query - name: extraStr5 - description: Query extra string fields 5 x-internal: true parameters: [] post: @@ -505,26 +444,6 @@ paths: catalogId: type: string description: BC price list Id that company related - extraInt1: - type: integer - extraInt2: - type: integer - extraInt3: - type: integer - extraInt4: - type: integer - extraInt5: - type: integer - extraStr1: - type: string - extraStr2: - type: string - extraStr3: - type: string - extraStr4: - type: string - extraStr5: - type: string required: - companyName - companyEmail @@ -556,16 +475,6 @@ paths: extraFields: - null catalogId: string - extraInt1: 0 - extraInt2: 0 - extraInt3: 0 - extraInt4: 0 - extraInt5: 0 - extraStr1: string - extraStr2: string - extraStr3: string - extraStr4: string - extraStr5: string tags: - company x-internal: true @@ -1027,26 +936,6 @@ paths: catalogId: type: string description: BC price list Id that company related - extraInt1: - type: integer - extraInt2: - type: integer - extraInt3: - type: integer - extraInt4: - type: integer - extraInt5: - type: integer - extraStr1: - type: string - extraStr2: - type: string - extraStr3: - type: string - extraStr4: - type: string - extraStr5: - type: string required: - companyName - companyEmail @@ -1078,16 +967,6 @@ paths: extraFields: - null catalogId: string - extraInt1: 0 - extraInt2: 0 - extraInt3: 0 - extraInt4: 0 - extraInt5: 0 - extraStr1: string - extraStr2: string - extraStr3: string - extraStr4: string - extraStr5: string tags: - company x-internal: true diff --git a/docs/b2b-edition/specs/storefront/storefront.yaml b/docs/b2b-edition/specs/storefront/storefront.yaml index 54c1adcf2..bca2bbefe 100644 --- a/docs/b2b-edition/specs/storefront/storefront.yaml +++ b/docs/b2b-edition/specs/storefront/storefront.yaml @@ -4570,63 +4570,6 @@ components: updatedAt: 1620872672 uuid: 095be615 zipCode: '100000' - company-extra: - description: company extra fields model - properties: - extraInt1: - description: extra field of this company - example: 42 - type: integer - extraInt2: - description: extra field of this company - example: 42 - type: integer - extraInt3: - description: extra field of this company - example: 42 - type: integer - extraInt4: - description: extra field of this company - example: 42 - type: integer - extraInt5: - description: extra field of this company - example: 42 - type: integer - extraStr1: - description: extra string field of this company - example: don't panic - type: string - extraStr2: - description: extra string field of this company - example: don't panic - type: string - extraStr3: - description: extra string field of this company - example: don't panic - type: string - extraStr4: - description: extra string field of this company - example: don't panic - type: string - extraStr5: - description: extra string field of this company - example: don't panic - type: string - title: Company Extra Fields Model - type: object - x-examples: - example-1: - extraInt1: 42 - extraInt2: 42 - extraInt3: 42 - extraInt4: 42 - extraInt5: 42 - extraStr1: don't panic - extraStr2: don't panic - extraStr3: don't panic - extraStr4: don't panic - extraStr5: don't panic order: description: order base model properties: @@ -4729,63 +4672,6 @@ components: totalIncTax: 10.5 updatedAt: 1574999690 usdIncTax: 11 - order-extra: - description: Order extra fields model - properties: - extraInt1: - description: extra field of this order - example: 42 - type: integer - extraInt2: - description: extra field of this order - example: 42 - type: integer - extraInt3: - description: extra field of this order - example: 42 - type: integer - extraInt4: - description: extra field of this order - example: 42 - type: integer - extraInt5: - description: extra field of this order - example: 42 - type: integer - extraStr1: - description: extra string field of this order - example: don't panic - type: string - extraStr2: - description: extra string field of this order - example: don't panic - type: string - extraStr3: - description: extra string field of this order - example: don't panic - type: string - extraStr4: - description: extra string field of this order - example: don't panic - type: string - extraStr5: - description: extra string field of this order - example: don't panic - type: string - title: Order Extra Fields Model - type: object - x-examples: - example-1: - extraInt1: 42 - extraInt2: 42 - extraInt3: 42 - extraInt4: 42 - extraInt5: 42 - extraStr1: don't panic - extraStr2: don't panic - extraStr3: don't panic - extraStr4: don't panic - extraStr5: don't panic order-product: description: Order product base model properties: diff --git a/docs/b2b-edition/specs/storefront/storefront/order.yaml b/docs/b2b-edition/specs/storefront/storefront/order.yaml index b7ad274cf..81d7445c7 100644 --- a/docs/b2b-edition/specs/storefront/storefront/order.yaml +++ b/docs/b2b-edition/specs/storefront/storefront/order.yaml @@ -140,6 +140,17 @@ paths: poNumber: type: string description: PO number + extraFields: + type: array + items: + type: object + properties: + fieldName: + type: string + description: Extra field name + fieldValue: + type: string + description: Extra field value required: - orderId - companyName @@ -197,6 +208,10 @@ paths: firstName: Jo lastName: Sweet poNumber: '' + extraFields: [{ + fieldName: 'test field', + fieldValue: 'test' + }] paginator: totalCount: 1 offset: 0 @@ -336,44 +351,17 @@ paths: isSaveOrderComment: type: string description: If save order comment - extraInt1: - type: string - description: Order extra int field 1 - extraInt2: - type: string - description: Order extra int field 2 - extraInt3: - type: string - description: Order extra int field 3 - extraInt4: - type: string - description: Order extra int field 4 - extraInt5: - type: string - description: Order extra int field 5 - extraStr1: - type: string - description: Order extra str field 1 - extraStr2: - type: string - description: Order extra str field 2 - extraStr3: - type: string - description: Order extra str field 3 - extraStr4: - type: string - description: Order extra str field 4 - extraStr5: - type: string - description: Order extra str field 5 - extraText: - type: string - description: Order extra text field - extraInfo: - oneOf: - - type: string - - type: object - description: order extra info such as address extra fields + extraFields: + type: array + items: + type: object + properties: + fieldName: + type: string + description: Extra field name + fieldValue: + type: string + description: Extra field value required: - orderId description: |- @@ -763,6 +751,10 @@ paths: decimal_token: . decimal_places: 2 thousands_token: ',' + extraFields: [{ + fieldName: 'test field', + fieldValue: 'test' + }] properties: code: type: number @@ -1430,6 +1422,17 @@ paths: thousands_token: type: string minLength: 1 + extraFields: + type: array + items: + type: object + properties: + fieldName: + type: string + description: Extra field name + fieldValue: + type: string + description: Extra field value required: - id - customer_id @@ -1500,7 +1503,6 @@ paths: - shipments - poNumber - money - - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/order/order-extra.yaml required: - code - message @@ -1706,20 +1708,6 @@ paths: decimal_token: . decimal_places: 2 thousands_token: ',' - extraStr1: customize additional information - extraStr2: customize additional information - extraStr3: customize additional information - extraStr4: customize additional information - extraStr5: customize additional information - extraText: customize additional information - extraInfo: - addressExtraFields: - shippingAddressExtraFields: - - fieldName: test - fieldValue: test - billingAddressExtraFields: - - fieldName: test - fieldValue: test operationId: get-orders-orderId-details description: |- Get order detail by orderId. Please refer to [BigCommerce API](https://developer.bigcommerce.com/api-reference/store-management/orders/orders/getanorder) for detailed parameter introduction. From 64878330e84aecf2a0c5e3b63541b5fa95ce6c8f Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Mon, 30 Sep 2024 09:30:31 -0500 Subject: [PATCH 11/17] fix-all-order-statuses-table (#555) # NO TICKET See Slack conversation: https://bigcommerce.slack.com/archives/C57SQ401K/p1727594756996009 ## What changed? Fixing table ## Release notes draft Bug Fix: fix table ## Anything else? ping {names} --- reference/orders.v2.oas2.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reference/orders.v2.oas2.yml b/reference/orders.v2.oas2.yml index 592dd28f8..5311ab7e8 100644 --- a/reference/orders.v2.oas2.yml +++ b/reference/orders.v2.oas2.yml @@ -515,15 +515,16 @@ paths: Returns a Collection of All Order Statuses. **Order Status Descriptions:** + |Status ID | Name | Description | - |--|--|--| + |-|-|-| | 0 | Incomplete | An incomplete order happens when a shopper reached the payment page, but did not complete the transaction. | | 1 | Pending |Customer started the checkout process, but did not complete it. | | 2 | Shipped | Order has been shipped, but receipt has not been confirmed; seller has used the Ship Items action. | | 3 | Partially Shipped | Only some items in the order have been shipped, due to some products being pre-order only or other reasons. | | 4 | Refunded | Seller has used the Refund action. | | 5 | Cancelled | Seller has cancelled an order, due to a stock inconsistency or other reasons. | - | 6 |Declined | Seller has marked the order as declined for lack of manual payment, or other reasons. | + | 6 | Declined | Seller has marked the order as declined for lack of manual payment, or other reasons. | | 7 | Awaiting Payment | Customer has completed checkout process, but payment has yet to be confirmed. | | 8 | Awaiting Pickup | Order has been pulled, and is awaiting customer pickup from a seller-specified location. | | 9 | Awaiting Shipment | Order has been pulled and packaged, and is awaiting collection from a shipping provider. | From cd2ba097b49ad577c7e301be9ba5bb7f1193c1bf Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Thu, 3 Oct 2024 11:15:41 -0500 Subject: [PATCH 12/17] DEVDOCS-6111: [update] deprecate upsert form fields (#560) # [DEVDOCS-6111] ## What changed? deprecated the customer form fields endpoint ## Release notes draft The Upsert Customer Form Field Values endpoint is deprecated. Use [Update a Customer Address](/docs/rest-management/customers/addresses#update-a-customer-address) and [Update Customers](/docs/rest-management/customers#update-customers) endpoints instead. ## Anything else? ping {names} [DEVDOCS-6111]: https://bigcommercecloud.atlassian.net/browse/DEVDOCS-6111?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- reference/customers.v3.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/reference/customers.v3.yml b/reference/customers.v3.yml index 1b91fde77..630403006 100644 --- a/reference/customers.v3.yml +++ b/reference/customers.v3.yml @@ -1483,11 +1483,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - summary: Upsert Customer Form Field Values + summary: Upsert Customer Form Field Values (Deprecated) description: |- - Updates form field values on the Customer or Customer Address objects. Multiple form field values can be updated in one call. - - Upsert checks for an existing record, if there is none it creates the record, if there is a matching record it updates that record. + This endpoint is deprecated. Use [Update a Customer Address](/docs/rest-management/customers/addresses#update-a-customer-address) and [Update Customers](/docs/rest-management/customers#update-customers) endpoints instead. To learn more about editing form fields, see [Adding and Editing Fields in the Account Signup Form](https://support.bigcommerce.com/s/article/Editing-Form-Fields). From 99c83e1e205de9a9b6f7b52ef0c1d659955d5030 Mon Sep 17 00:00:00 2001 From: JamessenLiu <49837274+JamessenLiu@users.noreply.github.com> Date: Fri, 4 Oct 2024 03:12:24 +0800 Subject: [PATCH 13/17] B2B-1237: [update] sync recent updates from B2B Edition API. (#535) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [B2B-1327](https://bigcommercecloud.atlassian.net/browse/B2B-1327) ## What changed? * add tag for channel endpoints. Because the document did not display correctly when the tag was missing. ![image](https://github.com/user-attachments/assets/b0a0d1bd-3086-4b0f-b82d-00d26ccc45c7) * sync independent comapny docs from B2B stoplight * [Jira ticket: B2B-1201](https://bigcommercecloud.atlassian.net/browse/B2B-1201) * [origin pr](https://github.com/B3BC/boson/pull/464) * remove task section * [Jira ticket: B2B-1222](https://bigcommercecloud.atlassian.net/browse/B2B-1222) * [origin pr](https://github.com/B3BC/boson/pull/463) * add minModified query param for sales staff api * [origin pr](https://github.com/B3BC/boson/pull/456) * [Jira ticket: BUN-2720](https://bigcommercecloud.atlassian.net/browse/BUN-2720) ## Release notes draft N/A ## Anything else? ping {names} [B2B-1327]: https://bigcommercecloud.atlassian.net/browse/B2B-1327?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Traci Porter --- .../specs/api-v3/channel/channel.yaml | 6 +- .../specs/api-v3/company/company.yaml | 45 +- .../specs/api-v3/sales_staff/sales_staff.yaml | 15 + docs/b2b-edition/specs/api-v3/task/task.yaml | 407 ------------------ docs/b2b-edition/specs/api-v3/user/user.yaml | 7 +- 5 files changed, 64 insertions(+), 416 deletions(-) delete mode 100644 docs/b2b-edition/specs/api-v3/task/task.yaml diff --git a/docs/b2b-edition/specs/api-v3/channel/channel.yaml b/docs/b2b-edition/specs/api-v3/channel/channel.yaml index fe0ef4b4f..0f861b1e6 100644 --- a/docs/b2b-edition/specs/api-v3/channel/channel.yaml +++ b/docs/b2b-edition/specs/api-v3/channel/channel.yaml @@ -9,7 +9,8 @@ paths: /channels: get: summary: Get store channels - tags: [] + tags: + - channel responses: '200': description: OK @@ -88,7 +89,8 @@ paths: description: BigCommerce channel id get: summary: Get a store channel - tags: [] + tags: + - channel responses: '200': description: OK diff --git a/docs/b2b-edition/specs/api-v3/company/company.yaml b/docs/b2b-edition/specs/api-v3/company/company.yaml index fd1933cf4..1028e363d 100644 --- a/docs/b2b-edition/specs/api-v3/company/company.yaml +++ b/docs/b2b-edition/specs/api-v3/company/company.yaml @@ -392,7 +392,10 @@ paths: tags: - Company summary: Create a Company - description: Create a company + description: |- + Create a company. + * When the `independent company behavior` is enabled, the system will not automatically create a dedicated customer group for each new Company account. Instead, you can assign a customer group to a Company account as needed using the `customerGroupId` field. If the `customerGroupId` field is not provided, the B2B company will be associated with your configured default customer group. If you have not configured a default customer group, the B2B company will not be associated with any customer group, and the company users within the company will have their corresponding customer record assigned to "No Group" in BigCommerce. + * When the `independent company behavior` is turned off, a new customer group will be automatically created and associated with each new Company account. In this case, you will not use the `customerGroupId` field. operationId: post-companies requestBody: content: @@ -475,6 +478,9 @@ paths: originChannelId: type: integer description: "BigCommerce channel ID, used for BigCommerce customer origin channel ID. This field takes effect only when you do not configure the store default B2B channel." + customerGroupId: + type: integer + description: BigCommerce Customer Group ID. Used to associate a BigCommerce Customer Group to a B2B company when the independent company behavior is enabled. examples: example-1: value: @@ -810,7 +816,10 @@ paths: tags: - Company summary: Update a Company - description: Update a company's attributes + description: | + Update a company's attributes. + * When the `independent company behavior` is enabled, you can assign a customer group to a Company using the `customerGroupId` field. Once assigned, the customer group will be associated with all users within that Company. If `customerGroupId` is set to 0, the customer group association will be removed from the Company, and all users within the Company will no longer have a group assigned. The `priceListAssign` field will not take effect; please configure the price list for the customer group directly in the BigCommerce Control Panel. + * When the `independent company behavior` is turned off, the `customerGroupId` field will not take effect. You cannot change the association between B2B companies and BigCommerce customer groups. You will use the `priceListAssign` field to configure the price list assigned to the Company. operationId: put-companies-companyId parameters: - name: companyId @@ -887,6 +896,10 @@ paths: priceListId: type: integer description: BC price list ID + customerGroupId: + type: integer + description: | + BigCommerce Customer Group ID. Used to associate a BigCommerce Customer Group to a B2B company when the independent company behavior is enabled. required: false responses: "200": @@ -973,7 +986,10 @@ paths: tags: - Company summary: Delete a Company - description: Delete A Company + description: |- + Delete A Company. + * When the `independent company behavior` is turned off. Deleting a company will also delete the corresponding BigCommerce Customer Group. + * When the `independent company behavior` is enabled. Deleting a company will not affect the customer group associated with the company. operationId: delete-companies-companyId parameters: - name: companyId @@ -1056,7 +1072,10 @@ paths: tags: - Company summary: Convert from BigCommerce CustomerGroup into Company - description: Create company from bigCommerce customer group. This API is disabled for MSF store + description: |- + Create company from a BigCommerce customer group. + * This API is turned off for the MSF store. + * This API is turned off when the independent company feature is enabled. operationId: post-companies-conversion-customerGroups parameters: - name: customerGroupId @@ -1521,7 +1540,10 @@ paths: _detail: string meta: message: string - description: Bulk create companies + description: |- + Bulk create companies + * When the `independent company behavior` is enabled, the system will not automatically create a dedicated customer group for each new Company account. Instead, you can assign a customer group to a Company account as needed using the `customerGroupId` field. If the `customerGroupId` field is not provided, the B2B company will be associated with the configured default customer group. If you have not configured a default customer group, the B2B company will not be associated with any customer group, and the company users within the company will have their corresponding customer record assigned to "No Group" in BigCommerce. + * When the `independent company behavior` is turned off, a new customer group will be automatically created and associated with each new Company account. In this case, you will not use the `customerGroupId` field. security: - authToken: [] requestBody: @@ -1554,6 +1576,10 @@ paths: originChannelId: type: integer description: "BigCommerce channel ID, used for BigCommerce customer origin channel ID. This field takes effect only when you do not configure the store default b2b channel." + customerGroupId: + type: integer + description: | + BigCommerce Customer Group ID. Used to associate a BigCommerce Customer Group to a B2B company when the independent company behavior is enabled. - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/extra_fields/user_extra_field_values.yaml examples: example-1: @@ -1585,7 +1611,10 @@ paths: tags: - Company summary: Update Companies (Batch) - description: Batch update companies + description: | + Batch update companies. + * When the `independent company behavior` is enabled, you can assign a customer group to a Company using the `customerGroupId` field. Once assigned, the customer group will be associated with all users within that Company. If `customerGroupId` is set to 0, the customer group association will be removed from the Company, and all users within the Company will no longer have a group assigned. The `priceListAssign` field will not take effect; please configure the price list for the customer group directly in the BigCommerce Control Panel. + * When the `independent company behavior` is turned off, the `customerGroupId` field will not take effect. You cannot change the association between B2B companies and BigCommerce customer groups. You will use the `priceListAssign` field to configure the price list assigned to the Company. operationId: put-companies requestBody: content: @@ -1647,6 +1676,10 @@ paths: priceListId: type: integer description: BC price list ID + customerGroupId: + type: integer + description: | + BigCommerce Customer Group ID. Used to associate a BigCommerce Customer Group to a B2B company when the independent company behavior is enabled. required: - companyId examples: diff --git a/docs/b2b-edition/specs/api-v3/sales_staff/sales_staff.yaml b/docs/b2b-edition/specs/api-v3/sales_staff/sales_staff.yaml index a5518d916..afed3f507 100644 --- a/docs/b2b-edition/specs/api-v3/sales_staff/sales_staff.yaml +++ b/docs/b2b-edition/specs/api-v3/sales_staff/sales_staff.yaml @@ -64,6 +64,21 @@ paths: in: query name: companyId description: 'Unique ID of company ' + - schema: + type: integer + in: query + name: minModified + description: Minimum modified or assigned timestamp + - schema: + type: string + enum: + - updated_at + - email + default: updated_at + example: updated_at + in: query + name: sortBy + description: Sort by '/sales-staffs/{salesStaffId}': parameters: - schema: diff --git a/docs/b2b-edition/specs/api-v3/task/task.yaml b/docs/b2b-edition/specs/api-v3/task/task.yaml deleted file mode 100644 index 7c18ef156..000000000 --- a/docs/b2b-edition/specs/api-v3/task/task.yaml +++ /dev/null @@ -1,407 +0,0 @@ -openapi: '3.0.0' -info: - title: Task - version: '3.0' - description: Tasks of the batch operations -servers: - - url: 'https://api-b2b.bigcommerce.com/api/v3/io' -paths: - '/batch/tasks/{taskId}': - parameters: - - schema: - type: string - name: taskId - in: path - required: true - description: The async task identify - get: - summary: Get a task Detail - tags: - - Task - operationId: get-tasks-taskId - description: Get a task detail - parameters: [] - security: - - authToken: [] - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - x-examples: - example-1: - code: 200 - data: - createdAt: 1622618228 - updatedAt: 1622618430 - taskName: test - email: kido.zhao@bundleb2b.net - startedAt: 1622618229 - finishedAt: 1622618428 - taskType: 100 - taskStatus: 9 - resultDetailUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/test-7-1i6zpxpe3g-1622618428-result.csv' - sourceFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/test-1i6zpxpe3g-1622618227.csv' - meta: - message: SUCCESS - properties: - code: - type: number - data: - type: object - required: - - createdAt - - updatedAt - - taskName - - email - - startedAt - - finishedAt - - taskType - - taskStatus - - resultDetailUrl - - sourceFileUrl - properties: - createdAt: - type: number - updatedAt: - type: number - taskName: - type: string - minLength: 1 - email: - type: string - minLength: 1 - description: The operation user's email - startedAt: - type: number - finishedAt: - type: number - taskType: - type: number - description: The task type - taskStatus: - type: number - description: The task status - resultDetailUrl: - type: string - minLength: 1 - description: The task processing result file url - sourceFileUrl: - type: string - minLength: 1 - description: The source file url - meta: - type: object - required: - - message - properties: - message: - type: string - minLength: 1 - required: - - code - - data - - meta - examples: - example-1: - value: - code: 200 - data: - createdAt: 1622618228 - updatedAt: 1622618430 - taskName: test - email: kido.zhao@bundleb2b.net - startedAt: 1622618229 - finishedAt: 1622618428 - taskType: 100 - taskStatus: 9 - resultDetailUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/test-7-1i6zpxpe3g-1622618428-result.csv' - sourceFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/test-1i6zpxpe3g-1622618227.csv' - meta: - message: SUCCESS - '/batch/{taskCode}/tasks/{taskName}': - parameters: - - schema: - type: string - name: taskName - in: path - required: true - description: The task name the user customized - - schema: - type: string - name: taskCode - in: path - required: true - description: The task code of the task - post: - summary: Create batch operation async task - operationId: post-tasks-batch - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - x-examples: - example-1: - code: 201 - data: - companyId: '147340' - meta: - message: SUCCESS - properties: - code: - type: integer - data: - type: object - required: - - taskId - properties: - taskId: - type: integer - description: The unique task identify - meta: - type: object - required: - - message - properties: - message: - type: string - minLength: 1 - required: - - code - - data - - meta - examples: - example-1: - value: - code: 200 - data: - taskId: 479 - meta: - message: SUCCESS - '413': - description: 'Request Entity Too Large. In normal conditions, bulk create or update method support 10 entity in once request. Another case, some fields of entity over limit.' - content: - application/json: - schema: - $ref: https://raw.githubusercontent.com/bigcommerce/docs/main/docs/b2b-edition/models/utils/response-413.yaml - '422': - description: Company was not valid. This is the result of missing required fields or invalid data. See the response for more details. - content: - application/json: - schema: - description: '' - type: object - properties: - code: - type: number - data: - type: object - properties: - errors: - type: array - uniqueItems: true - minItems: 1 - items: - required: - - id - - detail - properties: - id: - type: string - minLength: 1 - detail: - type: string - minLength: 1 - required: - - errors - meta: - type: object - properties: - message: - type: string - minLength: 1 - required: - - message - required: - - code - - data - - meta - x-examples: - example-1: - code: 0 - data: - errors: - - id: string - detail: string - meta: - message: string - description: Batch task operations - security: - - authToken: [] - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - taskFile: - type: string - description: 'You should put the `taskFile` into the form, because of our API doc tool not support the file type in the form-data.' - required: - - taskFile - examples: - example-1: - value: - taskFile: task file - description: |- - There have 3 different request body for different operations. - - We need full data for the create operation; - - For update operation, need contain the updated data and resources' ID; - - And for delete operation, just need resources' ID. - - You should put the `taskFile` into the form, because of our API doc tool not support the file type in the form-data. - tags: - - Task - parameters: [] - /batch/task-codes: - get: - summary: Get module batch tasks' codes - tags: - - Task - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - x-examples: - example-1: - code: 200 - data: - - taskName: COMPANY_CREATE - taskCode: 100 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/batch_tasks_companies_create_template.csv' - - taskName: COMPANY_UPDATE - taskCode: 101 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/batch_tasks_companies_update_template.csv' - - taskName: COMPANY_DELETE - taskCode: 102 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: ADDRESS_CREATE - taskCode: 200 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: ADDRESS_UPDATE - taskCode: 201 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: ADDRESS_DELETE - taskCode: 202 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: USER_CREATE - taskCode: 300 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: USER_UPDATE - taskCode: 301 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: USER_DELETE - taskCode: 302 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - meta: - message: SUCCESS - properties: - code: - type: number - data: - type: array - uniqueItems: true - minItems: 1 - items: - type: object - properties: - taskName: - type: string - minLength: 1 - taskCode: - type: number - description: Task code for create batch task - templateFileUrl: - type: string - minLength: 1 - description: File template for create task - required: - - taskName - - taskCode - - templateFileUrl - meta: - type: object - required: - - message - properties: - message: - type: string - minLength: 1 - required: - - code - - data - - meta - examples: - example-1: - value: - code: 200 - data: - - taskName: COMPANY_CREATE - taskCode: 100 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/xxx.csv' - - taskName: COMPANY_UPDATE - taskCode: 101 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/xxx.csv' - - taskName: COMPANY_DELETE - taskCode: 102 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: ADDRESS_CREATE - taskCode: 200 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: ADDRESS_UPDATE - taskCode: 201 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: ADDRESS_DELETE - taskCode: 202 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: USER_CREATE - taskCode: 300 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: USER_UPDATE - taskCode: 301 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - - taskName: USER_DELETE - taskCode: 302 - templateFileUrl: 'https://s3-us-west-2.amazonaws.com/bundleb2b-v3.0-batch-tasks-staging/' - meta: - message: SUCCESS - operationId: get-batch-task-codes - description: 'Get all module batch task codes, use this task code to create a batch task' - security: - - authToken: [] - parameters: [] -components: - schemas: {} - securitySchemes: - authToken: - name: authToken - type: apiKey - in: header -security: - - authToken: [] -tags: - - name: Task diff --git a/docs/b2b-edition/specs/api-v3/user/user.yaml b/docs/b2b-edition/specs/api-v3/user/user.yaml index 0b80cf2ca..9cfb2dbb3 100644 --- a/docs/b2b-edition/specs/api-v3/user/user.yaml +++ b/docs/b2b-edition/specs/api-v3/user/user.yaml @@ -355,7 +355,10 @@ paths: tags: - User summary: Create a User - description: 'Create a company user, which belongs company' + description: |- + Create a company user within an existing company. + * When the `independent company behavior` is enabled, B2B Edition company accounts are the source of truth for defining a company user’s customer group assignment. If you do not configure a default customer group or the value of `customerGroupId` is 0, the B2B company will not be associated with any customer group, and the company users within the company will have their corresponding customer record assigned to "No Group" in BigCommerce. + * When the `independent company behavior` is turned off, the BigCommerce customer record’s customer group assignment will be the source of truth for defining a company user’s company assignment. operationId: companies_users_create requestBody: content: @@ -507,6 +510,8 @@ paths: description: |- Create company users in batch. All of the user should be in same company. + * When the `independent company behavior` is enabled, B2B Edition company accounts are the source of truth for defining a company user’s customer group assignment. If you do not configure a default customer group or the value of `customerGroupId` is 0, the B2B company will not be associated with any customer group, and the company users within the company will have their corresponding customer record assigned to "No Group" in BigCommerce. + * When the `independent company behavior` is turned off, the BigCommerce customer record’s customer group assignment will be the source of truth for defining a company user’s company assignment. operationId: companies_users_bulk_create_create requestBody: content: From 88ac21e032e9c44735b43e893485aa83d63ba21d Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Thu, 3 Oct 2024 14:14:51 -0500 Subject: [PATCH 14/17] Updated security b2b authentication details (#557) # [DEVDOCS-5655] ## What changed? Updating security information ## Release notes draft n/a ## Anything else? ping {names} [DEVDOCS-5655]: https://bigcommercecloud.atlassian.net/browse/DEVDOCS-5655?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- .../specs/storefront/storefront/catalog.yaml | 16 +++++++++--- .../storefront/storefront/sales-rep.yaml | 26 +++++++++---------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/docs/b2b-edition/specs/storefront/storefront/catalog.yaml b/docs/b2b-edition/specs/storefront/storefront/catalog.yaml index 7766df704..143a8c7e5 100644 --- a/docs/b2b-edition/specs/storefront/storefront/catalog.yaml +++ b/docs/b2b-edition/specs/storefront/storefront/catalog.yaml @@ -3,10 +3,14 @@ info: title: Catalog version: '1.0' description: The Catalog refers to a store’s collection of physical and digital products. + contact: + name: BigCommerce + url: 'https://www.bigcommerce.com' + email: support@bigcommerce.com servers: - url: 'https://api-b2b.bigcommerce.com/api/v2' security: - - authToken: [] + - BearerToken: [] paths: /catalogs/variants: get: @@ -364,9 +368,13 @@ paths: components: schemas: {} securitySchemes: - authToken: - name: authToken - description: Include the `authToken` in a header parameter. + BearerToken: + name: BearerToken + description: |- + ### Authentication header + | Header | Argument | Description | + |:-------|:---------|:------------| + |`Authorization`|`Bearer {{B2B_JWT_TOKEN}}`| Obtained using the [BigCommerce Current Customer API](/docs/rest-authentication/current-customer) endpoint. | type: apiKey in: header tags: diff --git a/docs/b2b-edition/specs/storefront/storefront/sales-rep.yaml b/docs/b2b-edition/specs/storefront/storefront/sales-rep.yaml index f0de01fae..dc6829999 100644 --- a/docs/b2b-edition/specs/storefront/storefront/sales-rep.yaml +++ b/docs/b2b-edition/specs/storefront/storefront/sales-rep.yaml @@ -3,8 +3,14 @@ info: title: Super Admin version: '1.0' description: Super Admin is a group of sales representatives assigned to the company. + contact: + name: BigCommerce + url: 'https://www.bigcommerce.com' + email: support@bigcommerce.com servers: - url: 'https://api-b2b.bigcommerce.com/api/v2' +security: + - BearerToken: [] paths: '/sales-reps/{userId}/companies/{companyId}/begin-masq': parameters: @@ -84,8 +90,6 @@ paths: Equivalent Storefront GraphQL API Mutation: `superAdminBeginMasquerade`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Super Admin - security: - - authToken: [] '/sales-reps/{userId}/companies/{companyId}/end-masq': parameters: - schema: @@ -140,8 +144,6 @@ paths: Equivalent Storefront GraphQL API Mutation: `superAdminEndMasquerade`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Super Admin - security: - - authToken: [] '/sales-reps/{customerId}/companies/masquerading': parameters: - schema: @@ -456,8 +458,6 @@ paths: Equivalent Storefront GraphQL API Query: `superAdminCompanies`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Super Admin - security: - - authToken: [] parameters: - schema: type: integer @@ -540,18 +540,18 @@ paths: description: Update super admin assign company. tags: - Super Admin - security: - - authToken: [] x-internal: true components: schemas: {} securitySchemes: - authToken: - name: authToken - description: Include the `authToken` in a header parameter. + BearerToken: + name: BearerToken + description: |- + ### Authentication header + | Header | Argument | Description | + |:-------|:---------|:------------| + |`Authorization`|`Bearer {{B2B_JWT_TOKEN}}`| Obtained using the [BigCommerce Current Customer API](/docs/rest-authentication/current-customer) endpoint. | type: apiKey in: header -security: - - authToken: [] tags: - name: Super Admin From e5a39fc4690c5d596015bf7537b5435677085966 Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Thu, 3 Oct 2024 14:20:05 -0500 Subject: [PATCH 15/17] DEVDOCS-5655: [Update]b2b-shopping (#544) # [DEVDOCS-5655] ## What changed? Updated the shopping.yml file The response body is missing in the [Update shopping list ](https://developer.bigcommerce.com/b2b-edition/apis/rest-storefront/shopping-list/shopping#update-shopping-list) endpoint. ## Release notes draft N/a ## Anything else? ping {names} [DEVDOCS-5655]: https://bigcommercecloud.atlassian.net/browse/DEVDOCS-5655?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- .../specs/storefront/storefront/shopping.yaml | 77 ++++++++++++------- .../specs/storefront/storefront/store.yaml | 21 +++-- 2 files changed, 64 insertions(+), 34 deletions(-) diff --git a/docs/b2b-edition/specs/storefront/storefront/shopping.yaml b/docs/b2b-edition/specs/storefront/storefront/shopping.yaml index 4bc47265b..68357f1ca 100644 --- a/docs/b2b-edition/specs/storefront/storefront/shopping.yaml +++ b/docs/b2b-edition/specs/storefront/storefront/shopping.yaml @@ -5,6 +5,8 @@ info: description: Shopping related information. servers: - url: 'https://api-b2b.bigcommerce.com/api/v2' +security: + - BearerToken: [] paths: /shoppinglists: get: @@ -175,7 +177,7 @@ paths: description: Order by description: |- Get all shopping lists. -
Equivalent Storefront GraphQL API Query: `shoppingLists`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Query: `shoppingLists`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Shopping post: @@ -257,17 +259,45 @@ paths: examples: {} description: |- Create a shopping list. -
Equivalent Storefront GraphQL API Mutation: `shoppingListsCreate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `shoppingListsCreate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Shopping - security: - - authToken: [] put: summary: Update Shopping List operationId: put-shoppinglists responses: '200': description: OK + content: + application/json: + schema: + description: '' + x-examples: + example-1: + code: 200 + message: SUCCESS + data: + shoplistId: 1 + type: object + properties: + code: + type: number + message: + type: string + minLength: 1 + data: + type: object + required: + - code + - message + - data + examples: + example-1: + value: + code: 200 + message: SUCCESS + data: + shoplistId: 1 requestBody: content: application/json: @@ -307,11 +337,9 @@ paths: - id description: |- Update a shopping list. -
Equivalent Storefront GraphQL API Mutation: `shoppingListsUpdate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `shoppingListsUpdate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Shopping - security: - - authToken: [] /shoppinglists/lists: get: summary: Get Shopping List's ID and Name @@ -501,11 +529,9 @@ paths: checkAddStatus: true description: |- Add items to an existed shopping list. -
Equivalent Storefront GraphQL API Mutation: `shoppingListsItemsCreate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `shoppingListsItemsCreate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Shopping - security: - - authToken: [] put: summary: Update Shopping List Items operationId: put-shoppinglists-items @@ -601,11 +627,9 @@ paths: - variantId description: |- Update shopping lists items. -
Equivalent Storefront GraphQL API Mutation: `shoppingListsItemsUpdate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `shoppingListsItemsUpdate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Shopping - security: - - authToken: [] /shoppinglists/items-extension: get: summary: Get Shopping List Items Extension @@ -796,7 +820,7 @@ paths: type: number channelId: type: integer - description: B2B Edition channel id + description: B2B Edition channel ID channelName: type: string description: Store Channel name @@ -902,7 +926,7 @@ paths: description: the field to sort by description: |- Get a shopping list detail information. -
Equivalent Storefront GraphQL API Query: `shoppingList`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Query: `shoppingList`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Shopping '/shoppinglists/{shoppingListId}/items/{itemId}': @@ -956,11 +980,9 @@ paths: data: {} description: |- Delete shopping list item using shoppingListId and itemId. -
Equivalent Storefront GraphQL API Mutation: `shoppingListsItemsDelete`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `shoppingListsItemsDelete`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Shopping - security: - - authToken: [] '/shoppinglists/{shoppingListId}': parameters: - schema: @@ -1006,11 +1028,9 @@ paths: data: {} description: |- Delete a shopping list. -
Equivalent Storefront GraphQL API Mutation: `shoppingListsDelete`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `shoppingListsDelete`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Shopping - security: - - authToken: [] /shoppinglists/duplicate: post: summary: Duplicate a Shopping List @@ -1056,7 +1076,7 @@ paths: shoppingListId: '443' description: |- Duplicate a shopping list. -
Equivalent Storefront GraphQL API Mutation: `shoppingListsDuplicate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `shoppingListsDuplicate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). requestBody: content: application/json: @@ -1084,16 +1104,17 @@ paths: examples: {} tags: - Shopping - security: - - authToken: [] components: schemas: {} securitySchemes: - authToken: - name: authToken + BearerToken: + name: BearerToken + description: |- + ### Authentication header + | Header | Argument | Description | + |:-------|:---------|:------------| + |`Authorization`|`Bearer {{B2B_JWT_TOKEN}}`| Obtained using the [BigCommerce Current Customer API](/docs/rest-authentication/current-customer) endpoint. | type: apiKey in: header -security: - - authToken: [] tags: - name: Shopping diff --git a/docs/b2b-edition/specs/storefront/storefront/store.yaml b/docs/b2b-edition/specs/storefront/storefront/store.yaml index d5e12b2b7..9eeb28e8f 100644 --- a/docs/b2b-edition/specs/storefront/storefront/store.yaml +++ b/docs/b2b-edition/specs/storefront/storefront/store.yaml @@ -3,8 +3,14 @@ info: title: Store version: '1.0' description: Store shopping information settings. + contact: + name: BigCommerce + url: 'https://www.bigcommerce.com' + email: support@bigcommerce.com servers: - url: 'https://api-b2b.bigcommerce.com/api/v2' +security: + - BearerToken: [] paths: /stores/order-statuses: get: @@ -161,7 +167,7 @@ paths: operationId: get-stores-order-statuses description: |- Get a list of all statuses of the order, including status codes and custom status names. -
Equivalent Storefront GraphQL API Query: `orderStatuses`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).
+ Equivalent Storefront GraphQL API Query: `orderStatuses`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - Store /stores/currencies: @@ -383,7 +389,7 @@ paths: operationId: get-stores-currencies description: |- Get store currencies config. -
Equivalent Storefront GraphQL API Query: `currencies`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).
+ Equivalent Storefront GraphQL API Query: `currencies`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). parameters: - schema: type: string @@ -401,11 +407,14 @@ paths: components: schemas: {} securitySchemes: - authToken: - name: authToken + BearerToken: + name: BearerToken + description: |- + ### Authentication header + | Header | Argument | Description | + |:-------|:---------|:------------| + |`Authorization`|`Bearer {{B2B_JWT_TOKEN}}`| Obtained using the [BigCommerce Current Customer API](/docs/rest-authentication/current-customer) endpoint. | type: apiKey in: header -security: - - authToken: [] tags: - name: Store From e302f0476d92059180350ca36176f332edb5e7bc Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Thu, 3 Oct 2024 14:29:42 -0500 Subject: [PATCH 16/17] DEVDOCS-5655:[update]b2b-rfq (#543) # [DEVDOCS-5655] ## What changed? Updated the rfq.yml I noticed that the Delete a Quote endpoint does not appear in the Stoplight docs. - **MOVED to SSOT repo** Also the Response body is missing from Get Quote Config. Can you add the response? ## Release notes draft N/A ## Anything else? ping {names} [DEVDOCS-5655]: https://bigcommercecloud.atlassian.net/browse/DEVDOCS-5655?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Nate Stewart --- .../specs/storefront/storefront/rfq.yaml | 228 ++++++++---------- 1 file changed, 107 insertions(+), 121 deletions(-) diff --git a/docs/b2b-edition/specs/storefront/storefront/rfq.yaml b/docs/b2b-edition/specs/storefront/storefront/rfq.yaml index fae0bc5fa..c6a7e4895 100644 --- a/docs/b2b-edition/specs/storefront/storefront/rfq.yaml +++ b/docs/b2b-edition/specs/storefront/storefront/rfq.yaml @@ -3,8 +3,15 @@ info: title: RFQ version: '1.0' description: 'A new set of API endpoints for quote, which new data structure is used at the bottom. For more comprehensive and easy to use features.' + termsOfService: 'https://www.bigcommerce.com/terms' + contact: + name: BigCommerce + url: 'https://www.bigcommerce.com' + email: support@bigcommerce.com servers: - url: 'https://api-b2b.bigcommerce.com/api/v2' +security: + - BearerToken: [] paths: /rfq: get: @@ -305,7 +312,7 @@ paths: description: 'Expired date end.example:10/01/2022' description: |- Get quote form list. -
Equivalent Storefront GraphQL API Query: `quotes`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Query: `quotes`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - RFQ post: @@ -620,11 +627,9 @@ paths: - isBackendUser description: |- Create a quote form. -
Equivalent Storefront GraphQL API Mutation: `quoteCreate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `quoteCreate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - RFQ - security: - - authToken: [] '/rfq/{quote_id}': parameters: - schema: @@ -1008,6 +1013,13 @@ paths: minLength: 1 salesRepInfo: type: object + properties: + salesRepName: + type: string + salesRepEmail: + type: string + salesRepPhoneNumber: + type: string ChannelId: type: integer description: B2B Edition channel id @@ -1110,11 +1122,9 @@ paths: description: 'Creation date of quote, timestamp' description: |- Get a quote detail by quoteId. -
Equivalent Storefront GraphQL API Query: `quote`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Query: `quote`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - RFQ - security: - - authToken: [] put: summary: Update a Quote operationId: put-rfq-quote_id @@ -1468,52 +1478,9 @@ paths: description: Request body params you could find when you get quote detail description: |- Update a quote. -
Equivalent Storefront GraphQL API Mutation: `quoteUpdate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). - tags: - - RFQ - security: - - authToken: [] - delete: - summary: Delete a Quote - operationId: delete-rfq-quote_id - responses: - '200': - description: OK - content: - application/json: - schema: - description: '' - type: object - properties: - code: - type: number - message: - type: string - minLength: 1 - data: - type: object - properties: {} - required: - - code - - message - - data - x-examples: - example-1: - code: 200 - message: SUCCESS - data: {} - examples: - example-1: - value: - code: 200 - message: SUCCESS - data: {} - description: Delete a quote by quoteId + Equivalent Storefront GraphQL API Mutation: `quoteUpdate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - RFQ - security: - - authToken: [] - x-internal: true '/rfq/{quote_id}/checkout': parameters: - schema: @@ -1581,7 +1548,7 @@ paths: cartUrl: url description: |- Checkout quote form by quoteId. -
Equivalent Storefront GraphQL API Mutation: `quoteCheckout`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `quoteCheckout`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). requestBody: content: application/json: @@ -1595,8 +1562,6 @@ paths: - storeHash tags: - RFQ - security: - - authToken: [] '/rfq/{quote_id}/ordered': parameters: - schema: @@ -1642,7 +1607,7 @@ paths: data: {} description: |- Ordered a quote by quoteId. -
Equivalent Storefront GraphQL API Mutation: `quoteOrdered`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `quoteOrdered`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). requestBody: content: application/json: @@ -1728,74 +1693,94 @@ paths: additionalDescription: '' tags: - RFQ - security: - - authToken: [] /rfq/configs: get: summary: Get Quote Config - responses: {} - operationId: get-rfq-configs - requestBody: - content: - application/json: - schema: - description: '' - type: object - x-examples: - example-1: - code: 200 - message: SUCCESS - data: - switchStatus: - - key: quote_customer - isEnabled: '1' - - key: quote_on_product_page + responses: + '200': + description: OK + content: + application/json: + schema: + description: '' + type: object + x-examples: + example-1: + code: 200 + message: SUCCESS + data: + switchStatus: + - key: quote_reminder_notification isEnabled: '1' - - key: quote_on_cart_page + - key: quote_customer isEnabled: '1' - - key: quote_for_guest - isEnabled: '0' - - key: quote_for_individual_customer - isEnabled: '0' - - key: quote_sales_rep_visibility - isEnabled: '0' - - key: quote_sales_rep_creation + - key: quote_default_pdf isEnabled: '1' - properties: - code: - type: number - message: - type: string - minLength: 1 - data: - type: object - required: - - switchStatus - properties: - switchStatus: - type: array - uniqueItems: true - minItems: 1 - items: - type: object - properties: - key: - type: string - minLength: 1 - isEnabled: - type: string - minLength: 1 - description: Is enabled for a config + quoteOtherConfigs: + - key: defaultExpirationDate + value: 5 + - key: defaultTermsAndConditions + value: "" + properties: + code: + type: number + example: 200 + message: + type: string + minLength: 1 + example: SUCCESS + data: + type: object + properties: + switchStatus: + type: array + items: + type: object + properties: + key: + type: string + isEnabled: + type: string required: - key - isEnabled - required: - - code - - message - - data + quoteOtherConfigs: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + required: + - switchStatus + required: + - code + - message + - data + examples: + example-1: + value: + code: 200 + message: SUCCESS + data: + switchStatus: + - key: quote_reminder_notification + isEnabled: "1" + - key: quote_customer + isEnabled: "1" + - key: quote_default_pdf + isEnabled: "1" + quoteOtherConfiqs: + - key: defaultExpirationDate + value: 5 + - key: defaultTermsAndConditions + value: '' + operationId: get-rfq-configs description: |- Get quote config. -
Equivalent Storefront GraphQL API Query: `quoteConfig`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Query: `quoteConfig`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). parameters: - schema: type: string @@ -1978,7 +1963,7 @@ paths: description: Sales Rep ID description: |- Get store, company, and sales rep info. Mainly used for preview. -
Equivalent Storefront GraphQL API Query: `quoteUserStoreInfo`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Query: `quoteUserStoreInfo`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - RFQ /rfq/emails: @@ -2019,7 +2004,7 @@ paths: data: {} description: |- Send a quote email. -
Equivalent Storefront GraphQL API Mutation: `quoteEmail`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `quoteEmail`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). requestBody: content: application/json: @@ -2115,20 +2100,21 @@ paths: - isBackendUser description: |- Export quote pdf. -
Equivalent Storefront GraphQL API Mutation: `quoteFrontendPdf`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). + Equivalent Storefront GraphQL API Mutation: `quoteFrontendPdf`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). tags: - RFQ - security: - - authToken: [] components: schemas: {} securitySchemes: - authToken: - name: authToken + BearerToken: + name: BearerToken + description: |- + ### Authentication header + | Header | Argument | Description | + |:-------|:---------|:------------| + |`Authorization`|`Bearer {{B2B_JWT_TOKEN}}`| Obtained using the [BigCommerce Current Customer API](/docs/rest-authentication/current-customer) endpoint. | type: apiKey in: header -security: - - authToken: [] tags: - name: RFQ x-internal: false From d9c52e86a2058efc51f61334e4af3b85edfe637c Mon Sep 17 00:00:00 2001 From: Traci Porter Date: Mon, 7 Oct 2024 11:56:33 -0500 Subject: [PATCH 17/17] DEVDOCS-6077: [update] remove style guide references (#566) # [DEVDOCS-6077] ## What changed? These links go to placeholders. There is no information, therefore, removing them. ## Release notes draft N/A ## Anything else? ping {names} [DEVDOCS-6077]: https://bigcommercecloud.atlassian.net/browse/DEVDOCS-6077?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- CONTRIBUTING.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 226952e35..098f7f050 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,11 +54,6 @@ For more complex changes, fork and edit locally: - Do not end the subject line with a period. - Use the body to explain what and why versus how. -## Style Guides - -- [Documentation Style Guide](_project/_doc_style_guide.md) -- [API Specification Style Guide](_project/_spec_style_guide.md) - ## Contributing to Other Projects There are many other public BigCommerce repositories accepting contributions. If you're interested in contributing to those projects, see the [full list of public source repos](https://github.com/bigcommerce?utf8=%E2%9C%93&q=is%3Apublic&type=source&language=). Also, consider joining the [BigCommerce Developer Community](https://developer.bigcommerce.com/community).