chore(docs): Generated API Reference (#2143)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4961aece1c
commit
a1350bfaec
7
docs/api/store/code_samples/JavaScript/auth/getundefined
Normal file
7
docs/api/store/code_samples/JavaScript/auth/getundefined
Normal file
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged
|
||||
medusa.auth.getSession()
|
||||
.then(({ customer }) => {
|
||||
console.log(customer.id);
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.auth.authenticate({
|
||||
email: 'user@example.com',
|
||||
password: 'user@example.com'
|
||||
})
|
||||
.then(({ customer }) => {
|
||||
console.log(customer.id);
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.auth.exists('user@example.com')
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.create()
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.retrieve(cart_id)
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.update(cart_id, {
|
||||
email: 'user@example.com'
|
||||
})
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.complete(cart_id)
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.deleteDiscount(cart_id, code)
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.lineItems.create(cart_id, {
|
||||
variant_id,
|
||||
quantity: 1
|
||||
})
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.lineItems.delete(cart_id, line_id)
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.lineItems.update(cart_id, line_id, {
|
||||
quantity: 1
|
||||
})
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.setPaymentSession(cart_id, {
|
||||
provider_id: 'manual'
|
||||
})
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.createPaymentSessions(cart_id)
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.deletePaymentSession(cart_id, 'manual')
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.updatePaymentSession(cart_id, 'manual', {
|
||||
data: {
|
||||
}
|
||||
})
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.refreshPaymentSession(cart_id, 'manual')
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.addShippingMethod(cart_id, {
|
||||
option_id
|
||||
})
|
||||
.then(({ cart }) => {
|
||||
console.log(cart.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.collections.list()
|
||||
.then(({ collections, limit, offset, count }) => {
|
||||
console.log(collections.length);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.collections.retrieve(collection_id)
|
||||
.then(({ collection }) => {
|
||||
console.log(collection.id);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.customers.create({
|
||||
first_name: 'Alec',
|
||||
last_name: 'Reynolds',
|
||||
email: 'user@example.com',
|
||||
password: 'supersecret'
|
||||
})
|
||||
.then(({ customer }) => {
|
||||
console.log(customer.id);
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged
|
||||
medusa.customers.retrieve()
|
||||
.then(({ customer }) => {
|
||||
console.log(customer.id);
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged
|
||||
medusa.customers.update({
|
||||
first_name: 'Laury'
|
||||
})
|
||||
.then(({ customer }) => {
|
||||
console.log(customer.id);
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged
|
||||
medusa.customers.addresses.addAddress({
|
||||
address: {
|
||||
first_name: 'Celia',
|
||||
last_name: 'Schumm',
|
||||
address_1: '225 Bednar Curve',
|
||||
city: 'Danielville',
|
||||
country_code: 'US',
|
||||
postal_code: '85137',
|
||||
phone: '981-596-6748 x90188',
|
||||
company: 'Wyman LLC',
|
||||
address_2: '',
|
||||
province: 'Georgia',
|
||||
metadata: {}
|
||||
}
|
||||
})
|
||||
.then(({ customer }) => {
|
||||
console.log(customer.id);
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged
|
||||
medusa.customers.addresses.deleteAddress(address_id)
|
||||
.then(({ customer }) => {
|
||||
console.log(customer.id);
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged
|
||||
medusa.customers.addresses.updateAddress(address_id, {
|
||||
first_name: 'Gina'
|
||||
})
|
||||
.then(({ customer }) => {
|
||||
console.log(customer.id);
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged
|
||||
medusa.customers.listOrders()
|
||||
.then(({ orders, limit, offset, count }) => {
|
||||
console.log(orders);
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged
|
||||
medusa.customers.paymentMethods.list()
|
||||
.then(({ payment_methods }) => {
|
||||
console.log(payment_methods.length);
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.customers.resetPassword({
|
||||
email: 'user@example.com',
|
||||
password: 'supersecret',
|
||||
token: 'supersecrettoken'
|
||||
})
|
||||
.then(({ customer }) => {
|
||||
console.log(customer.id);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.customers.generatePasswordToken({
|
||||
email: 'user@example.com'
|
||||
})
|
||||
.then(() => {
|
||||
// successful
|
||||
})
|
||||
.catch(() => {
|
||||
// failed
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.giftCards.retrieve(code)
|
||||
.then(({ gift_card }) => {
|
||||
console.log(gift_card.id);
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.orders.lookupOrder({
|
||||
display_id: 1,
|
||||
email: 'user@example.com'
|
||||
})
|
||||
.then(({ order }) => {
|
||||
console.log(order.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.orders.retrieveByCartId(cart_id)
|
||||
.then(({ order }) => {
|
||||
console.log(order.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.orders.retrieve(order_id)
|
||||
.then(({ order }) => {
|
||||
console.log(order.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.products.list()
|
||||
.then(({ products, limit, offset, count }) => {
|
||||
console.log(products.length);
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.products.search({
|
||||
q: 'Shirt'
|
||||
})
|
||||
.then(({ hits }) => {
|
||||
console.log(hits.length);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.products.retrieve(product_id)
|
||||
.then(({ product }) => {
|
||||
console.log(product.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.regions.list()
|
||||
.then(({ regions }) => {
|
||||
console.log(regions.length);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.regions.retrieve(region_id)
|
||||
.then(({ region }) => {
|
||||
console.log(region.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.returnReasons.list()
|
||||
.then(({ return_reasons }) => {
|
||||
console.log(return_reasons.length);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.returnReasons.retrieve(reason_id)
|
||||
.then(({ return_reason }) => {
|
||||
console.log(return_reason.id);
|
||||
});
|
||||
14
docs/api/store/code_samples/JavaScript/returns/postundefined
Normal file
14
docs/api/store/code_samples/JavaScript/returns/postundefined
Normal file
@@ -0,0 +1,14 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.returns.create({
|
||||
order_id,
|
||||
items: [
|
||||
{
|
||||
item_id,
|
||||
quantity: 1
|
||||
}
|
||||
]
|
||||
})
|
||||
.then(({ return }) => {
|
||||
console.log(return.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.shippingOptions.list()
|
||||
.then(({ shipping_options }) => {
|
||||
console.log(shipping_options.length);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.shippingOptions.listCartOptions(cart_id)
|
||||
.then(({ shipping_options }) => {
|
||||
console.log(shipping_options.length);
|
||||
});
|
||||
20
docs/api/store/code_samples/JavaScript/swaps/postundefined
Normal file
20
docs/api/store/code_samples/JavaScript/swaps/postundefined
Normal file
@@ -0,0 +1,20 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.swaps.create({
|
||||
order_id,
|
||||
return_items: [
|
||||
{
|
||||
item_id,
|
||||
quantity: 1
|
||||
}
|
||||
],
|
||||
additional_items: [
|
||||
{
|
||||
variant_id,
|
||||
quantity: 1
|
||||
}
|
||||
]
|
||||
})
|
||||
.then(({ swap }) => {
|
||||
console.log(swap.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.swaps.retrieveByCartId(cart_id)
|
||||
.then(({ swap }) => {
|
||||
console.log(swap.id);
|
||||
});
|
||||
2
docs/api/store/code_samples/Shell/auth/deleteundefined
Normal file
2
docs/api/store/code_samples/Shell/auth/deleteundefined
Normal file
@@ -0,0 +1,2 @@
|
||||
curl --location --request DELETE 'https://medusa-url.com/store/auth' \
|
||||
--header 'Cookie: connect.sid={sid}'
|
||||
2
docs/api/store/code_samples/Shell/auth/getundefined
Normal file
2
docs/api/store/code_samples/Shell/auth/getundefined
Normal file
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/auth' \
|
||||
--header 'Cookie: connect.sid={sid}'
|
||||
6
docs/api/store/code_samples/Shell/auth/postundefined
Normal file
6
docs/api/store/code_samples/Shell/auth/postundefined
Normal file
@@ -0,0 +1,6 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/auth' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"email": "user@example.com",
|
||||
"password": "supersecret"
|
||||
}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/auth/user@example.com' \
|
||||
--header 'Cookie: connect.sid={sid}'
|
||||
1
docs/api/store/code_samples/Shell/carts/postundefined
Normal file
1
docs/api/store/code_samples/Shell/carts/postundefined
Normal file
@@ -0,0 +1 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/carts'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/carts/{id}'
|
||||
@@ -0,0 +1,5 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/carts/{id}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"email": "user@example.com"
|
||||
}'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/complete'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request DELETE 'https://medusa-url.com/store/carts/{id}/discounts/{code}'
|
||||
@@ -0,0 +1,6 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/line-items' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"variant_id": "{variant_id}",
|
||||
"quantity": 1
|
||||
}'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request DELETE 'https://medusa-url.com/store/carts/{id}/line-items/{line_id}'
|
||||
@@ -0,0 +1,5 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/line-items/{line_id}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"quantity": 1
|
||||
}'
|
||||
@@ -0,0 +1,5 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/payment-sessions' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"provider_id": "manual"
|
||||
}'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/payment-sessions'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request DELETE 'https://medusa-url.com/store/carts/{id}/payment-sessions/manual'
|
||||
@@ -0,0 +1,5 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/payment-sessions/manual' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"data": {}
|
||||
}'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/payment-sessions/manual/refresh'
|
||||
@@ -0,0 +1,5 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/shipping-methods' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"option_id": "{option_id}",
|
||||
}'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/taxes'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/collections'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/collections/{id}'
|
||||
@@ -0,0 +1,8 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/customers' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"first_name": "Alec",
|
||||
"last_name": "Reynolds",
|
||||
"email": "user@example.com",
|
||||
"password": "supersecret"
|
||||
}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/customers/me' \
|
||||
--header 'Cookie: connect.sid={sid}'
|
||||
@@ -0,0 +1,6 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/customers/me' \
|
||||
--header 'Cookie: connect.sid={sid}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"first_name": "Laury"
|
||||
}'
|
||||
@@ -0,0 +1,13 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/customers/me/addresses' \
|
||||
--header 'Cookie: connect.sid={sid}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"address": {
|
||||
"first_name": "Celia",
|
||||
"last_name": "Schumm",
|
||||
"address_1": "225 Bednar Curve",
|
||||
"city": "Danielville",
|
||||
"country_code": "US",
|
||||
"postal_code": "85137"
|
||||
}
|
||||
}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request DELETE 'https://medusa-url.com/store/customers/me/addresses/{address_id}' \
|
||||
--header 'Cookie: connect.sid={sid}'
|
||||
@@ -0,0 +1,6 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/customers/me/addresses/{address_id}' \
|
||||
--header 'Cookie: connect.sid={sid}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"first_name": "Gina"
|
||||
}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/customers/me/orders' \
|
||||
--header 'Cookie: connect.sid={sid}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/customers/me/payment-methods' \
|
||||
--header 'Cookie: connect.sid={sid}'
|
||||
@@ -0,0 +1,7 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/customers/password-reset' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"email": "user@example.com",
|
||||
"password": "supersecret",
|
||||
"token": "supersecrettoken"
|
||||
}'
|
||||
@@ -0,0 +1,5 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/customers/password-token' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"email": "user@example.com"
|
||||
}'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/gift-cards/{code}'
|
||||
1
docs/api/store/code_samples/Shell/orders/getundefined
Normal file
1
docs/api/store/code_samples/Shell/orders/getundefined
Normal file
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/orders?display_id=1&email=user@example.com'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/orders/cart/{id}'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/orders/{id}'
|
||||
1
docs/api/store/code_samples/Shell/products/getundefined
Normal file
1
docs/api/store/code_samples/Shell/products/getundefined
Normal file
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/products'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/products/search?q=Shirt'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/products/{id}'
|
||||
1
docs/api/store/code_samples/Shell/regions/getundefined
Normal file
1
docs/api/store/code_samples/Shell/regions/getundefined
Normal file
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/regions'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/regions/{id}'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/return-reasons'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/return-reasons/{id}'
|
||||
11
docs/api/store/code_samples/Shell/returns/postundefined
Normal file
11
docs/api/store/code_samples/Shell/returns/postundefined
Normal file
@@ -0,0 +1,11 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/returns' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"order_id": "asfasf",
|
||||
"items": [
|
||||
{
|
||||
"item_id": "assfasf",
|
||||
"quantity": 1
|
||||
}
|
||||
]
|
||||
}'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/shipping-options'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/shipping-options/{cart_id}'
|
||||
17
docs/api/store/code_samples/Shell/swaps/postundefined
Normal file
17
docs/api/store/code_samples/Shell/swaps/postundefined
Normal file
@@ -0,0 +1,17 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/swaps' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"order_id": "asfasf",
|
||||
"return_items": [
|
||||
{
|
||||
"item_id": "asfas",
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"additional_items": [
|
||||
{
|
||||
"variant_id": "asfas",
|
||||
"quantity": 1
|
||||
}
|
||||
]
|
||||
}'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/swaps/{cart_id}'
|
||||
1
docs/api/store/code_samples/Shell/variants/getundefined
Normal file
1
docs/api/store/code_samples/Shell/variants/getundefined
Normal file
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/variants'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/variants/{id}'
|
||||
Reference in New Issue
Block a user