{"_id":"56a99246318e6c1700a19d06","parentDoc":null,"__v":13,"githubsync":"","project":"567f0c06143cc60d00c1fdbe","user":"567f0baca74a1c0d003e1fba","version":{"_id":"567f0c06143cc60d00c1fdc1","__v":9,"project":"567f0c06143cc60d00c1fdbe","createdAt":"2015-12-26T21:52:06.734Z","releaseDate":"2015-12-26T21:52:06.734Z","categories":["567f0c07143cc60d00c1fdc2","56a9783109cb9c0d00f0c7d3","56a97837f834950d0037b363","56a9783b2d8fd90d0036eed6","56a979912d8fd90d0036eed8","5834b5691a80690f00d31faf","5834b5e4f775120f00c45f9d","5bf1a1473031e4005075ae14","5c64c200244bda003204b97f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"category":{"_id":"56a9783b2d8fd90d0036eed6","version":"567f0c06143cc60d00c1fdc1","__v":10,"pages":["56a99246318e6c1700a19d06","56a9924c257fbc0d00d4763a","56a9926bf834950d0037b381","56a99273257fbc0d00d4763c","56a992863b04f20d00ecca87","56a9928df834950d0037b383","56a992aff834950d0037b385","56a992d413a69a0d00a778de","56a9f82aca491e0d00eb8b12","56a9f959257fbc0d00d476c2"],"project":"567f0c06143cc60d00c1fdbe","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-28T02:08:59.138Z","from_sync":false,"order":3,"slug":"orders","title":"Orders"},"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-28T04:00:06.545Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"[\n  {\n    \"field\": \"order_id\",\n    \"required\": false,\n    \"readonly\": true,\n    \"name\": \"Order ID\",\n    \"description\": \"The ID of the order.\"\n  },\n  ...\n]","name":""}]},"settings":"","examples":{"codes":[{"language":"curl","code":"curl https://tophatter.com/merchant_api/v1/orders/schema.json"},{"code":"TophatterMerchant::Order.schema","language":"ruby"},{"code":"OrderApi::getSchema();","language":"php"},{"code":"List<Schema> schema = OrderApi.getSchema();","language":"java"}]},"method":"get","auth":"optional","params":[],"url":"/orders/schema.json"},"isReference":false,"order":0,"body":"Orders returned by the Tophatter Merchant API have the following fields:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Name\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"`order_id`\",\n    \"2-0\": \"`carrier`\",\n    \"3-0\": \"`tracking_number`\",\n    \"5-0\": \"`product_name`\",\n    \"6-0\": \"`product_identifier`\",\n    \"8-0\": \"`variation_identifier`\",\n    \"10-0\": \"`customer_id`\",\n    \"0-1\": \"The ID of the order.\",\n    \"2-1\": \"The carrier (USPS, China EMS, etc) used to ship this order. The list of accepted carries can be found [here](doc:carriers).\",\n    \"3-1\": \"The tracking number provided by the carrier when this order was shipped.\",\n    \"5-1\": \"The name of the product.\",\n    \"6-1\": \"The unique id of the product.\",\n    \"8-1\": \"The unique id of the product variation selected by the customer during the checkout process.\",\n    \"10-1\": \"The unique ID of the customer.\",\n    \"11-0\": \"`customer_name`\",\n    \"11-1\": \"The full name of the customer.\",\n    \"12-0\": \"`address1`\",\n    \"13-0\": \"`address2`\",\n    \"14-0\": \"`city`\",\n    \"15-0\": \"`state`\",\n    \"16-0\": \"`postal_code`\",\n    \"17-0\": \"`country`\",\n    \"1-0\": \"`status`\",\n    \"1-1\": \"The status of the order. The status will be one of: `refunded`, `shipped` (already fulfilled), or `paid` (ready to fulfill).\",\n    \"12-1\": \"Shipping address line 1.\",\n    \"13-1\": \"Shipping address line 2.\",\n    \"14-1\": \"Shipping address city.\",\n    \"15-1\": \"Shipping address state.\",\n    \"16-1\": \"Shipping address postal code.\",\n    \"17-1\": \"Shipping address country.\",\n    \"0-2\": \"\",\n    \"1-2\": \"\",\n    \"2-2\": \"\",\n    \"3-2\": \"\",\n    \"5-2\": \"\",\n    \"6-2\": \"\",\n    \"8-2\": \"\",\n    \"10-2\": \"\",\n    \"11-2\": \"\",\n    \"12-2\": \"Shipping address line 1.\",\n    \"13-2\": \"Shipping address line 2.\",\n    \"14-2\": \"Shipping address city.\",\n    \"15-2\": \"Shipping address state.\",\n    \"16-2\": \"Shipping address postal code.\",\n    \"17-2\": \"Shipping address country.\",\n    \"20-0\": \"`disbursement_amount`\",\n    \"21-0\": \"`seller_fees_amount`\",\n    \"22-0\": \"`seller_fees`\",\n    \"20-1\": \"The total amount that will be paid out (disbursed) to the seller for this order.\",\n    \"21-1\": \"The total amount of the fees charged to the seller for this order.\",\n    \"22-1\": \"The breakdown of the fees charged to the seller for this order.\",\n    \"20-2\": \"The total amount that will be paid out (disbursed) to the seller for this order.\",\n    \"21-2\": \"The total amount of the fees charged to the seller for this order.\",\n    \"22-2\": \"The breakdown of the fees charged to the seller for this order.\",\n    \"18-0\": \"`available_refunds`\",\n    \"18-1\": \"The partial refunds available for this order. When you wish to partially refund an order you must specify on or more of these fees to refund. See the [refund an order](doc:refund-an-order) documentation for more info.\",\n    \"18-2\": \"The partial refunds available for this order. When you wish to partially refund an order you must specify on or more of these fees to refund. See the [refund an order](doc:refund-an-order) documentation for more info.\",\n    \"19-0\": \"`refund_amount`\",\n    \"19-1\": \"The amount refunded to the customer for this order.\",\n    \"19-2\": \"The amount refunded to the customer for this order.\",\n    \"24-0\": \"`refunded_at`\",\n    \"26-0\": \"`created_at`\",\n    \"24-1\": \"The date and time the order was refunded to the customer in PDT (UTC -7). If the order has not been refunded this field will be `null`.\",\n    \"26-1\": \"The date and time the order was created in PDT (UTC -7).\",\n    \"24-2\": \"The date and time the order refunded to the customer.\",\n    \"26-2\": \"The date and time the order was created.\",\n    \"7-0\": \"`product_internal_id`\",\n    \"7-1\": \"Tophatter's internal identifier for the product.\",\n    \"9-0\": \"`variation_internal_id`\",\n    \"9-1\": \"Tophatter's internal identifier for the product variation chosen by the customer during the checkout process.\",\n    \"9-2\": \"\",\n    \"7-2\": \"\",\n    \"23-0\": \"`upsells`\",\n    \"23-1\": \"The upsells for this product that were purchased by the customer.\",\n    \"23-2\": \"Shows the type of upsells a product lists, such as Buy one get one and additional accessory\",\n    \"25-0\": \"`paid_at`\",\n    \"25-1\": \"The date and time the order was paid by the customer in PDT (UTC -7).\",\n    \"25-2\": \"The date and time the order was paid by the customer.\",\n    \"27-0\": \"`canceled_at`\",\n    \"27-1\": \"The date and time order was canceled by the customer in PDT (UTC -7).\",\n    \"27-2\": \"The date and time order was canceled by the customer.\",\n    \"4-0\": \"`fulfillment_partner`\",\n    \"4-1\": \"The 3PL or warehouse partner being used to fulfill this order. Example: `noram`.\",\n    \"4-2\": \"\"\n  },\n  \"cols\": 2,\n  \"rows\": 28\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Examples\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" {  \\n    \\\"order_id\\\": 59010920,\\n    \\\"status\\\": \\\"paid\\\",\\n    \\\"carrier\\\": null,\\n    \\\"tracking_number\\\": null,\\n    \\\"product_name\\\": \\\"Nintendo Switch - Neon Blue and Red Joy-Con\\\",\\n    \\\"product_identifier\\\": \\\"B01MUAGZ49\\\",\\n    \\\"product_internal_id\\\": 9871345,\\n    \\\"variation_identifier\\\": \\\"B01MUAGZ49\\\",\\n    \\\"variation_internal_id\\\": 85741897,\\n    \\\"customer_id\\\": 19724374,\\n    \\\"customer_name\\\": \\\"John Doe\\\",\\n    \\\"address1\\\": \\\"123 Main Street\\\",\\n    \\\"address2\\\": \\\"Apartment 42\\\",\\n    \\\"city\\\": \\\"Denver\\\",\\n    \\\"state\\\": \\\"CO\\\",\\n    \\\"postal_code\\\": \\\"80219\\\",\\n    \\\"country\\\": \\\"USA\\\",\\n    \\\"available_refunds\\\": {  \\n       \\\"buyer_fee\\\": 275.0\\n    },\\n    \\\"refund_amount\\\": 0,\\n    \\\"disbursement_amount\\\": \\\"239.22\\\",\\n    \\\"seller_fees_amount\\\": 35.78,\\n    \\\"seller_fees\\\": [  \\n       {  \\n          \\\"type\\\": \\\"commission_fee\\\",\\n          \\\"amount\\\": 27.5\\n       },\\n       {  \\n          \\\"type\\\": \\\"processing_fee\\\",\\n          \\\"amount\\\": 8.28\\n       }\\n    ],\\n   \\t\\\"upsells\\\": [],\\n    \\\"refunded_at\\\": null,\\n    \\\"paid_at\\\": \\\"2018-03-29T17:04:20-07:00\\\",\\n    \\\"created_at\\\": \\\"2018-03-29T17:04:17-07:00\\\",\\n   \\t\\\"updated_at\\\": \\\"2018-09-26T11:05:09-07:00\\\",\\n    \\\"canceled_at\\\": null\\n }\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Order Statuses\"\n}\n[/block]\nOrders will have one of the following statuses:\n\n- `refunded`: The order has been refunded.\n- `shipped`: The order has been fulfilled.\n- `paid`: The order is waiting to be fulfilled.","excerpt":"","slug":"order-schema","type":"basic","title":"Order Definition"}
Orders returned by the Tophatter Merchant API have the following fields: [block:parameters] { "data": { "h-0": "Field", "h-1": "Name", "h-2": "Description", "0-0": "`order_id`", "2-0": "`carrier`", "3-0": "`tracking_number`", "5-0": "`product_name`", "6-0": "`product_identifier`", "8-0": "`variation_identifier`", "10-0": "`customer_id`", "0-1": "The ID of the order.", "2-1": "The carrier (USPS, China EMS, etc) used to ship this order. The list of accepted carries can be found [here](doc:carriers).", "3-1": "The tracking number provided by the carrier when this order was shipped.", "5-1": "The name of the product.", "6-1": "The unique id of the product.", "8-1": "The unique id of the product variation selected by the customer during the checkout process.", "10-1": "The unique ID of the customer.", "11-0": "`customer_name`", "11-1": "The full name of the customer.", "12-0": "`address1`", "13-0": "`address2`", "14-0": "`city`", "15-0": "`state`", "16-0": "`postal_code`", "17-0": "`country`", "1-0": "`status`", "1-1": "The status of the order. The status will be one of: `refunded`, `shipped` (already fulfilled), or `paid` (ready to fulfill).", "12-1": "Shipping address line 1.", "13-1": "Shipping address line 2.", "14-1": "Shipping address city.", "15-1": "Shipping address state.", "16-1": "Shipping address postal code.", "17-1": "Shipping address country.", "0-2": "", "1-2": "", "2-2": "", "3-2": "", "5-2": "", "6-2": "", "8-2": "", "10-2": "", "11-2": "", "12-2": "Shipping address line 1.", "13-2": "Shipping address line 2.", "14-2": "Shipping address city.", "15-2": "Shipping address state.", "16-2": "Shipping address postal code.", "17-2": "Shipping address country.", "20-0": "`disbursement_amount`", "21-0": "`seller_fees_amount`", "22-0": "`seller_fees`", "20-1": "The total amount that will be paid out (disbursed) to the seller for this order.", "21-1": "The total amount of the fees charged to the seller for this order.", "22-1": "The breakdown of the fees charged to the seller for this order.", "20-2": "The total amount that will be paid out (disbursed) to the seller for this order.", "21-2": "The total amount of the fees charged to the seller for this order.", "22-2": "The breakdown of the fees charged to the seller for this order.", "18-0": "`available_refunds`", "18-1": "The partial refunds available for this order. When you wish to partially refund an order you must specify on or more of these fees to refund. See the [refund an order](doc:refund-an-order) documentation for more info.", "18-2": "The partial refunds available for this order. When you wish to partially refund an order you must specify on or more of these fees to refund. See the [refund an order](doc:refund-an-order) documentation for more info.", "19-0": "`refund_amount`", "19-1": "The amount refunded to the customer for this order.", "19-2": "The amount refunded to the customer for this order.", "24-0": "`refunded_at`", "26-0": "`created_at`", "24-1": "The date and time the order was refunded to the customer in PDT (UTC -7). If the order has not been refunded this field will be `null`.", "26-1": "The date and time the order was created in PDT (UTC -7).", "24-2": "The date and time the order refunded to the customer.", "26-2": "The date and time the order was created.", "7-0": "`product_internal_id`", "7-1": "Tophatter's internal identifier for the product.", "9-0": "`variation_internal_id`", "9-1": "Tophatter's internal identifier for the product variation chosen by the customer during the checkout process.", "9-2": "", "7-2": "", "23-0": "`upsells`", "23-1": "The upsells for this product that were purchased by the customer.", "23-2": "Shows the type of upsells a product lists, such as Buy one get one and additional accessory", "25-0": "`paid_at`", "25-1": "The date and time the order was paid by the customer in PDT (UTC -7).", "25-2": "The date and time the order was paid by the customer.", "27-0": "`canceled_at`", "27-1": "The date and time order was canceled by the customer in PDT (UTC -7).", "27-2": "The date and time order was canceled by the customer.", "4-0": "`fulfillment_partner`", "4-1": "The 3PL or warehouse partner being used to fulfill this order. Example: `noram`.", "4-2": "" }, "cols": 2, "rows": 28 } [/block] [block:api-header] { "title": "Examples" } [/block] [block:code] { "codes": [ { "code": " { \n \"order_id\": 59010920,\n \"status\": \"paid\",\n \"carrier\": null,\n \"tracking_number\": null,\n \"product_name\": \"Nintendo Switch - Neon Blue and Red Joy-Con\",\n \"product_identifier\": \"B01MUAGZ49\",\n \"product_internal_id\": 9871345,\n \"variation_identifier\": \"B01MUAGZ49\",\n \"variation_internal_id\": 85741897,\n \"customer_id\": 19724374,\n \"customer_name\": \"John Doe\",\n \"address1\": \"123 Main Street\",\n \"address2\": \"Apartment 42\",\n \"city\": \"Denver\",\n \"state\": \"CO\",\n \"postal_code\": \"80219\",\n \"country\": \"USA\",\n \"available_refunds\": { \n \"buyer_fee\": 275.0\n },\n \"refund_amount\": 0,\n \"disbursement_amount\": \"239.22\",\n \"seller_fees_amount\": 35.78,\n \"seller_fees\": [ \n { \n \"type\": \"commission_fee\",\n \"amount\": 27.5\n },\n { \n \"type\": \"processing_fee\",\n \"amount\": 8.28\n }\n ],\n \t\"upsells\": [],\n \"refunded_at\": null,\n \"paid_at\": \"2018-03-29T17:04:20-07:00\",\n \"created_at\": \"2018-03-29T17:04:17-07:00\",\n \t\"updated_at\": \"2018-09-26T11:05:09-07:00\",\n \"canceled_at\": null\n }", "language": "json" } ] } [/block] [block:api-header] { "title": "Order Statuses" } [/block] Orders will have one of the following statuses: - `refunded`: The order has been refunded. - `shipped`: The order has been fulfilled. - `paid`: The order is waiting to be fulfilled.