Files
medusa-store/docs/api/fixtures.json
Sebastian Rindom 7c7f86e8e8 fix: allows shipping option filters in return (#202)
* fix: allows shipping option filters in return

* fix: test

* chore: update fixtures

* docs: update openapi
2021-03-12 14:23:03 +01:00

739 lines
23 KiB
JSON

{
"resources": {
"customer": {
"id": "cus_01F0K18KCA0FNCJHWYV7HYPENX",
"email": "test1@email.com",
"first_name": null,
"last_name": null,
"billing_address_id": null,
"password_hash": null,
"phone": null,
"has_account": false,
"orders": [],
"created_at": "2021-03-12T10:56:08.074Z",
"updated_at": "2021-03-12T10:56:08.074Z",
"deleted_at": null,
"metadata": null
},
"order": {
"id": "order_01F0K17W8Z3T61W1MHSQRRCKH4",
"status": "pending",
"fulfillment_status": "not_fulfilled",
"payment_status": "not_paid",
"display_id": 1,
"cart_id": null,
"customer_id": "cus_01F0K17W7MAHJX7WWJRM6TK5EY",
"customer": {
"id": "cus_01F0K17W7MAHJX7WWJRM6TK5EY",
"email": "test@email.com",
"first_name": null,
"last_name": null,
"billing_address_id": null,
"password_hash": null,
"phone": null,
"has_account": false,
"created_at": "2021-03-12T10:55:44.372Z",
"updated_at": "2021-03-12T10:55:44.372Z",
"deleted_at": null,
"metadata": null
},
"email": "test@email.com",
"billing_address": {
"id": "addr_01F0K17W8ZDQS2S1EX8A293RTZ",
"customer_id": null,
"company": null,
"first_name": "lebron",
"last_name": null,
"address_1": null,
"address_2": null,
"city": null,
"country_code": null,
"province": null,
"postal_code": null,
"phone": null,
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"deleted_at": null,
"metadata": null
},
"shipping_address": {
"id": "addr_01F0K17W8ZV35SS5XHM1RMA4BF",
"customer_id": null,
"company": null,
"first_name": "lebron",
"last_name": null,
"address_1": null,
"address_2": null,
"city": null,
"country_code": "us",
"province": null,
"postal_code": null,
"phone": null,
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"deleted_at": null,
"metadata": null
},
"region_id": "reg_01F0K17W77HC1F9NB27M6R1AP0",
"region": {
"id": "reg_01F0K17W77HC1F9NB27M6R1AP0",
"name": "Test Region",
"currency_code": "usd",
"tax_rate": "0",
"tax_code": null,
"payment_providers": [],
"fulfillment_providers": [],
"created_at": "2021-03-12T10:55:44.359Z",
"updated_at": "2021-03-12T10:55:44.359Z",
"deleted_at": null,
"metadata": null
},
"currency_code": "usd",
"tax_rate": 0,
"discounts": [
{
"id": "test-discount",
"code": "TEST134",
"is_dynamic": false,
"rule_id": "dru_01F0K17W8ZM2ZX3F1WSBHK7CGS",
"rule": {
"id": "dru_01F0K17W8ZM2ZX3F1WSBHK7CGS",
"description": "Test Discount",
"type": "percentage",
"value": 10,
"allocation": "total",
"usage_limit": null,
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"deleted_at": null,
"metadata": null
},
"is_disabled": false,
"parent_discount_id": null,
"starts_at": "2021-03-12T10:55:44.415Z",
"ends_at": null,
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"deleted_at": null,
"metadata": null
}
],
"gift_cards": [],
"shipping_methods": [
{
"id": "sm_01F0K17WA1GJXPNM9PZ5TCS2QV",
"shipping_option_id": "so_01F0K17W7VA316M9Y0PHBDCD9P",
"order_id": "order_01F0K17W8Z3T61W1MHSQRRCKH4",
"claim_order_id": null,
"cart_id": null,
"swap_id": null,
"return_id": null,
"shipping_option": {
"id": "so_01F0K17W7VA316M9Y0PHBDCD9P",
"name": "test-option",
"region_id": "reg_01F0K17W77HC1F9NB27M6R1AP0",
"profile_id": "sp_01F0K17W52ZB0BKW4S0QKQBSGC",
"provider_id": "test-ful",
"price_type": "flat_rate",
"amount": 1000,
"is_return": false,
"data": {},
"created_at": "2021-03-12T10:55:44.379Z",
"updated_at": "2021-03-12T10:55:44.379Z",
"deleted_at": null,
"metadata": null
},
"price": 1000,
"data": {}
}
],
"payments": [
{
"id": "test-payment",
"swap_id": null,
"cart_id": null,
"order_id": "order_01F0K17W8Z3T61W1MHSQRRCKH4",
"amount": 10000,
"currency_code": "usd",
"amount_refunded": 0,
"provider_id": "test",
"data": {},
"captured_at": null,
"canceled_at": null,
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"metadata": null,
"idempotency_key": null
}
],
"fulfillments": [],
"returns": [],
"claims": [],
"refunds": [],
"swaps": [],
"items": [
{
"id": "test-item",
"cart_id": null,
"order_id": "order_01F0K17W8Z3T61W1MHSQRRCKH4",
"swap_id": null,
"claim_order_id": null,
"title": "Line Item",
"description": "Line Item Desc",
"thumbnail": "https://test.js/1234",
"is_giftcard": false,
"should_merge": true,
"allow_discounts": true,
"has_shipping": null,
"unit_price": 8000,
"variant_id": null,
"variant": null,
"quantity": 1,
"fulfilled_quantity": 1,
"returned_quantity": null,
"shipped_quantity": null,
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"metadata": null,
"refundable": 7200
}
],
"gift_card_transactions": [],
"canceled_at": null,
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"metadata": null,
"shipping_total": 1000,
"gift_card_total": 0,
"discount_total": 800,
"tax_total": 0,
"subtotal": 8000,
"total": 8200,
"refunded_total": 0,
"refundable_amount": 8200
},
"product": {
"id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"title": "Test product",
"subtitle": null,
"description": "test-product-description",
"handle": "test-product",
"is_giftcard": false,
"images": [],
"thumbnail": null,
"options": [
{
"id": "opt_01F0K1814KYQSBS6ESDGGV703V",
"title": "size",
"product_id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
{
"id": "opt_01F0K1814MV2PBHXFVTHAD8KA8",
"title": "color",
"product_id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
}
],
"variants": [
{
"id": "variant_01F0K1815DA13R050ETD3QE8CG",
"title": "Test variant",
"product_id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"product": {
"id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"title": "Test product",
"subtitle": null,
"description": "test-product-description",
"handle": "test-product",
"is_giftcard": false,
"thumbnail": null,
"profile_id": "sp_01F0K1810TK56G1RQFJJTN3ZCN",
"weight": null,
"length": null,
"height": null,
"width": null,
"hs_code": null,
"origin_country": null,
"mid_code": null,
"material": null,
"collection_id": "test-collection",
"type_id": "test-type",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
"prices": [
{
"id": "ma_01F0K1815N7BMYYVP6Z63VS49A",
"currency_code": "usd",
"amount": 100,
"sale_amount": null,
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"region_id": null,
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null
}
],
"sku": null,
"barcode": null,
"ean": null,
"upc": null,
"inventory_quantity": 10,
"allow_backorder": false,
"manage_inventory": true,
"hs_code": null,
"origin_country": null,
"mid_code": null,
"material": null,
"weight": null,
"length": null,
"height": null,
"width": null,
"options": [
{
"id": "optval_01F0K1815D5D7KMHJ4EF9HFMH2",
"value": "large",
"option_id": "opt_01F0K1814KYQSBS6ESDGGV703V",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
{
"id": "optval_01F0K1815EZ5KV8N3QB5AAAEED",
"value": "green",
"option_id": "opt_01F0K1814MV2PBHXFVTHAD8KA8",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
}
],
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
}
],
"profile_id": "sp_01F0K1810TK56G1RQFJJTN3ZCN",
"weight": null,
"length": null,
"height": null,
"width": null,
"hs_code": null,
"origin_country": null,
"mid_code": null,
"material": null,
"collection_id": "test-collection",
"collection": {
"id": "test-collection",
"title": "Test collection",
"handle": null,
"created_at": "2021-03-12T10:55:49.309Z",
"updated_at": "2021-03-12T10:55:49.309Z",
"deleted_at": null,
"metadata": null
},
"type_id": "test-type",
"type": {
"id": "test-type",
"value": "test-type",
"created_at": "2021-03-12T10:55:49.332Z",
"updated_at": "2021-03-12T10:55:49.332Z",
"deleted_at": null,
"metadata": null
},
"tags": [
{
"id": "tag1",
"value": "123",
"created_at": "2021-03-12T10:55:49.326Z",
"updated_at": "2021-03-12T10:55:49.326Z",
"deleted_at": null,
"metadata": null
},
{
"id": "ptag_01F0K1814933N3JKMQH1VYRY5P",
"value": "456",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
}
],
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"metadata": null
},
"cart": {
"id": "cart_01F0K18Q13W272V5GVAKDEX36X",
"email": null,
"billing_address_id": null,
"billing_address": null,
"shipping_address_id": "addr_01F0K18Q13X1YVRPS0QDP1CKEQ",
"shipping_address": {
"id": "addr_01F0K18Q13X1YVRPS0QDP1CKEQ",
"customer_id": null,
"company": null,
"first_name": null,
"last_name": null,
"address_1": null,
"address_2": null,
"city": null,
"country_code": "us",
"province": null,
"postal_code": null,
"phone": null,
"created_at": "2021-03-12T10:56:11.787Z",
"updated_at": "2021-03-12T10:56:11.787Z",
"deleted_at": null,
"metadata": null
},
"items": [],
"region_id": "region",
"region": {
"id": "region",
"name": "Test Region",
"currency_code": "usd",
"tax_rate": "0",
"tax_code": null,
"countries": [
{
"id": 236,
"iso_2": "us",
"iso_3": "usa",
"num_code": 840,
"name": "UNITED STATES",
"display_name": "United States",
"region_id": "region"
}
],
"payment_providers": [],
"fulfillment_providers": [],
"created_at": "2021-03-12T10:56:11.763Z",
"updated_at": "2021-03-12T10:56:11.763Z",
"deleted_at": null,
"metadata": null
},
"discounts": [],
"gift_cards": [],
"customer_id": null,
"payment_sessions": [],
"payment_id": null,
"payment": null,
"shipping_methods": [],
"type": "default",
"completed_at": null,
"created_at": "2021-03-12T10:56:11.787Z",
"updated_at": "2021-03-12T10:56:11.875Z",
"deleted_at": null,
"metadata": null,
"idempotency_key": null,
"context": {
"ip": "::ffff:127.0.0.1",
"user_agent": "axios/0.21.1"
},
"shipping_total": 0,
"discount_total": 0,
"tax_total": 0,
"gift_card_total": 0,
"subtotal": 0,
"total": 0
},
"product_collection": {
"id": "pcol_01F0K18VNNBZ2PEC74BW6NEF7X",
"title": "Summer Collection",
"handle": "summer-collection",
"created_at": "2021-03-12T10:56:16.564Z",
"updated_at": "2021-03-12T10:56:16.564Z",
"deleted_at": null,
"metadata": null
},
"discount": {
"id": "disc_01F0K188KEVS1K6GZV087EF46E",
"code": "10DISC",
"is_dynamic": false,
"rule_id": "dru_01F0K188JR04H4Z843MRMRC6SS",
"rule": {
"id": "dru_01F0K188JR04H4Z843MRMRC6SS",
"description": "10 Percent",
"type": "percentage",
"value": 10,
"allocation": "total",
"usage_limit": null,
"created_at": "2021-03-12T10:55:57.004Z",
"updated_at": "2021-03-12T10:55:57.004Z",
"deleted_at": null,
"metadata": null
},
"is_disabled": false,
"parent_discount_id": null,
"starts_at": "2021-03-12T10:55:57.004Z",
"ends_at": null,
"created_at": "2021-03-12T10:55:57.004Z",
"updated_at": "2021-03-12T10:55:57.004Z",
"deleted_at": null,
"metadata": null
},
"product_variant": {
"id": "variant_01F0K1815DA13R050ETD3QE8CG",
"title": "Test variant",
"product_id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"product": {
"id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"title": "Test product",
"subtitle": null,
"description": "test-product-description",
"handle": "test-product",
"is_giftcard": false,
"thumbnail": null,
"profile_id": "sp_01F0K1810TK56G1RQFJJTN3ZCN",
"weight": null,
"length": null,
"height": null,
"width": null,
"hs_code": null,
"origin_country": null,
"mid_code": null,
"material": null,
"collection_id": "test-collection",
"type_id": "test-type",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
"prices": [
{
"id": "ma_01F0K1815N7BMYYVP6Z63VS49A",
"currency_code": "usd",
"amount": 100,
"sale_amount": null,
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"region_id": null,
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null
}
],
"sku": null,
"barcode": null,
"ean": null,
"upc": null,
"inventory_quantity": 10,
"allow_backorder": false,
"manage_inventory": true,
"hs_code": null,
"origin_country": null,
"mid_code": null,
"material": null,
"weight": null,
"length": null,
"height": null,
"width": null,
"options": [
{
"id": "optval_01F0K1815D5D7KMHJ4EF9HFMH2",
"value": "large",
"option_id": "opt_01F0K1814KYQSBS6ESDGGV703V",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
{
"id": "optval_01F0K1815EZ5KV8N3QB5AAAEED",
"value": "green",
"option_id": "opt_01F0K1814MV2PBHXFVTHAD8KA8",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
}
],
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
"product_option": {
"id": "opt_01F0K1814KYQSBS6ESDGGV703V",
"title": "size",
"product_id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
"product_option_value": {
"id": "optval_01F0K1815D5D7KMHJ4EF9HFMH2",
"value": "large",
"option_id": "opt_01F0K1814KYQSBS6ESDGGV703V",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
"money_amount": {
"id": "ma_01F0K1815N7BMYYVP6Z63VS49A",
"currency_code": "usd",
"amount": 100,
"sale_amount": null,
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"region_id": null,
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null
},
"gift_card": {
"id": "gift_01F0K18FQFN944SHCBRRK0844M",
"code": "O6UW-SZPS-GB62-Y3Q8",
"value": 1000,
"balance": 1000,
"region_id": "reg_01F0K18FP7NA54BTMGDB75ABA7",
"region": {
"id": "reg_01F0K18FP7NA54BTMGDB75ABA7",
"name": "Test Region",
"currency_code": "usd",
"tax_rate": "0",
"tax_code": null,
"payment_providers": [],
"fulfillment_providers": [],
"created_at": "2021-03-12T10:56:04.295Z",
"updated_at": "2021-03-12T10:56:04.295Z",
"deleted_at": null,
"metadata": null
},
"is_disabled": false,
"ends_at": null,
"created_at": "2021-03-12T10:56:04.324Z",
"updated_at": "2021-03-12T10:56:04.324Z",
"deleted_at": null,
"metadata": null
},
"shipping_option": {
"id": "so_01F0K184VDZ5AXZXS05RCCNSJH",
"name": "Free Shipping",
"region_id": "reg_01F0K184SWFZH676GN3E59EHMN",
"region": {
"id": "reg_01F0K184SWFZH676GN3E59EHMN",
"name": "Test Region",
"currency_code": "usd",
"tax_rate": "0",
"tax_code": null,
"payment_providers": [],
"fulfillment_providers": [
{
"id": "test-ful",
"is_installed": true
}
],
"created_at": "2021-03-12T10:55:53.148Z",
"updated_at": "2021-03-12T10:55:53.148Z",
"deleted_at": null,
"metadata": null
},
"profile_id": "sp_01F0K184SAYPYPHCMVENN6V8KH",
"profile": {
"id": "sp_01F0K184SAYPYPHCMVENN6V8KH",
"name": "Default Shipping Profile",
"type": "default",
"created_at": "2021-03-12T10:55:53.081Z",
"updated_at": "2021-03-12T10:55:53.081Z",
"deleted_at": null,
"metadata": null
},
"provider_id": "test-ful",
"price_type": "flat_rate",
"amount": 100,
"is_return": false,
"requirements": [],
"data": {},
"created_at": "2021-03-12T10:55:53.184Z",
"updated_at": "2021-03-12T10:55:53.184Z",
"deleted_at": null,
"metadata": null
},
"region": {
"id": "reg_01F0K184SWFZH676GN3E59EHMN",
"name": "Test Region",
"currency_code": "usd",
"tax_rate": "0",
"tax_code": null,
"payment_providers": [],
"fulfillment_providers": [
{
"id": "test-ful",
"is_installed": true
}
],
"created_at": "2021-03-12T10:55:53.148Z",
"updated_at": "2021-03-12T10:55:53.148Z",
"deleted_at": null,
"metadata": null
},
"return": {
"id": "ret_01F0K17WQFXJ8R8HS0NFQGRWT2",
"status": "requested",
"items": [
{
"return_id": "ret_01F0K17WQFXJ8R8HS0NFQGRWT2",
"item_id": "test-item",
"quantity": 1,
"is_requested": true,
"requested_quantity": 1,
"received_quantity": null,
"metadata": null
}
],
"swap_id": null,
"claim_order_id": null,
"order_id": "order_01F0K17WJC0F5K5G111Y53E641",
"shipping_method": null,
"shipping_data": null,
"refund_amount": 7200,
"received_at": null,
"created_at": "2021-03-12T10:55:44.853Z",
"updated_at": "2021-03-12T10:55:44.853Z",
"metadata": null,
"idempotency_key": "21d6d548-fd78-4ad7-831f-309930b69455"
},
"notification": {
"id": "noti_01F0K18CB6ZS9N2NZYSCFMRY44",
"resource_type": "order",
"resource_id": "order_01F0BF66ZBXNJ98WDQ9SCWH8Y7",
"event_name": "order.placed",
"to": "test@email.com",
"provider_id": "test-not",
"created_at": "2021-03-12T10:56:00.869Z",
"updated_at": "2021-03-12T10:56:00.869Z",
"resends": []
},
"discount_rule": {
"id": "dru_01F0K188JR04H4Z843MRMRC6SS",
"description": "10 Percent",
"type": "percentage",
"value": 10,
"allocation": "total",
"usage_limit": null,
"created_at": "2021-03-12T10:55:57.004Z",
"updated_at": "2021-03-12T10:55:57.004Z",
"deleted_at": null,
"metadata": null
}
}
}