Skip to content

Commit

Permalink
B2b 1327 s2s endpoints (#579)
Browse files Browse the repository at this point in the history
<!-- Ticket number or summary of work -->
# [B2B-1327]


## What changed?
Fixed linter errors

Outstanding questions :

user.yaml - there is an error on lines 902 and 911 due to the '{field
name}' requirement object
invoice_management > invoice.yaml - Need array objects for
`customerFields` and `customFields`
invoice_management > payment.yaml - Need array objects for `fees`

NOTE: In invoice_management > payment.yaml , on line 162, for the data
object. I changed the field name to lineItems. I hope this is correct.

## Release notes draft
<!-- Provide an entry for the release notes using simple, conversational
language. Don't be too technical. Explain how the change will benefit
the merchant and link to the feature.

Examples:
* The newly-released [X feature] is now available to use. Now, you’ll be
able to [perform Y action].
* We're happy to announce [X feature], which can help you [perform Y
action].
* [X feature] helps you to create [Y response] using the [Z query
parameter]. Now, you can deliver [ex, localized shopping experiences for
your customers].
* Fixed a bug in the [X endpoint]. Now the [Y field] will appear when
you click [Z option]. -->
* 

## Anything else?
<!-- Add related PRs, salient notes, additional ticket numbers, etc. -->

ping {names}


[B2B-1327]:
https://bigcommercecloud.atlassian.net/browse/B2B-1327?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
  • Loading branch information
bc-traciporter authored Oct 14, 2024
1 parent 1caaf92 commit 1555be0
Show file tree
Hide file tree
Showing 14 changed files with 274 additions and 245 deletions.
16 changes: 10 additions & 6 deletions docs/b2b-edition/specs/api-v3/address/address.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ info:
version: v3
description: BigCommerce B2B Edition Address
contact:
name: string
name: BigCommerce
url: 'https://www.bigcommerce.com'
email: [email protected]
servers:
- url: 'https://api-b2b.bigcommerce.com/api/v3/io'
paths:
Expand Down Expand Up @@ -218,10 +220,10 @@ paths:
meta:
message: Resource not found
examples:
Resouce not found:
Resource not found:
value:
code: 404
data: []
data: {}
meta:
message: Please enter a valid state name or state abbreviation for the country.
operationId: get-addresses-states-stateName-code
Expand Down Expand Up @@ -348,6 +350,7 @@ paths:
type: integer
data:
type: object
properties: {}
meta:
type: object
required:
Expand Down Expand Up @@ -607,6 +610,7 @@ paths:
type: number
data:
type: object
properties: {}
meta:
type: object
required:
Expand Down Expand Up @@ -1186,8 +1190,8 @@ paths:
addressLine2: 'Washington, DC 22202'
city: Austin
country:
countryCode: US
countryName: United States
countryCode: US
countryName: United States
firstName: Jane
lastName: Doe
isBilling: true
Expand All @@ -1199,7 +1203,7 @@ paths:
stateCode: TX
stateName: Texas
zipCode: '78751'
companyId: 1840
companyId: "1840"
meta:
message: string
tags:
Expand Down
4 changes: 4 additions & 0 deletions docs/b2b-edition/specs/api-v3/authentication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ info:
title: authentication
version: '3.0'
description: API auth manage
contact:
name: BigCommerce
url: 'https://www.bigcommerce.com'
email: [email protected]
servers:
- url: 'https://api-b2b.bigcommerce.com/api/io'
tags:
Expand Down
108 changes: 67 additions & 41 deletions docs/b2b-edition/specs/api-v3/company/company.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ paths:
explode: false
schema:
type: array
example: extraFields=externalID:abc
items:
type: string
example:
- externalID:abc
- schema:
type: integer
example: 2
Expand Down Expand Up @@ -565,6 +568,13 @@ paths:
type: number
data:
type: object
properties:
companyId:
type: integer
customerId:
type: integer
customerGroupId:
type: integer
meta:
type: object
required:
Expand Down Expand Up @@ -596,6 +606,13 @@ paths:
type: integer
data:
type: object
properties:
companyId:
type: integer
customerId:
type: integer
customerGroupId:
type: integer
meta:
type: object
required:
Expand Down Expand Up @@ -869,7 +886,7 @@ paths:
description: |-
To use customized extra fields with field names you need to first add company extra fields in Settings > Extra fields inside B2B edition.
eg., If you want to create a new company with an extra integer field named licenseNO, you can use this structure [{'fieldName': 'LicenseNO', 'fieldValue': 10342340323}] in the request body.
e.g., If you want to create a new company with an extra integer field named licenseNO, you can use this structure [{'fieldName': 'LicenseNO', 'fieldValue': 10342340323}] in the request body.
items:
type: object
properties:
Expand Down Expand Up @@ -1038,6 +1055,13 @@ paths:
type: integer
data:
type: object
properties:
companyId:
type: integer
customerId:
type: integer
customerGroupId:
type: integer
meta:
type: object
required:
Expand Down Expand Up @@ -2046,7 +2070,7 @@ paths:
type: number
description: >-
Field type of the extra field.0 means text type. 1 means
textarea type. 2 means number type. 3 means dropdown
textarea type. 2 means number type. 3 means dropdown.
type.
enum:
- 0
Expand Down Expand Up @@ -2385,8 +2409,7 @@ paths:
schema:
type: object
properties:
data:
type: object
data: {}
code:
type: integer
meta:
Expand Down Expand Up @@ -2439,14 +2462,14 @@ paths:
roleType:
type: integer
enum:
- 1 - predefined
- 2 - custom
description: The role type
- 1
- 2
description: The role type. (1 - predefined, 2 - custom)
roleLevel:
type: integer
enum:
- 1 - store level
description: The role level
- 1
description: The role level. (1 - store level)
required:
- id
- name
Expand Down Expand Up @@ -2528,15 +2551,15 @@ paths:
description: The role name
roleType:
type: integer
description: The role type. (1 = predefined, 2 = custom)
enum:
- 1 - predefined
- 2 - custom
description: The role type
- 1
- 2
roleLevel:
type: integer
description: The role level
description: The role level, 1 - store level
enum:
- 1 - store level
- 1
permissions:
type: array
items:
Expand All @@ -2550,10 +2573,10 @@ paths:
description: The permission code
permissionLevel:
type: integer
description: The permission level
description: The permission level. (1 - user level, 2 - company level)
enum:
- 1 - user level
- 2 - company level
- 1
- 2
meta:
type: object
properties:
Expand Down Expand Up @@ -2598,10 +2621,10 @@ paths:
description: The permission code
permissionLevel:
type: integer
description: The permission level
description: The permission level. (1 - user level, 2 - company level)
enum:
- 1 - user level
- 2 - company level
- 1
- 2
required:
- code
- permissionLevel
Expand Down Expand Up @@ -2651,15 +2674,15 @@ paths:
description: The role name
roleType:
type: integer
description: The role type
description: The role type. (1 - predefined, 2 - custom)
enum:
- 1 - predefined
- 2 - custom
- 1
- 2
roleLevel:
type: integer
enum:
- 1 - store level
description: The role level
- 1
description: The role level. (1 - store level)
permissions:
type: array
items:
Expand All @@ -2673,10 +2696,10 @@ paths:
description: The permission code
permissionLevel:
type: integer
description: The permission level
description: The permission level. (1 - user level, 2 - company level)
enum:
- 1 - user level
- 2 - company level
- 1
- 2
meta:
type: object
properties:
Expand Down Expand Up @@ -2727,15 +2750,15 @@ paths:
description: The role name
roleType:
type: integer
description: The role type
description: The role type. (1 - predefined, 2 - custom )
enum:
- 1 - predefined
- 2 - custom
- 1
- 2
roleLevel:
type: integer
enum:
- 1 - store level
description: The role level
- 1
description: The role level. (1 - store level)
permissions:
type: array
items:
Expand All @@ -2749,10 +2772,10 @@ paths:
description: The permission code
permissionLevel:
type: integer
description: The permission level
description: The permission level. (1 - user level, 2 - company level)
enum:
- 1 - user level
- 2 - company level
- 1
- 2
meta:
type: object
properties:
Expand Down Expand Up @@ -2800,10 +2823,10 @@ paths:
description: The permission code
permissionLevel:
type: integer
description: The permission level
description: The permission level. (1 - user level, 2 - company level)
enum:
- 1 - user level
- 2 - company level
- 1
- 2
required:
- code
- permissionLevel
Expand Down Expand Up @@ -2835,6 +2858,7 @@ paths:
type: integer
data:
type: object
properties: {}
meta:
type: object
properties:
Expand Down Expand Up @@ -2902,7 +2926,7 @@ paths:
value:
code: 200
data:
- id: f593d7c8-078e-4bb6-af6b-688ef8df1ijn
- id: f593d7c8-078e-4bb6-af6b-688ef8df1a12
attachmentUrl: "https://xxx.com/xxx.csv"
meta:
message: SUCCESS
Expand Down Expand Up @@ -2993,6 +3017,7 @@ paths:
delete:
summary: Delete Company Attachment
operationId: delete-companies-companyId-attachments-attachmentId
description: 'Delete company attachment'
responses:
"200":
description: OK
Expand All @@ -3006,6 +3031,7 @@ paths:
default: 200
data:
type: object
properties: {}
meta:
type: object
properties:
Expand Down
Loading

0 comments on commit 1555be0

Please sign in to comment.