docs: update store cURL examples in OAS (#9099)

This commit is contained in:
Shahed Nasser
2024-09-16 15:37:11 +03:00
committed by GitHub
parent 8584031041
commit 35ffaf73d7
79 changed files with 183 additions and 89 deletions

View File

@@ -42,7 +42,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}'
* source: |-
* curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Carts
* responses:

View File

@@ -32,7 +32,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl -X DELETE '{backend_url}/store/carts/{id}/promotions'
* source: |-
* curl -X DELETE '{backend_url}/store/carts/{id}/promotions' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Carts
* responses:

View File

@@ -40,7 +40,8 @@
* - lang: Shell
* label: cURL
* source: |-
* curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}' \
* curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* -H 'Authorization: Bearer {access_token}'
* tags:
* - Customers

View File

@@ -32,7 +32,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/carts/{id}'
* source: |-
* curl '{backend_url}/store/carts/{id}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Carts
* responses:

View File

@@ -802,7 +802,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/collections'
* source: |-
* curl '{backend_url}/store/collections' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Collections
* responses:

View File

@@ -35,7 +35,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/collections/{id}'
* source: |-
* curl '{backend_url}/store/collections/{id}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Collections
* responses:

View File

@@ -92,7 +92,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/currencies'
* source: |-
* curl '{backend_url}/store/currencies' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Currencies
* responses:

View File

@@ -32,7 +32,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/currencies/{code}'
* source: |-
* curl '{backend_url}/store/currencies/{code}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Currencies
* responses:

View File

@@ -35,7 +35,8 @@
* label: cURL
* source: |-
* curl '{backend_url}/store/customers/me' \
* -H 'Authorization: Bearer {access_token}'
* -H 'Authorization: Bearer {access_token}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Customers
* responses:

View File

@@ -91,7 +91,8 @@
* label: cURL
* source: |-
* curl '{backend_url}/store/customers/me/addresses' \
* -H 'Authorization: Bearer {access_token}'
* -H 'Authorization: Bearer {access_token}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Customers
* responses:

View File

@@ -38,7 +38,8 @@
* label: cURL
* source: |-
* curl '{backend_url}/store/customers/me/addresses/{address_id}' \
* -H 'Authorization: Bearer {access_token}'
* -H 'Authorization: Bearer {access_token}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Customers
* responses:

View File

@@ -118,7 +118,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/orders'
* source: |-
* curl '{backend_url}/store/orders' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Orders
* responses:

View File

@@ -32,7 +32,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/orders/{id}'
* source: |-
* curl '{backend_url}/store/orders/{id}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Orders
* responses:

View File

@@ -61,7 +61,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/payment-providers'
* source: |-
* curl '{backend_url}/store/payment-providers' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Payment Providers
* responses:

View File

@@ -858,7 +858,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/product-categories'
* source: |-
* curl '{backend_url}/store/product-categories' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Product Categories
* responses:

View File

@@ -51,7 +51,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/product-categories/{id}'
* source: |-
* curl '{backend_url}/store/product-categories/{id}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Product Categories
* responses:

View File

@@ -932,7 +932,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/products'
* source: |-
* curl '{backend_url}/store/products' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Products
* responses:

View File

@@ -70,7 +70,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/products/{id}'
* source: |-
* curl '{backend_url}/store/products/{id}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Products
* responses:

View File

@@ -123,7 +123,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/regions'
* source: |-
* curl '{backend_url}/store/regions' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Regions
* responses:

View File

@@ -32,7 +32,8 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/regions/{id}'
* source: |-
* curl '{backend_url}/store/regions/{id}'
* tags:
* - Regions
* responses:

View File

@@ -50,7 +50,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/return-reasons'
* source: |-
* curl '{backend_url}/store/return-reasons' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Return Reasons
* responses:

View File

@@ -32,7 +32,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/return-reasons/{id}'
* source: |-
* curl '{backend_url}/store/return-reasons/{id}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Return Reasons
* responses:

View File

@@ -77,7 +77,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl '{backend_url}/store/shipping-options'
* source: |-
* curl '{backend_url}/store/shipping-options' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Shipping Options
* responses:

View File

@@ -39,7 +39,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl -X POST '{backend_url}/store/carts'
* source: |-
* curl -X POST '{backend_url}/store/carts' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Carts
* responses:

View File

@@ -45,7 +45,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl -X POST '{backend_url}/store/carts/{id}'
* source: |-
* curl -X POST '{backend_url}/store/carts/{id}' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Carts
* responses:

View File

@@ -35,7 +35,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl -X POST '{backend_url}/store/carts/{id}/complete'
* source: |-
* curl -X POST '{backend_url}/store/carts/{id}/complete' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Carts
* responses:

View File

@@ -43,7 +43,8 @@
* label: cURL
* source: |-
* curl -X POST '{backend_url}/store/carts/{id}/line-items' \
* -H 'Content-Type: application/json' \
* -H 'Content-Type: application/json' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* --data-raw '{
* "variant_id": "{value}",
* "quantity": 3360689747918848,

View File

@@ -49,7 +49,8 @@
* label: cURL
* source: |-
* curl -X POST '{backend_url}/store/carts/{id}/line-items/{line_id}' \
* -H 'Content-Type: application/json' \
* -H 'Content-Type: application/json' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* --data-raw '{
* "quantity": 8980402259623936,
* "metadata": {}

View File

@@ -51,7 +51,8 @@
* label: cURL
* source: |-
* curl -X POST '{backend_url}/store/carts/{id}/promotions' \
* -H 'Content-Type: application/json' \
* -H 'Content-Type: application/json' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* --data-raw '{
* "promo_codes": [
* "{value}"

View File

@@ -57,7 +57,8 @@
* label: cURL
* source: |-
* curl -X POST '{backend_url}/store/carts/{id}/shipping-methods' \
* -H 'Content-Type: application/json' \
* -H 'Content-Type: application/json' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* --data-raw '{
* "option_id": "{value}"
* }'

View File

@@ -38,7 +38,9 @@
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: curl -X POST '{backend_url}/store/carts/{id}/taxes'
* source: |-
* curl -X POST '{backend_url}/store/carts/{id}/taxes' \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* tags:
* - Carts
* responses:

View File

@@ -37,7 +37,8 @@
* source: |-
* curl -X POST '{backend_url}/store/customers' \
* -H 'Authorization: Bearer {token}' \
* -H 'Content-Type: application/json' \
* -H 'Content-Type: application/json' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* --data-raw '{
* "email": "Monserrate.Leannon88@yahoo.com",
* "company_name": "{value}",

View File

@@ -40,7 +40,8 @@
* source: |-
* curl -X POST '{backend_url}/store/customers/me' \
* -H 'Authorization: Bearer {access_token}' \
* -H 'Content-Type: application/json' \
* -H 'Content-Type: application/json' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* --data-raw '{
* "company_name": "{value}",
* "first_name": "{value}",

View File

@@ -98,7 +98,8 @@
* source: |-
* curl -X POST '{backend_url}/store/customers/me/addresses' \
* -H 'Authorization: Bearer {access_token}' \
* -H 'Content-Type: application/json' \
* -H 'Content-Type: application/json' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* --data-raw '{
* "metadata": {},
* "first_name": "{value}",

View File

@@ -104,7 +104,8 @@
* source: |-
* curl -X POST '{backend_url}/store/customers/me/addresses/{address_id}' \
* -H 'Authorization: Bearer {access_token}' \
* -H 'Content-Type: application/json' \
* -H 'Content-Type: application/json' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* --data-raw '{
* "first_name": "{value}",
* }'

View File

@@ -36,7 +36,8 @@
* label: cURL
* source: |-
* curl -X POST '{backend_url}/store/payment-collections' \
* -H 'Content-Type: application/json' \
* -H 'Content-Type: application/json' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* --data-raw '{
* "cart_id": "{value}",
* "region_id": "{value}",

View File

@@ -61,7 +61,8 @@
* label: cURL
* source: |-
* curl -X POST '{backend_url}/store/payment-collections/{id}/payment-sessions' \
* -H 'Content-Type: application/json' \
* -H 'Content-Type: application/json' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* --data-raw '{
* "provider_id": "{value}"
* }'

View File

@@ -14,7 +14,8 @@
* label: cURL
* source: |-
* curl -X POST '{backend_url}/store/return' \
* -H 'Content-Type: application/json' \
* -H 'Content-Type: application/json' \ \
* -H 'x-publishable-api-key: {your_publishable_api_key}'
* --data-raw '{
* "order_id": "{value}",
* "items": [