docs: update store cURL examples in OAS (#9099)
This commit is contained in:
@@ -1 +1 @@
|
||||
curl -X POST '{backend_url}/auth/customer/{auth_provider}'
|
||||
curl -X POST '{backend_url}/auth/customer/github'
|
||||
@@ -1 +1 @@
|
||||
curl -X POST '{backend_url}/auth/customer/{auth_provider}/callback'
|
||||
curl -X POST '{backend_url}/auth/customer/github/callback?code=123'
|
||||
@@ -1 +1,6 @@
|
||||
curl -X POST '{backend_url}/auth/customer/{auth_provider}/register'
|
||||
curl -X POST '{backend_url}/auth/customer/emailpass/register' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"email": "customer@gmail.com",
|
||||
"password": "supersecret"
|
||||
}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl -X POST '{backend_url}/auth/token/refresh' \
|
||||
-H 'Authorization: Bearer {token}'
|
||||
@@ -1 +1,2 @@
|
||||
curl -X POST '{backend_url}/store/carts'
|
||||
curl -X POST '{backend_url}/store/carts' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/carts/{id}'
|
||||
curl '{backend_url}/store/carts/{id}' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl -X POST '{backend_url}/store/carts/{id}'
|
||||
curl -X POST '{backend_url}/store/carts/{id}' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl -X POST '{backend_url}/store/carts/{id}/complete'
|
||||
curl -X POST '{backend_url}/store/carts/{id}/complete' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1,5 +1,6 @@
|
||||
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,
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}'
|
||||
curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1,5 +1,6 @@
|
||||
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": {}
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
curl -X DELETE '{backend_url}/store/carts/{id}/promotions'
|
||||
curl -X DELETE '{backend_url}/store/carts/{id}/promotions' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1,5 +1,6 @@
|
||||
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}"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
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}"
|
||||
}'
|
||||
@@ -1 +1,2 @@
|
||||
curl -X POST '{backend_url}/store/carts/{id}/taxes'
|
||||
curl -X POST '{backend_url}/store/carts/{id}/taxes' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/collections'
|
||||
curl '{backend_url}/store/collections' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/collections/{id}'
|
||||
curl '{backend_url}/store/collections/{id}' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/currencies'
|
||||
curl '{backend_url}/store/currencies' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/currencies/{code}'
|
||||
curl '{backend_url}/store/currencies/{code}' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1,5 +1,7 @@
|
||||
curl -X POST '{backend_url}/store/customers' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: Bearer {token}' \
|
||||
-H 'Content-Type: application/json' \ \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
--data-raw '{
|
||||
"email": "Monserrate.Leannon88@yahoo.com",
|
||||
"company_name": "{value}",
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
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}'
|
||||
@@ -1,6 +1,7 @@
|
||||
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}",
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
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}'
|
||||
@@ -1,6 +1,7 @@
|
||||
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}",
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
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}'
|
||||
@@ -1,2 +1,3 @@
|
||||
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}'
|
||||
@@ -1,17 +1,7 @@
|
||||
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 '{
|
||||
"metadata": {},
|
||||
"first_name": "{value}",
|
||||
"last_name": "{value}",
|
||||
"phone": "{value}",
|
||||
"company": "{value}",
|
||||
"address_1": "{value}",
|
||||
"address_2": "{value}",
|
||||
"city": "{value}",
|
||||
"country_code": "{value}",
|
||||
"province": "{value}",
|
||||
"postal_code": "{value}",
|
||||
"address_name": "{value}"
|
||||
}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/orders'
|
||||
curl '{backend_url}/store/orders' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/orders/{id}'
|
||||
curl '{backend_url}/store/orders/{id}' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1,5 +1,6 @@
|
||||
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}",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
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}"
|
||||
}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/payment-providers'
|
||||
curl '{backend_url}/store/payment-providers' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/product-categories'
|
||||
curl '{backend_url}/store/product-categories' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/product-categories/{id}'
|
||||
curl '{backend_url}/store/product-categories/{id}' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/products'
|
||||
curl '{backend_url}/store/products' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/products/{id}'
|
||||
curl '{backend_url}/store/products/{id}' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/regions'
|
||||
curl '{backend_url}/store/regions' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/return-reasons'
|
||||
curl '{backend_url}/store/return-reasons' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/return-reasons/{id}'
|
||||
curl '{backend_url}/store/return-reasons/{id}' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
@@ -1,5 +1,6 @@
|
||||
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": [
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
curl '{backend_url}/store/shipping-options'
|
||||
curl '{backend_url}/store/shipping-options' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
Reference in New Issue
Block a user