Update all curl documentation examples and references with new x-medusa-access-token header (#6326)

## What

This is to update incorrect documentation in regards to authentication to the Admin API - raised in https://github.com/medusajs/medusa/issues/6264.

## Why

Because the current documentation has been incorrect since the September 2023 release of [v1.17.0](https://github.com/medusajs/medusa/releases/tag/v1.17.0), which had breaking changes to API token usage.

## How

Simple search and replace. I was asked to replace occurrences under `www/apps/docs/content/` but there were also additional places where I thought references should also be updated:

- `packages/medusa/src/api/`
- `www/apps/api-reference/`

Feel free to revert them as needed.

There is also some inconsistency between the format shown in examples e.g. `<API_TOKEN>` vs `{api_token}` vs `{access_token}`.

I have kept the format the same in all cases as the original, as surrounding documentation text would not have format updated as well. I suggest maybe reviewing the documentation and keeping to a consistent format e.g. `<API_TOKEN>`.

 
## Testing 

I have not tested these changes. I would assume the `packages/medusa/src/api/` changes may need more thorough testing?
This commit is contained in:
Ira
2024-02-07 21:41:38 +13:00
committed by GitHub
parent e2cb72efd8
commit 44470bf8c5
32 changed files with 217 additions and 217 deletions

View File

@@ -353,7 +353,7 @@ by passing to the `expand` query parameter the value `collection`:
value: 'curl',
code: {
source: `curl "http://localhost:9000/admin/products?expand=collection" \
-H 'Authorization: Bearer {api_token}'`,
-H 'x-medusa-access-token: {api_token}'`,
lang: `bash`,
}
},
@@ -416,7 +416,7 @@ pass to the `expand` query parameter the value `variants,collection`:
value: 'curl',
code: {
source: `curl "http://localhost:9000/admin/products?expand=variants,collection" \
-H 'Authorization: Bearer {api_token}'`,
-H 'x-medusa-access-token: {api_token}'`,
lang: `bash`,
}
},
@@ -478,7 +478,7 @@ For example:
value: 'curl',
code: {
source: `curl "http://localhost:9000/admin/products?expand" \
-H 'Authorization: Bearer {api_token}'`,
-H 'x-medusa-access-token: {api_token}'`,
lang: `bash`,
}
},
@@ -572,7 +572,7 @@ parameter:
value: 'curl',
code: {
source: `curl "http://localhost:9000/admin/products?fields=title" \
-H 'Authorization: Bearer {api_token}'`,
-H 'x-medusa-access-token: {api_token}'`,
lang: `bash`,
}
},
@@ -632,7 +632,7 @@ value to the `expand` query parameter. For example:
value: 'curl',
code: {
source: `curl "http://localhost:9000/admin/products?fields=title&expand" \
-H 'Authorization: Bearer {api_token}'`,
-H 'x-medusa-access-token: {api_token}'`,
lang: `bash`,
}
},
@@ -696,7 +696,7 @@ For example, to select the `title` and `handle` of products:
value: 'curl',
code: {
source: `curl "http://localhost:9000/admin/products?fields=title,handle" \
-H 'Authorization: Bearer {api_token}'`,
-H 'x-medusa-access-token: {api_token}'`,
lang: `bash`,
}
},
@@ -755,7 +755,7 @@ entity. For example:
value: 'curl',
code: {
source: `curl "http://localhost:9000/admin/products?fields" \
-H 'Authorization: Bearer {api_token}'`,
-H 'x-medusa-access-token: {api_token}'`,
lang: `bash`,
}
},
@@ -811,7 +811,7 @@ relations aren't retrieved as well. For example:
value: 'curl',
code: {
source: `curl "http://localhost:9000/admin/products?fields&expand" \
-H 'Authorization: Bearer {api_token}'`,
-H 'x-medusa-access-token: {api_token}'`,
lang: `bash`,
}
},
@@ -891,7 +891,7 @@ For example:
```bash
curl "http://localhost:9000/admin/products?title=Shirt" \
-H 'Authorization: Bearer {api_token}'
-H 'x-medusa-access-token: {api_token}'
```
@@ -905,7 +905,7 @@ For example, if the string has spaces, you can encode the space with `+` or
```bash
curl "http://localhost:9000/admin/products?title=Blue%20Shirt" \
-H 'Authorization: Bearer {api_token}'
-H 'x-medusa-access-token: {api_token}'
```
@@ -924,7 +924,7 @@ For example:
```bash
curl "http://localhost:9000/admin/products?offset=1" \
-H 'Authorization: Bearer {api_token}'
-H 'x-medusa-access-token: {api_token}'
```
@@ -939,7 +939,7 @@ For example:
```bash
curl "http://localhost:9000/admin/products?is_giftcard=true" \
-H 'Authorization: Bearer {api_token}'
-H 'x-medusa-access-token: {api_token}'
```
@@ -955,7 +955,7 @@ For example:
```bash
curl -g "http://localhost:9000/admin/products?created_at[lt]=2023-02-17" \
-H 'Authorization: Bearer {api_token}'
-H 'x-medusa-access-token: {api_token}'
```
@@ -968,7 +968,7 @@ For example:
```bash
curl -g "http://localhost:9000/admin/products?created_at[lt]=2023-02-17T07:22:30Z" \
-H 'Authorization: Bearer {api_token}'
-H 'x-medusa-access-token: {api_token}'
```
@@ -985,7 +985,7 @@ For example:
```bash
curl -g "http://localhost:9000/admin/products?sales_channel_id[]=sc_01GPGVB42PZ7N3YQEP2WDM7PC7&sales_channel_id[]=sc_234PGVB42PZ7N3YQEP2WDM7PC7" \
-H 'Authorization: Bearer {api_token}'
-H 'x-medusa-access-token: {api_token}'
```
@@ -1006,7 +1006,7 @@ For example:
```bash
curl -g "http://localhost:9000/admin/products?created_at[lt]=2023-02-17&created_at[gt]=2022-09-17" \
-H 'Authorization: Bearer {api_token}'
-H 'x-medusa-access-token: {api_token}'
```
<Feedback
@@ -1046,7 +1046,7 @@ For example, to limit the number of products returned in the List Products API R
value: 'curl',
code: {
source: `curl "http://localhost:9000/admin/products?limit=5" \
-H 'Authorization: Bearer {api_token}'`,
-H 'x-medusa-access-token: {api_token}'`,
lang: `bash`,
}
},
@@ -1123,7 +1123,7 @@ sort products by their `created_at` attribute by setting `order` to
value: 'curl',
code: {
source: `curl "http://localhost:9000/admin/products?order=created_at" \
-H 'Authorization: Bearer {api_token}'`,
-H 'x-medusa-access-token: {api_token}'`,
lang: `bash`,
}
},
@@ -1179,7 +1179,7 @@ descending, pass a dash (`-`) before the attribute name. For example:
value: 'curl',
code: {
source: `curl "http://localhost:9000/admin/products?order=-created_at" \
-H 'Authorization: Bearer {api_token}'`,
-H 'x-medusa-access-token: {api_token}'`,
lang: `bash`,
}
},

View File

@@ -365,7 +365,7 @@ import TabItem from '@theme/TabItem';
```bash
curl -L -X POST '<BACKEND_URL>/admin/uploads' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: text/csv' \
-F 'files=@"<FILE_PATH_1>"'
```

View File

@@ -361,7 +361,7 @@ For example, this creates a batch job of the type `publish-products`:
```bash
curl -L -X POST '<BACKEND_URL>/admin/batch-jobs' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"type": "publish-products",
@@ -433,7 +433,7 @@ You can retrieve the batch job afterward to get its status and view details abou
```bash
curl -L -X GET '<BACKEND_URL>/admin/batch-jobs/<BATCH_JOB_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
# <BATCH_JOB_ID> is the ID of the batch job
```
@@ -517,7 +517,7 @@ To process the batch job, send a request to [confirm the batch job](https://docs
```bash
curl -L -X POST '<BACKEND_URL>/admin/batch-jobs/<BATCH_JOB_ID>/confirm' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
# <BATCH_JOB_ID> is the ID of the batch job
```

View File

@@ -127,7 +127,7 @@ You can retrieve a list of publishable API keys by sending a request to the [Lis
```bash
curl -L -X GET '<BACKEND_URL>/admin/publishable-api-keys' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -217,7 +217,7 @@ You can create a publishable API key by sending a request to the [Create Publish
```bash
curl -L -X POST '<BACKEND_URL>/admin/publishable-api-keys' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "Web API Key"
@@ -310,7 +310,7 @@ You can update a publishable API keys details by sending a request to the [Up
```bash
curl -L -X POST '<BACKEND_URL>/admin/publishable-api-keys/<PUBLISHABLE_API_KEY>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "Web API Key"
@@ -398,7 +398,7 @@ You can revoke a publishable API key by sending a request to the [Revoke Publish
```bash
curl -L -X POST '<BACKEND_URL>/admin/publishable-api-keys/<PUBLISHABLE_API_KEY>/revoke' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -475,7 +475,7 @@ You can delete a publishable API key by sending a request to the [Delete Publish
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/publishable-api-keys/<PUBLISHABLE_API_KEY>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -573,7 +573,7 @@ You can retrieve the list of sales channels associated with a publishable API ke
```bash
curl -L -X GET '<BACKEND_URL>/admin/publishable-api-keys/<PUBLISHABLE_API_KEY>/sales-channels' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -681,7 +681,7 @@ You can add a sales channel to a publishable API key by sending a request to the
```bash
curl -L -X POST '<BACKEND_URL>/admin/publishable-api-keys/<PUBLISHABLE_API_KEY>/sales-channels/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"sales_channel_ids": [
@@ -801,7 +801,7 @@ You can delete a sales channel from a publishable API key by sending a request t
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/publishable-api-keys/<PUBLISHABLE_API_KEY>/sales-channels/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"sales_channel_ids": [

View File

@@ -109,7 +109,7 @@ You can create a customer group by sending a request to the Create Customer Grou
```bash
curl -L -X POST '<BACKEND_URL>/admin/customer-groups' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "VIP"
@@ -191,7 +191,7 @@ You can get a list of all customer groups by sending a request to the List Custo
```bash
curl -L -X GET '<BACKEND_URL>/admin/customer-groups' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -260,7 +260,7 @@ You can retrieve a single customer group by sending a request to the Get a Custo
```bash
curl -L -X GET '<BACKEND_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -346,7 +346,7 @@ You can update a customer groups data by sending a request to the Update Cust
```bash
curl -L -X POST '<BACKEND_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"metadata": {
@@ -424,7 +424,7 @@ You can delete a customer group by sending a request to the Delete a Customer Gr
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -520,7 +520,7 @@ You can add a customer to a group by sending a request to the Customer Groups
```bash
curl -L -X POST '<BACKEND_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>/customers/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"customer_ids": [
@@ -608,7 +608,7 @@ You can retrieve a list of all customers in a customer group using the List Cust
```bash
curl -L -X GET '<BACKEND_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>/customers' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -714,7 +714,7 @@ You can remove customers from a customer group by sending a request to the Remov
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>/customers/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"customer_ids": [

View File

@@ -111,7 +111,7 @@ You can show a list of customers by sending a request to the [List Customers API
```bash
curl -L -X GET '<BACKEND_URL>/admin/customers' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -214,7 +214,7 @@ You can create a customer account by sending a request to the [Create a Customer
```bash
curl -L -X POST '<BACKEND_URL>/admin/customers' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "<EMAIL>",
@@ -314,7 +314,7 @@ You can edit a customers information by sending a request to the [Update a Cu
```bash
curl -L -X POST '<BACKEND_URL>/admin/customers/<CUSTOMER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"first_name": "<FIRST_NAME>"

View File

@@ -170,7 +170,7 @@ You can create a discount by sending a request to the [Create Discount API Route
```bash
curl -L -X POST '<BACKEND_URL>/admin/discounts' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"code": "<CODE>",
@@ -272,7 +272,7 @@ For example, you can update the discounts description and status by sending t
```bash
curl -L -X POST '<BACKEND_URL>/admin/discounts/<DISCOUNT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"is_disabled": true
@@ -384,7 +384,7 @@ You can send a request to the [Create Condition API Route](https://docs.medusajs
```bash
curl -L -X POST '<BACKEND_URL>/admin/discounts/<DISCOUNT_ID>/conditions' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"operator": "in",
@@ -498,7 +498,7 @@ You can retrieve a condition and its resources by sending a request to the [Get
```bash
curl -L -X GET '<BACKEND_URL>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>&expand=products' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -606,7 +606,7 @@ For example, to update the products in a condition:
```bash
curl -L -X POST '<BACKEND_URL>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"products": [
@@ -698,7 +698,7 @@ You can delete a condition by sending a request to the [Delete Condition API Rou
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -763,7 +763,7 @@ You can delete a discount by sending a request to the [Delete Discount API Route
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/discounts/<DISCOUNT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -140,7 +140,7 @@ You can retrieve the gift card products by sending a request to the [List Produc
```bash
curl -L -X GET '<BACKEND_URL>/admin/products?is_giftcard=true' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -295,7 +295,7 @@ You can create a gift card product by sending a request to the [Create a Product
```bash
curl -L -X POST '<BACKEND_URL>/admin/products' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "My Gift Card",
@@ -424,7 +424,7 @@ You can update a gift card products details by sending a request to the [Upda
```bash
curl -L -X POST '<BACKEND_URL>/admin/products/<GIFT_CARD_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"description": "The best gift card"
@@ -501,7 +501,7 @@ You can delete a gift card product by sending a request to the [Delete a Product
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/products/<GIFT_CARD_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -582,7 +582,7 @@ You can retrieve all custom gift cards by sending a request to the [List Gift Ca
```bash
curl -L -X GET '<BACKEND_URL>/admin/gift-cards' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -667,7 +667,7 @@ You can create a custom gift card by sending a request to the [Create a Gift Car
```bash
curl -L -X POST '<BACKEND_URL>/admin/gift-cards' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"region_id": "<REGION_ID>",
@@ -755,7 +755,7 @@ You can update a gift card by sending a request to the [Update a Gift Card API R
```bash
curl -L -X POST '<BACKEND_URL>/admin/gift-cards/<GIFT_CARD_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"balance": 2000
@@ -834,7 +834,7 @@ You can delete a custom gift card by sending a request to the [Delete a Gift Car
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/gift-card/<GIFT_CARD_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -121,7 +121,7 @@ You can list inventory items by sending a request to the [List Inventory Items A
```bash
curl -L -X GET '<BACKEND_URL>/admin/inventory-items' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -206,7 +206,7 @@ You can create an inventory item by sending a request to the [Create Inventory I
```bash
curl -L -X POST '<BACKEND_URL>/admin/inventory-items' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"variant_id": "variant_123"
@@ -285,7 +285,7 @@ You can retrieve an inventory item by sending a request to the [Get Inventory It
```bash
curl -L -X GET '<BACKEND_URL>/admin/inventory-items/<ITEM_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -372,7 +372,7 @@ You can update an inventory item by sending a request to the [Update Inventory I
```bash
curl -L -X POST '<BACKEND_URL>/admin/inventory-items/<ITEM_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"origin_country": "US"
@@ -461,7 +461,7 @@ You can list inventory levels of an inventory item by sending a request to the [
```bash
curl -L -X GET '<BACKEND_URL>/admin/inventory-items/<ITEM_ID>/location-levels' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -555,7 +555,7 @@ You can create a location level by sending a request to the [Create Inventory Le
```bash
curl -L -X POST '<BACKEND_URL>/admin/inventory-items/<ITEM_ID>/location-levels' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"location_id": "<LOCATION_ID>",
@@ -658,7 +658,7 @@ You can update a location level by sending a request to the [Update Location Lev
```bash
curl -L -X POST '<BACKEND_URL>/admin/inventory-items/<ITEM_ID>/location-levels/<LOCATION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"stocked_quantity": 10
@@ -740,7 +740,7 @@ You can delete a location level of an inventory item by sending a request to the
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/inventory-items/<ITEM_ID>/location-levels/<LOC_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -813,7 +813,7 @@ You can delete an inventory item by sending a request to the [Delete Inventory I
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/inventory-items/<ITEM_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -146,7 +146,7 @@ You can create an item allocation by sending a request to the [Create a Reservat
```bash
curl -L -X POST '<BACKEND_URL>/admin/reservations' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"line_item_id": "<LINE_ITEM_ID>",
@@ -237,7 +237,7 @@ You can retrieve the item allocations of a line item in an order using the [List
```bash
curl -L -X GET '<BACKEND_URL>/admin/reservations?line_item_id=<LINE_ITEM_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -307,7 +307,7 @@ You can retrieve a single item allocation by its ID using the [Get a Reservation
```bash
curl -L -X GET '<BACKEND_URL>/admin/reservations/<RESERVATION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -390,7 +390,7 @@ You can update an item allocation to change the location to allocate from or the
```bash
curl -L -X POST '<BACKEND_URL>/admin/reservations/<RESERVATION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"quantity": 3
@@ -475,7 +475,7 @@ You can delete an item allocation by sending a request to the [Delete Reservatio
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/reservations/<RESERVATION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -575,7 +575,7 @@ When you create a fulfillment of an order, you can specify the location to fulfi
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/fulfillment' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"items": [
@@ -689,7 +689,7 @@ When requesting a return, you can specify the location to return the item to by
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/return' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"items": [

View File

@@ -128,7 +128,7 @@ You can list all reservations in your store by sending a request to the [List Re
```bash
curl -L -X GET '<BACKEND_URL>/admin/reservations' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -223,7 +223,7 @@ You can create a reservation by sending a request to the [Create Reservation API
```bash
curl -L -X POST '<BACKEND_URL>/admin/reservations' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"location_id": "<LOC_ID>",
@@ -316,7 +316,7 @@ You can update a reservation by sending a request to the [Update Reservation API
```bash
curl -L -X POST '<BACKEND_URL>/admin/reservations/<RESERVATION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"quantity": 3
@@ -401,7 +401,7 @@ You can delete a reservation by sending a request to the [Delete Reservation API
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/reservations/<RESERVATION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -123,7 +123,7 @@ You can list stock locations by using the [List Stock Locations API Route](https
```bash
curl -L -X GET '<BACKEND_URL>/admin/stock-locations' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -202,7 +202,7 @@ You can create a stock location using the [Create a Stock Location API Route](ht
```bash
curl -L -X POST '<BACKEND_URL>/admin/stock-locations' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Main Warehouse"
@@ -281,7 +281,7 @@ You can retrieve a stock location by sending a request to the [Get Stock Locatio
```bash
curl -L -X GET '<BACKEND_URL>/admin/stock-locations/<LOC_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -369,7 +369,7 @@ You can associate a stock location with a sales channel by sending a request to
```bash
curl -L -X POST '<BACKEND_URL>/admin/sales-channels/<CHANNEL_ID>/stock-locations' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"location_id": "<LOC_ID>"
@@ -467,7 +467,7 @@ You can remove the association between a stock location and a sales channel by s
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/sales-channels/<CHANNEL_ID>/stock-locations' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"location_id": "<LOC_ID>"
@@ -568,7 +568,7 @@ You can update a stock location by sending a request to the [Update Stock Locati
```bash
curl -L -X POST '<BACKEND_URL>/admin/stock-locations/<LOC_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Main Warehouse"
@@ -647,7 +647,7 @@ You can delete a stock location by sending a request to the [Delete Stock Locati
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/stock-locations/<LOC_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -144,7 +144,7 @@ To do that, send a request to the [Create an OrderEdit API Route](https://docs.m
```bash
curl -L -X POST '<BACKEND_URL>/admin/order-edits' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_id": "<ORDER_ID>"
@@ -252,7 +252,7 @@ To add a new item to the original order, send a request to the [Add Line Item AP
```bash
curl -L -X POST '<BACKEND_URL>/admin/order-edits/<ORDER_EDIT_ID>/items' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"quantity": 1,
@@ -344,7 +344,7 @@ To update an item, send a request to the [Update Line Item API Route](https://do
```bash
curl -L -X POST '<BACKEND_URL>/admin/order-edits/<ORDER_EDIT_ID>/items/<ITEM_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"quantity": 2
@@ -429,7 +429,7 @@ You can remove an item from the original order by sending a request to the [Remo
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/order-edits/<ORDER_EDIT_ID>/items/<ITEM_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -510,7 +510,7 @@ To revert an item change, send a request to the [Delete Item Change API Route](h
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/order-edits/<ORDER_EDIT_ID>/changes/<CHANGE_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -601,7 +601,7 @@ To move an Order Edit into the request state, send a request to the [Request Con
```bash
curl -L -X POST '<BACKEND_URL>/admin/order-edits/<ORDER_EDIT_ID>/request' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -702,7 +702,7 @@ To confirm an Order Edit, send a request to the [Confirm Order Edit API Route](h
```bash
curl -L -X POST '<BACKEND_URL>/admin/order-edits/<ORDER_EDIT_ID>/confirm' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -794,7 +794,7 @@ If the payment is authorized by the customer, it can be captured by sending a re
```bash
curl -L -X POST '<BACKEND_URL>/admin/payments/<PAYMENT_ID>/capture' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -891,7 +891,7 @@ To refund the difference to the customer, send a request to the [Refund Payment
```bash
curl -L -X POST '<BACKEND_URL>/admin/payments/<PAYMENT_ID>/refund' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"amount": 1000,

View File

@@ -123,7 +123,7 @@ To view an orders claims, you can retrieve the order using the [Get Order API
```bash
curl -L -X GET '<BACKEND_URL>/admin/orders/<ORDER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -224,7 +224,7 @@ You can create a claim by sending a request to the [Create Claim API Route](http
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/claims' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"type": "refund",
@@ -337,7 +337,7 @@ You can update a claim by sending a request to the [Update Claim API Route](http
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/claims/<CLAIM_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"no_notification": true
@@ -428,7 +428,7 @@ You can create a fulfillment for a claim by sending a request to the [Create Cla
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/claims/<CLAIM_ID>/fulfillments' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -515,7 +515,7 @@ You can create a shipment for a claim by sending a request to the [Create Claim
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/claims/<CLAIM_ID>/shipments' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"fulfillment_id": "<FUL_ID>"
@@ -614,7 +614,7 @@ You can cancel a fulfillment by sending a request to the [Cancel Fulfillment API
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/claims/<CLAIM_ID>/fulfillments/<FUL_ID>/cancel' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -694,7 +694,7 @@ You can cancel a claim by sending a request to the [Cancel Claim API Route](http
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/claims/<CLAIM_ID>/cancel' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -111,7 +111,7 @@ You can list draft orders by sending a request to the [List Draft Orders API Rou
```bash
curl -L -X GET '<BACKEND_URL>/admin/draft-orders' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -243,7 +243,7 @@ You can create a draft order by sending a request to the [Create Draft Order API
```bash
curl -L -X POST '<BACKEND_URL>/admin/draft-orders' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "<EMAIL>",
@@ -350,7 +350,7 @@ You can retrieve a draft order by sending a request to the [Get Draft Order API
```bash
curl -L -X GET '<BACKEND_URL>/admin/draft-orders/<DRAFT_ORDER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -435,7 +435,7 @@ You can update a draft order by sending a request to the [Update Draft Order API
```bash
curl -L -X POST '<BACKEND_URL>/admin/draft-orders/<DRAFT_ORDER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com"
@@ -530,7 +530,7 @@ You can add line items to a draft order by sending a request to the [Create Line
```bash
curl -L -X POST '<BACKEND_URL>/admin/draft-orders/<DRAFT_ORDER_ID>/line-items' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"quantity": 1
@@ -628,7 +628,7 @@ You can update a line item by sending a request to the [Update Line Item API Rou
```bash
curl -L -X POST '<BACKEND_URL>/admin/draft-orders/<DRAFT_ORDER_ID>/line-items/<ITEM_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"quantity": 1
@@ -705,7 +705,7 @@ You can delete a line item by sending a request to the [Delete Line Item API Rou
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/draft-orders/<DRAFT_ORDER_ID>/line-items/<ITEM_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -782,7 +782,7 @@ You can register the draft order payment by sending a request to the [Register D
```bash
curl -L -X POST '<BACKEND_URL>/admin/draft-orders/<DRAFT_ORDER_ID>/pay' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -857,7 +857,7 @@ You can delete a draft order by sending a request to the [Delete Draft Order API
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/draft-orders/<DRAFT_ORDER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -117,7 +117,7 @@ You can list orders by sending a request to the [List Orders API Route](https://
```bash
curl -L -X GET '<BACKEND_URL>/admin/orders' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -200,7 +200,7 @@ For example, you can filter the orders by one or more status:
```bash
curl -L -X GET '<BACKEND_URL>/admin/orders?status[]=completed' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -287,7 +287,7 @@ Another example is filtering the orders by a sales channel:
```bash
curl -L -X GET '<BACKEND_URL>/admin/orders?sales_channel_id[]=<CHANNEL_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -370,7 +370,7 @@ You can also combine filters together:
```bash
curl -L -X GET '<BACKEND_URL>/admin/orders?status[]=completed&sales_channel_id[]=<CHANNEL_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -438,7 +438,7 @@ You can retrieve an order by sending a request to the [Get an Order API Route](h
```bash
curl -L -X GET '<BACKEND_URL>/admin/orders/<ORDER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -537,7 +537,7 @@ You can update any of the above details of an order by sending a request to the
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com"
@@ -620,7 +620,7 @@ You can capture an orders payment by sending a request to the [Capture Order
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/capture' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -711,7 +711,7 @@ To refund payment, send a request to the [Refund Payment API Route](https://docs
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/refund' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"amount": 1000,
@@ -828,7 +828,7 @@ You can create a fulfillment by sending a request to the [Create a Fulfillment A
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/fulfillment' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"items": [
@@ -931,7 +931,7 @@ You can create a shipment for a fulfillment by sending a request to the [Create
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/shipment' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"fulfillment_id": "<FUL_ID>"
@@ -1014,7 +1014,7 @@ You can cancel a fulfillment by sending a request to the [Cancel Fulfillment API
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/fulfillments/<FUL_ID>/cancel' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -1089,7 +1089,7 @@ You can mark an order completed, changing its status, by sending a request to th
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/complete' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -1164,7 +1164,7 @@ You can cancel an order by sending a request to the [Cancel Order API Route](htt
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/cancel' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -1239,7 +1239,7 @@ You can archive an order by sending a request to the [Archive Order API Route](h
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/archive' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -118,7 +118,7 @@ You can list available return reasons using the [List Return Reasons API Route](
```bash
curl -L -X GET '<BACKEND_URL>/admin/return-reasons' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -201,7 +201,7 @@ You can create a return reason using the [Create Return Reason API Route](https:
```bash
curl -L -X POST '<BACKEND_URL>/admin/return-reasons' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"label": "Damaged",
@@ -296,7 +296,7 @@ You can update a return reason by sending a request to the [Update Return Reason
```bash
curl -L -X POST '<BACKEND_URL>/admin/return-reasons/<REASON_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"label": "Damaged"
@@ -375,7 +375,7 @@ You can delete a return reason by sending a request to the [Delete Return Reason
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/return-reasons/<REASON_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -464,7 +464,7 @@ When you retrieve an order using the [Get Order API Route](https://docs.medusajs
```bash
curl -L -X GET '<BACKEND_URL>/admin/orders/<ORDER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -578,7 +578,7 @@ You can mark a return as received by sending a request to the [Receive a Return
```bash
curl -L -X POST '<BACKEND_URL>/admin/returns/<RETURN_ID>/receive' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"items": [
@@ -675,7 +675,7 @@ You can cancel a return by sending a request to the [Cancel Return API Route](ht
```bash
curl -L -X POST '<BACKEND_URL>/admin/returns/<RETURN_ID>/cancel' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -129,7 +129,7 @@ You can view an orders swaps by retrieving the order using the [Get Order API
```bash
curl -L -X GET '<BACKEND_URL>/admin/orders/<ORDER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -212,7 +212,7 @@ Regardless of whether you need to refund or capture the payment, you can process
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/swaps/<SWAP_ID>/process-payment' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -302,7 +302,7 @@ You can create a fulfillment for a swap by sending a request to the [Create Swap
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/swaps/<SWAP_ID>/fulfillments' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -396,7 +396,7 @@ You can create a shipment for a swaps fulfillment using the [Create Swap Ship
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/swaps/<SWAP_ID>/shipments' \
-H 'Authorization: Bearer <API_TOKEN>'\
-H 'x-medusa-access-token: <API_TOKEN>'\
-H 'Content-Type: application/json' \
--data-raw '{
"fulfillment_id": "<FUL_ID>"
@@ -496,7 +496,7 @@ You can cancel a fulfillment by sending a request to the [Cancel Swap Fulfillmen
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/swaps/<SWAP_ID>/fulfillments/<FUL_ID>/cancel' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -585,7 +585,7 @@ You can cancel a swap by sending a request to the [Cancel Swap API Route](https:
```bash
curl -L -X POST '<BACKEND_URL>/admin/orders/<ORDER_ID>/swaps/<SWAP_ID>/cancel' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -202,7 +202,7 @@ You can do that by sending the following request to the [Upload Files API Route]
```bash
curl -L -X POST '<BACKEND_URL>/admin/uploads' \
-H 'Authorization: Bearer {api_token}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: text/csv' \
-F 'files=@"<FILE_PATH_1>"'
```
@@ -293,7 +293,7 @@ You can do that by sending the following request to the [Create a Batch Job API
```bash
curl -L -X POST '<BACKEND_URL>/admin/batch-jobs' \
-H 'Authorization: Bearer {api_token}' \
-H 'x-medusa-access-token: {api_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"type": "price-list-import",
@@ -393,7 +393,7 @@ You can retrieve all the details of the batch job, including its status and the
```bash
curl -L -X GET '<BACKEND_URL>/admin/batch-jobs/<BATCH_JOB_ID>' \
-H 'Authorization: Bearer {api_token}'
-H 'x-medusa-access-token: {api_token}'
# <BATCH_JOB_ID> is the ID of the batch job
```
@@ -481,7 +481,7 @@ To confirm a batch job send the following request:
```bash
curl -L -X POST '<BACKEND_URL>/admin/batch-jobs/<BATCH_JOB_ID>/confirm' \
-H 'Authorization: Bearer {api_token}'
-H 'x-medusa-access-token: {api_token}'
# <BATCH_JOB_ID> is the ID of the batch job
```

View File

@@ -195,7 +195,7 @@ For example, sending the following request creates a price list with two prices:
```bash
curl -L -X POST '<YOUR_BACKEND_URL>/admin/price-lists' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "New Price List",
@@ -289,7 +289,7 @@ You can retrieve all of a price lists details using the Get a Price List API
```bash
curl -L -X GET '<BACKEND_URL>/admin/price-lists/{id}' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -374,7 +374,7 @@ For example, by sending the following request the end date of the price list wil
```bash
curl -L -X POST '<BACKEND_URL>/admin/price-lists/<PRICE_LIST_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"ends_at": "2022-10-11"
@@ -489,7 +489,7 @@ For example, sending the following request adds a new price to the price list:
```bash
curl -L -X POST '<BACKEND_URL>/admin/price-lists/<PRICE_LIST_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"prices": [
@@ -587,7 +587,7 @@ You can delete all the prices of a products variants using the [Delete Produc
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/price-lists/<PRICE_LIST_ID>/products/<PRODUCT_ID>/prices' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -673,7 +673,7 @@ You can delete all the prices of a variant using the [Delete Variant Prices API
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/price-lists/<PRICE_LIST_ID>/variants/<VARIANT_ID>/prices' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -746,7 +746,7 @@ You can delete a price list, and subsequently all prices defined in it, using th
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/price-lists/<PRICE_LIST_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -928,7 +928,7 @@ You can do that by sending the following request to the [Upload Files API Route]
```bash
curl -L -X POST '<BACKEND_URL>/admin/uploads' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-F 'files=@"<FILE_PATH_1>"'
```
@@ -1018,7 +1018,7 @@ You can do that by sending the following request to the [Create a Batch Job API
```bash
curl -L -X POST '<BACKEND_URL>/admin/batch-jobs' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"type": "product-import",
@@ -1114,7 +1114,7 @@ You can retrieve all the details of the batch job, including its status and the
```bash
curl -L -X GET '<BACKEND_URL>/admin/batch-jobs/<BATCH_JOB_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
# <BATCH_JOB_ID> is the ID of the batch job
```
@@ -1202,7 +1202,7 @@ To confirm a batch job send the following request:
```bash
curl -L -X POST '<BACKEND_URL>/admin/batch-jobs/<BATCH_JOB_ID>/confirm' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
# <BATCH_JOB_ID> is the ID of the batch job
```

View File

@@ -117,7 +117,7 @@ You can retrieve available categories by sending a request to the [List Categori
```bash
curl -L -X GET '<BACKEND_URL>/admin/product-categories' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -198,7 +198,7 @@ You can create a category by sending a request to the [Create a Category API Rou
```bash
curl -L -X POST '<BACKEND_URL>/admin/product-categories' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Skinny Jeans"
@@ -283,7 +283,7 @@ You can retrieve a product category by sending a request to the [Get a Product C
```bash
curl -L -X GET '<BACKEND_URL>/admin/product-categories/<CAT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -374,7 +374,7 @@ You can edit a product category by sending a request to the [Update a Product Ca
```bash
curl -L -X POST '<BACKEND_URL>/admin/product-categories/<CAT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Skinny Jeans",
@@ -495,7 +495,7 @@ You can add more than one product to a category using the [Add Products to a Cat
```bash
curl -L -X POST '<BACKEND_URL>/admin/product-categories/<CAT_ID>/products/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"product_ids": [
@@ -618,7 +618,7 @@ You can remove products from a category by sending a request to the [Delete Prod
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/product-categories/<CAT_ID>/products/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"product_ids": [
@@ -709,7 +709,7 @@ You can delete a product category by sending a request to the [Delete a Product
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/product-categories/<CAT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -109,7 +109,7 @@ You can list products as an admin using the [List Products API Route](https://do
```bash
curl -L -X GET '<BACKEND_URL>/admin/products' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -317,7 +317,7 @@ You can create a product by sending a request to the [Create a Product API Route
```bash
curl -L -X POST '<BACKEND_URL>/admin/products' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "Shirt 2",
@@ -461,7 +461,7 @@ You can retrieve a single product as an admin by sending a request to the [Get a
```bash
curl -L -X GET '<BACKEND_URL>/admin/products/<PRODUCT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -548,7 +548,7 @@ You can update a product by sending a request to the [Update Product API Route](
```bash
curl -L -X POST '<BACKEND_URL>/admin/products/<PRODUCT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Shirt"
@@ -651,7 +651,7 @@ You can add a product option to a product by sending a request to the [Add Produ
```bash
curl -L -X POST '<BACKEND_URL>/admin/products/<PRODUCT_ID>/options' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Size"
@@ -747,7 +747,7 @@ You can update a product option by sending a request to the [Update Product Opti
```bash
curl -L -X POST '<BACKEND_URL>/admin/products/<PRODUCT_ID>/options/<OPT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Size"
@@ -832,7 +832,7 @@ You can delete a product option by sending a request to the [Delete Product Opti
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/products/<PRODUCT_ID>/options/<OPT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -966,7 +966,7 @@ You can create a product variant by sending a request to the [Create Product Var
```bash
curl -L -X POST '<BACKEND_URL>/admin/products/<PRODUCT_ID>/variants' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "White Shirt",
@@ -1080,7 +1080,7 @@ You can update a product variant by sending a request to the [Update a Product V
```bash
curl -L -X POST '<BACKEND_URL>/admin/products/<PRODUCT_ID>/variants/<VARIANT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "White Shirt"
@@ -1165,7 +1165,7 @@ You can delete a product variant by sending a request to the [Delete a Product V
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/products/<PRODUCT_ID>/variants/<VARIANT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -1245,7 +1245,7 @@ You can delete a product by sending a request to the [Delete a Product API Route
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/products/<PRODUCT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -141,7 +141,7 @@ You can list product categories by sending a request to the [List Product Catego
```bash
curl -L -X GET '<BACKEND_URL>/store/product-categories' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -242,7 +242,7 @@ You can retrieve a single product category by its ID using the [Get a Product Ca
```bash
curl -L -X GET '<BACKEND_URL>/store/product-categories/<CAT_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -358,7 +358,7 @@ You can retrieve the details of a category by its handle by sending a request to
```bash
curl -L -X GET '<BACKEND_URL>/store/product-categories?handle=women' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -120,7 +120,7 @@ You can list all available currencies in your system by sending a request to the
```bash
curl -L -X GET '<BACKEND_URL>/admin/currencies' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -199,7 +199,7 @@ You can update a currency by sending a request to the [Update Currency API Route
```bash
curl -L -X GET '<BACKEND_URL>/admin/currencies/<CODE>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"includes_tax": true
@@ -294,7 +294,7 @@ You can list currencies in a store by sending a request to the [Get Store Detail
```bash
curl -L -X POST '<BACKEND_URL>/admin/store' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -362,7 +362,7 @@ You can add a currency to a store using the [Add a Currency Code API Route](http
```bash
curl -L -X POST '<BACKEND_URL>/admin/store/currencies/<CODE>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -429,7 +429,7 @@ You can remove a currency from a store by sending a request to the [Delete Curre
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/store/currencies/<CODE>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -119,7 +119,7 @@ You can retrieve regions available on your backend using the [List Regions API R
```bash
curl -L -X GET '<BACKEND_URL>/admin/regions' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -231,7 +231,7 @@ You can create a region by sending a request to the [Create a Region API Route](
```bash
curl -L -X POST '<BACKEND_URL>/admin/regions' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Europe",
@@ -350,7 +350,7 @@ Alternatively, you can update the details of a region using the [Update a Region
```bash
curl -L -X POST '<BACKEND_URL>/admin/regions/<REGION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"countries": [
@@ -466,7 +466,7 @@ You can add a shipping option to a region by sending a request to the [Create Sh
```bash
curl -L -X POST '<BACKEND_URL>/admin/shipping-options' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "PostFake",
@@ -565,7 +565,7 @@ You can delete a region by sending a request to the [Delete a Region API Route](
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/regions/<REGION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -120,7 +120,7 @@ You can create a sales channel by sending a request to the Create a Sales Channe
```bash
curl -L -X POST '<BACKEND_URL>/admin/sales-channels' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
name: 'App',
@@ -198,7 +198,7 @@ You can list all sales channels by sending a request to the List Sales Channels
```bash
curl -L -X GET '<BACKEND_URL>/admin/sales-channels' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -267,7 +267,7 @@ You can retrieve a sales channels details by its ID using the Get Sales Chann
```bash
curl -L -X GET '<BACKEND_URL>/admin/sales-channels/<SALES_CHANNEL_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -352,7 +352,7 @@ You can update a Sales Channels details and attributes by sending a request t
```bash
curl -L -X POST '<BACKEND_URL>/admin/sales-channels/<SALES_CHANNEL_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"is_disabled": false
@@ -433,7 +433,7 @@ You can delete a sales channel by sending a request to the Delete Sales Channel
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/sales-channels/<SALES_CHANNEL_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -535,7 +535,7 @@ To add a product to a sales channel, send a request to the Sales Channels Add
```bash
curl -L -X POST '<BACKEND_URL>/admin/sales-channels/<SALES_CHANNEL_ID>/products/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"product_ids": [
@@ -631,7 +631,7 @@ You can list the products available in a sales channel by sending a request to t
```bash
curl -L -X GET '<BACKEND_URL>/admin/products?sales_channel_id[0]=<SALES_CHANNEL_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -739,7 +739,7 @@ You can delete a product from a sales channel by sending a request to the Sales
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/sales-channels/<SALES_CHANNEL_ID>/products/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"product_ids": [
@@ -831,7 +831,7 @@ You can filter orders by a specific sales channel by sending a request to the Li
```bash
curl -L -X GET '<BACKEND_URL>/admin/orders?sales_channel_id[0]=<SALES_CHANNEL_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -110,7 +110,7 @@ You can list the tax rates by sending a request to the [List Tax Rates API Route
```bash
curl -L -X GET '<BACKEND_URL>/admin/tax-rates' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -185,7 +185,7 @@ You can retrieve the tax rate of a region by passing the `region_id` query param
```bash
curl -L -X GET '<BACKEND_URL>/admin/tax-rates?region_id=reg_123' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -258,7 +258,7 @@ This query parameter also accepts an array of strings, allowing you to filter th
```bash
curl -L -X GET '<BACKEND_URL>/admin/tax-rates?region_id[]=reg_123&region_id[]=reg_456' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -350,7 +350,7 @@ You can create a tax rate by sending a request to the [Create Tax Rate API Route
```bash
curl -L -X POST '<BACKEND_URL>/admin/tax-rates' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"code": "TEST",
@@ -454,7 +454,7 @@ You can update a tax rate by sending a request to the [Update Tax Rate API Route
```bash
curl -L -X POST '<BACKEND_URL>/admin/tax-rates/<TAX_RATE_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "New Tax Rate"
@@ -553,7 +553,7 @@ You can add a product to a tax rate by sending a request to the [Add Products AP
```bash
curl -L -X POST '<BACKEND_URL>/admin/tax-rates/<TAX_RATE_ID>/products/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"products": [
@@ -646,7 +646,7 @@ You can remove a product from a tax rate by sending a request to the [Delete Pro
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/tax-rates/<TAX_RATE_ID>/products/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"products": [
@@ -751,7 +751,7 @@ You can add a product type to a tax rate by sending a request to the [Add Produc
```bash
curl -L -X POST '<BACKEND_URL>/admin/tax-rates/<TAX_RATE_ID>/product-types/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"product_types": [
@@ -852,7 +852,7 @@ You can remove a product type from a tax rate by sending a request to the [Delet
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/tax-rates/<TAX_RATE_ID>/product-types/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"product_types": [
@@ -957,7 +957,7 @@ You can add a shipping option to a tax rate by sending a request to the [Add Shi
```bash
curl -L -X POST '<BACKEND_URL>/admin/tax-rates/<TAX_RATE_ID>/shipping-options/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"shipping_options": [
@@ -1054,7 +1054,7 @@ You can remove a shipping option from a tax rate by sending a request to the [De
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/tax-rates/<TAX_RATE_ID>/shipping-options/batch' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"shipping_options": [
@@ -1135,7 +1135,7 @@ You can delete a tax rate by sending a request to the [Delete Tax Rate API Route
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/tax-rates/<TAX_RATE_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -114,7 +114,7 @@ You can list all tax providers of a store using the [List Tax Providers API Rout
```bash
curl -L -X GET '<BACKEND_URL>/admin/store/tax-providers' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -193,7 +193,7 @@ You can change the tax provider of a region using the [Update Region API Route](
```bash
curl -L -X POST '<BACKEND_URL>/admin/regions/<REGION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"tax_provider_id": "<TAX_PROVIDER_ID>"
@@ -292,7 +292,7 @@ In addition to changing the tax provider, you can use the same [Update Region AP
```bash
curl -L -X POST '<BACKEND_URL>/admin/regions/<REGION_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"tax_provider_id": "<TAX_PROVIDER_ID>",

View File

@@ -113,7 +113,7 @@ You can list invites by sending a request to the [List Invite API Route](https:/
```bash
curl -L -X GET '<BACKEND_URL>/admin/invites' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -191,7 +191,7 @@ You can create an invite by sending a request to the [Create Invite API Route](h
```bash
curl -L -X POST '<BACKEND_URL>/admin/invites' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"user": "user@example.com",
@@ -379,7 +379,7 @@ You can resend an invite if its not accepted yet. To resend an invite, send a
```bash
curl -L -X POST '<BACKEND_URL>/admin/invites/<INVITE_ID>/resend' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -452,7 +452,7 @@ You can delete an invite by sending a request to the [Delete Invite API Route](h
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/invites/<INVITE_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>

View File

@@ -186,7 +186,7 @@ You can log out a user by sending a request to the [User Logout API Route](https
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/auth' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -250,7 +250,7 @@ You can retrieve the current users details for their profile by sending a req
```bash
curl -L -X GET '<BACKEND_URL>/admin/auth' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -335,7 +335,7 @@ You can update a users details in their profile by sending a request to the [
```bash
curl -L -X POST '<BACKEND_URL>/admin/users/<USER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"first_name": "Marcellus"

View File

@@ -110,7 +110,7 @@ You can retrieve users in a store by sending a request to the [List Users API Ro
```bash
curl -L -X GET '<BACKEND_URL>/admin/users' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>
@@ -192,7 +192,7 @@ You can create a user by sending a request to the [Create User API Route](https:
```bash
curl -L -X POST '<BACKEND_URL>/admin/users' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com",
@@ -287,7 +287,7 @@ You can update a users details by sending a request to the [Update User API R
```bash
curl -L -X POST '<BACKEND_URL>/admin/users/<USER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'x-medusa-access-token: <API_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{
"first_name": "Marcellus"
@@ -366,7 +366,7 @@ You can delete a user by sending a request to the [Delete User API Route](https:
```bash
curl -L -X DELETE '<BACKEND_URL>/admin/users/<USER_ID>' \
-H 'Authorization: Bearer <API_TOKEN>'
-H 'x-medusa-access-token: <API_TOKEN>'
```
</TabItem>