Skip to content

Commit 65545da

Browse files
DEVDOCS-6562 - Updated v3 cart post with image_url (#1117)
<!-- Ticket number or summary of work --> # [DEVDOCS-6562] ## What changed? <!-- Provide a bulleted list in the present tense --> * Added `image_url` to POST V3 Cart ## Release notes draft Updated POST V3 Cart API Spec to include image_url similar to what existed in the GET ping @bigcommerce/dev-docs [DEVDOCS-6562]: https://bigcommercecloud.atlassian.net/browse/DEVDOCS-6562?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent c908ac6 commit 65545da

File tree

1 file changed

+52
-44
lines changed

1 file changed

+52
-44
lines changed

reference/carts.v3.yml

Lines changed: 52 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ paths:
161161
name: table
162162
quantity: 1
163163
list_price: 30
164+
image_url: 'https://pathtoproductimage/ProductDefault.png'
164165
gift_wrapping:
165166
wrap_together: true
166167
wrap_details:
@@ -192,8 +193,8 @@ paths:
192193
option_selections:
193194
- option_id: 116
194195
option_value:
195-
originalName: "cs_marking_logo_0.jpeg"
196-
temporaryPath: "488_a430fe0afaf236bef64635c53f9a26ae.jpeg"
196+
originalName: 'cs_marking_logo_0.jpeg'
197+
temporaryPath: '488_a430fe0afaf236bef64635c53f9a26ae.jpeg'
197198
description: |-
198199
**Examples:**
199200
@@ -218,10 +219,10 @@ paths:
218219
- quantity: 5
219220
product_id: 191
220221
variant_id: 185
221-
option_selections:
222+
option_selections:
222223
- option_id: 440
223224
option_value: 1743570000
224-
With a Variant of Checkbox and Picklist:
225+
With a Variant of Checkbox and Picklist:
225226
line_items:
226227
- quantity: 1
227228
product_id: 77
@@ -233,15 +234,16 @@ paths:
233234
- option_id: 124
234235
option_value: 106
235236
- option_id: 122
236-
option_value: "Hello"
237-
- option_id: 123
237+
option_value: 'Hello'
238+
- option_id: 123
238239
option_value: 104
239240
Custom Item:
240241
custom_items:
241242
- sku: abc-123
242243
name: Custom Product
243244
quantity: 1
244245
list_price: 10
246+
image_url: 'https://pathtoproductimage/ProductDefault.png'
245247
Options Selections:
246248
line_items:
247249
- quantity: 5
@@ -334,6 +336,7 @@ paths:
334336
name: Custom Product
335337
quantity: 1
336338
list_price: 10
339+
image_url: 'https://pathtoproductimage/ProductDefault.png'
337340
required: true
338341
tags:
339342
- Items
@@ -378,7 +381,7 @@ paths:
378381
summary: Create Cart Redirect URL
379382
operationId: createCartRedirectURL
380383
'/carts/{cartId}/items/{itemId}':
381-
parameters:
384+
parameters:
382385
- $ref: '#/components/parameters/Accept'
383386
- $ref: '#/components/parameters/cartId'
384387
- name: itemId
@@ -554,7 +557,7 @@ paths:
554557
summary: Delete Cart Line Item
555558
operationId: deleteCartLineItem
556559
'/carts/{cartId}':
557-
parameters:
560+
parameters:
558561
- $ref: '#/components/parameters/Accept'
559562
- $ref: '#/components/parameters/cartId'
560563
get:
@@ -644,7 +647,7 @@ paths:
644647
summary: Delete a Cart
645648
operationId: deleteCart
646649
'/carts/settings':
647-
parameters:
650+
parameters:
648651
- $ref: '#/components/parameters/Accept'
649652
get:
650653
summary: Get Global Cart Settings
@@ -878,15 +881,15 @@ paths:
878881
description: |
879882
Create a cart `Metafield`.
880883
881-
If you create an order from a Cart, you can continue referencing the Cart Metafields even if you delete the original Cart. Use the `cart_id` field on the Order to construct the Cart Metafield endpoint.
884+
If you create an order from a Cart, you can continue referencing the Cart Metafields even if you delete the original Cart. Use the `cart_id` field on the Order to construct the Cart Metafield endpoint.
882885
operationId: createCartMetafield
883-
parameters:
886+
parameters:
884887
- $ref: '#/components/parameters/ContentType'
885888
requestBody:
886889
content:
887890
application/json:
888891
schema:
889-
$ref: '#/components/schemas/MetafieldBase_Post'
892+
$ref: '#/components/schemas/MetafieldBase_Post'
890893
example:
891894
permission_set: app_only
892895
namespace: Sales Department
@@ -904,17 +907,17 @@ paths:
904907
schema:
905908
$ref: '#/components/schemas/MetaFieldCollectionResponse'
906909
example:
907-
data:
908-
"id": "24"
909-
"key": Staff Name
910-
"value": Sam
911-
"namespace": Sales Department
912-
"permission_set": app_only
913-
"resource_type": cart
914-
"resource_id": b810114d-9926-45b7-bba5-7633b251154b
915-
"description": Name of staff member
916-
"date_created": 2023-11-15T15:16:35+00:00
917-
"date_modified": 2023-11-15T15:16:35+00:00
910+
data:
911+
'id': '24'
912+
'key': Staff Name
913+
'value': Sam
914+
'namespace': Sales Department
915+
'permission_set': app_only
916+
'resource_type': cart
917+
'resource_id': b810114d-9926-45b7-bba5-7633b251154b
918+
'description': Name of staff member
919+
'date_created': 2023-11-15T15:16:35+00:00
920+
'date_modified': 2023-11-15T15:16:35+00:00
918921
meta: {}
919922
'400':
920923
description: Bad Request. Input is invalid.
@@ -980,7 +983,7 @@ paths:
980983
value:
981984
status: 404
982985
title: The resource at that URL is not found.
983-
type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes'
986+
type: 'https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes'
984987
parameters:
985988
- $ref: '#/components/parameters/PageParam'
986989
- $ref: '#/components/parameters/LimitParam'
@@ -1055,7 +1058,7 @@ paths:
10551058
responses:
10561059
'204':
10571060
description: |
1058-
An empty response.
1061+
An empty response.
10591062
'404':
10601063
description: |
10611064
Not found (A metafield was not found with this query)
@@ -1124,7 +1127,7 @@ paths:
11241127
properties:
11251128
resource_id:
11261129
type: string
1127-
example: "42"
1130+
example: '42'
11281131
description: |
11291132
The ID for the cart with which the metafield is associated.
11301133
required:
@@ -1187,7 +1190,7 @@ paths:
11871190
properties:
11881191
id:
11891192
type: string
1190-
example: "42"
1193+
example: '42'
11911194
description: |
11921195
The ID of metafield to update.
11931196
required:
@@ -2942,10 +2945,10 @@ components:
29422945
query_params:
29432946
type: object
29442947
properties:
2945-
key:
2946-
type: string
2947-
value:
2948-
type: string
2948+
key:
2949+
type: string
2950+
value:
2951+
type: string
29492952
Cart_Line_Item_Update_Post:
29502953
type: object
29512954
title: Cart_Line_Item_Update_Post
@@ -3030,17 +3033,22 @@ components:
30303033
name:
30313034
type: string
30323035
minLength: 1
3033-
maxLength: 250
3036+
maxLength: 250
30343037
quantity:
30353038
type: number
30363039
list_price:
30373040
type: number
3041+
image_url:
3042+
type: string
3043+
format: uri
3044+
description: Image of the product or variant.
30383045
x-examples:
30393046
example-1:
30403047
- sku: string
30413048
name: string
30423049
quantity: 0
30433050
list_price: 0
3051+
image_url: 'https://pathtoproductimage/ProductDefault.png'
30443052
CartSettings:
30453053
description: Represents all settings related to the shopping cart functionality of a store.
30463054
type: object
@@ -3370,7 +3378,7 @@ components:
33703378
type: string
33713379
description: |
33723380
Determines the visibility and writeability of the field by other API consumers.
3373-
3381+
33743382
| Value | Description |
33753383
| :--- | :--- |
33763384
| `app_only` | Private to the app that owns the field. |
@@ -3439,7 +3447,7 @@ components:
34393447
type: string
34403448
description: |
34413449
Determines the visibility and writeability of the field by other API consumers.
3442-
3450+
34433451
| Value | Description |
34443452
| :--- | :--- |
34453453
| `app_only` | Private to the app that owns the field. |
@@ -3572,7 +3580,7 @@ components:
35723580
type: integer
35733581
description: |
35743582
The unique identifier for the metafield.
3575-
example:
3583+
example:
35763584
- 123
35773585
errors:
35783586
type: array
@@ -3610,8 +3618,8 @@ components:
36103618
description: |
36113619
Error detail response payload for the BigCommerce API.
36123620
example:
3613-
"1": "Unauthorized to delete"
3614-
"2": "Metafield does not exist"
3621+
'1': 'Unauthorized to delete'
3622+
'2': 'Metafield does not exist'
36153623
WriteCollectionSuccessMeta:
36163624
type: object
36173625
description: Additional data about the response.
@@ -3721,7 +3729,7 @@ components:
37213729
application/json:
37223730
schema:
37233731
type: object
3724-
properties:
3732+
properties:
37253733
data:
37263734
$ref: '#/components/schemas/Cart_Full'
37273735
meta:
@@ -3768,7 +3776,7 @@ components:
37683776
cart_url: 'https://store.mybigcommerce.com/cart.php?action=load&id=0aa00afa-a000-00a0-00aae-aa0000f000a0&token=00aaaaa0aa0000000000a000a000f0aa0000afa00aa00afa0a000000000aa0a0'
37693777
checkout_url: 'https://store.mybigcommerce.com/cart.php?action=loadInCheckout&id=1ea11efe-b111-11d1-11ee-cd1110f111b1&token=00aaaaa0aa0000000000a000a000f0aa0000afa00aa00afa0a000000000aa0a0'
37703778
embedded_checkout_url: 'https://store.mybigcommerce.com/cart.php?embedded=1&action=loadInCheckout&id=0aa00afa-a000-00a0-00aae-aa0000f000a0&token=00aaaaa0aa0000000000a000a000f0aa0000afa00aa00afa0a000000000aa0a0'
3771-
meta:
3779+
meta:
37723780
$ref: '#/components/schemas/metaCollection_open'
37733781
parameters:
37743782
Accept:
@@ -3899,15 +3907,15 @@ components:
38993907
date_modified_max:
39003908
name: 'date_modified:max'
39013909
description: |
3902-
'Query parameter that lets you filter by the maximum date modified created, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields modified before this date.'
3910+
'Query parameter that lets you filter by the maximum date modified created, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields modified before this date.'
39033911
required: false
39043912
in: query
39053913
schema:
39063914
type: string
39073915
date_modified_min:
39083916
name: 'date_modified:min'
39093917
description: |
3910-
'Query parameter that lets you filter by the minimum date modified created, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields modified after this date.'
3918+
'Query parameter that lets you filter by the minimum date modified created, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields modified after this date.'
39113919
required: false
39123920
in: query
39133921
schema:
@@ -3962,13 +3970,13 @@ components:
39623970
| Header | Argument | Description |
39633971
|:-------|:---------|:------------|
39643972
| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). |
3965-
3973+
39663974
### Further reading
39673975
39683976
For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests).
3969-
3977+
39703978
For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes).
3971-
3979+
39723980
For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes).
39733981
type: apiKey
39743982
in: header

0 commit comments

Comments
 (0)