chore(docs): Generated API reference (#2788)
This commit is contained in:
@@ -7,5 +7,6 @@ curl --location --request POST 'https://medusa-url.com/admin/discounts' \
|
||||
"type": "fixed",
|
||||
"value": 10,
|
||||
"allocation": "item"
|
||||
}
|
||||
},
|
||||
"regions": ['reg_XXXXXXXX']
|
||||
}'
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request DELETE 'https://medusa-url.com/admin/payment-collections/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/admin/payment-collections/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,6 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/payment-collections/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"description": "Description of payCol"
|
||||
}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/payment-collections/{id}/authorize' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/admin/payments/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/payments/{id}/capture' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,8 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/payments/pay_123/refund' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"amount": 1000,
|
||||
"reason": "return",
|
||||
"note": "Do not like it"
|
||||
}'
|
||||
@@ -0,0 +1,6 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/publishable-api-key/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"title": "updated title"
|
||||
}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/admin/publishable-api-keys' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,3 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/publishable-api-keys' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
-d '{ "created_by": "user_123" }'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/admin/publishable-api-keys/pk_123/sales-channels' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request DELETE 'https://medusa-url.com/admin/publishable-api-key/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,3 @@
|
||||
curl --location --request GET 'https://medusa-url.com/admin/publishable-api-keys/pubkey_123' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
-d '{ "created_by": "user_123" }'
|
||||
@@ -0,0 +1,3 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/publishable-api-keys/pubkey_123/revoke' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
-d '{ "created_by": "user_123", "revoked_by": "user_123" }'
|
||||
@@ -0,0 +1,10 @@
|
||||
curl --location --request DELETE 'https://medusa-url.com/admin/publishable-api-keys/afasf/batch' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"sales_channel_ids": [
|
||||
{
|
||||
"id": "{sales_channel_id}"
|
||||
}
|
||||
]
|
||||
}'
|
||||
@@ -0,0 +1,10 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/publishable-api-keys/afasf/batch' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"sales_channel_ids": [
|
||||
{
|
||||
"id": "{sales_channel_id}"
|
||||
}
|
||||
]
|
||||
}'
|
||||
Reference in New Issue
Block a user