{"swagger":"2.0","info":{"version":"1.0","title":"1st Choice Web App","description":"TODO: Add a description","license":{"name":"MIT","url":"http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT"}},"host":"www.1stchoicechoice.co.uk","basePath":"/api/external","schemes":["https"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/orders/{order_id}/dispatched":{"get":{"description":"You can mark an order as dispatched, this will show in the users order history and system audit trail.","summary":"Mark Order As Dispatched","operationId":"Mark Order As Dispatched","produces":["application/json"],"parameters":[{"name":"order_id","in":"path","required":true,"type":"number","format":"double","description":"Id of the order to update."}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/MarkOrderAsDispatchedResponse"}},"404":{"description":"Unexpected error in API call. See HTTP response body for details.","schema":{}}},"x-unitTests":[{"request":{"method":"GET","uri":"/orders/23/dispatched"},"expectedResponse":{"x-allowExtraHeaders":true,"x-bodyMatchMode":"RAW","x-arrayOrderedMatching":false,"x-arrayCheckCount":false,"x-matchResponseSchema":true,"headers":{"Content-Type":"application/json"},"body":"{    \"success\": true,    \"message\": \"Order marked as dispatched\",    \"id\": 23,    \"updated_at\": \"2015-08-05T08:40:51.620Z\",    \"status\": \"Dispatched\"}"},"x-testShouldPass":true,"x-testEnabled":true,"x-testName":"Mark Order As Dispatched1","x-testDescription":"You can mark an order as dispatched, this will show in the users order history and system audit trail."}],"x-operation-settings":{"CollectParameters":false,"AllowDynamicQueryParameters":false,"AllowDynamicFormParameters":false,"IsMultiContentStreaming":false}}},"/orders/{order_id}/delivered":{"get":{"description":"You can mark an order as delivered, this will show in the users order history and system audit trail.","summary":"Mark Order As Delivered","operationId":"Mark Order As Delivered","produces":["application/json"],"parameters":[{"name":"order_id","in":"path","required":true,"type":"number","format":"double","description":"Id of the order to update."}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/MarkOrderAsDeliveredResponse"}},"404":{"description":"Unexpected error in API call. See HTTP response body for details.","schema":{}}},"x-unitTests":[{"request":{"method":"GET","uri":"/orders/23/delivered"},"expectedResponse":{"x-allowExtraHeaders":true,"x-bodyMatchMode":"RAW","x-arrayOrderedMatching":false,"x-arrayCheckCount":false,"x-matchResponseSchema":true,"headers":{"Content-Type":"application/json"},"body":"{    \"success\": true,    \"message\": \"Order marked as delivered\",    \"id\": 23,    \"updated_at\": \"2015-08-05T08:40:51.620Z\",    \"status\": \"Delivered\"}"},"x-testShouldPass":true,"x-testEnabled":true,"x-testName":"Mark Order As Delivered1","x-testDescription":"You can mark an order as delivered, this will show in the users order history and system audit trail."}],"x-operation-settings":{"CollectParameters":false,"AllowDynamicQueryParameters":false,"AllowDynamicFormParameters":false,"IsMultiContentStreaming":false}}},"/orders/{order_id}/refund":{"post":{"description":"Allows you to refund an order, either full amount of a custom amount.","summary":"Refund Order","operationId":"Refund Order","produces":["application/json"],"parameters":[{"name":"order_id","in":"path","required":true,"type":"number","format":"double","description":"Id of the order to update."},{"name":"body","in":"body","required":true,"description":"{\n        \"custom_amount\": 4999\n    }","schema":{"$ref":"#/definitions/RefundOrderRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/RefundOrderResponse"}},"400":{"description":"Unexpected error in API call. See HTTP response body for details.","schema":{}},"404":{"description":"Unexpected error in API call. See HTTP response body for details.","schema":{}}},"x-unitTests":[{"request":{"method":"POST","uri":"/orders/23/refund","headers":{"Content-Type":"application/json"},"body":"{  \"custom_amount\": 4999}"},"expectedResponse":{"x-allowExtraHeaders":true,"x-bodyMatchMode":"RAW","x-arrayOrderedMatching":false,"x-arrayCheckCount":false,"x-matchResponseSchema":true,"headers":{"Content-Type":"application/json"},"body":"{    \"success\": true,    \"message\": \"Order queued for refund\",    \"id\": 23,    \"updated_at\": \"2015-08-05T08:40:51.620Z\",    \"status\": \"Refunded\"}"},"x-testShouldPass":true,"x-testEnabled":true,"x-testName":"Refund Order1","x-testDescription":"Allows you to refund an order, either full amount of a custom amount."},{"request":{"method":"POST","uri":"/orders/23/refund","headers":{"Content-Type":"application/json"},"body":"{  \"custom_amount\": 4999}"},"expectedResponse":{"x-allowExtraHeaders":true,"x-bodyMatchMode":"RAW","x-arrayOrderedMatching":false,"x-arrayCheckCount":false,"x-matchResponseSchema":true,"headers":{"Content-Type":"application/json"},"body":"{    \"success\": true,    \"message\": \"Order queued for refund\",    \"id\": 23,    \"updated_at\": \"2015-08-05T08:40:51.620Z\",    \"status\": \"Refunded\"}"},"x-testShouldPass":true,"x-testEnabled":true,"x-testName":"Refund Order2","x-testDescription":"Allows you to refund an order, either full amount of a custom amount."},{"request":{"method":"POST","uri":"/orders/23/refund","headers":{"Content-Type":"application/json"},"body":"{  \"custom_amount\": 4999}"},"expectedResponse":{"x-allowExtraHeaders":true,"x-bodyMatchMode":"RAW","x-arrayOrderedMatching":false,"x-arrayCheckCount":false,"x-matchResponseSchema":true,"headers":{"Content-Type":"application/json"},"body":"{    \"success\": true,    \"message\": \"Order queued for refund\",    \"id\": 23,    \"updated_at\": \"2015-08-05T08:40:51.620Z\",    \"status\": \"Refunded\"}"},"x-testShouldPass":true,"x-testEnabled":true,"x-testName":"Refund Order3","x-testDescription":"Allows you to refund an order, either full amount of a custom amount."}],"x-operation-settings":{"CollectParameters":false,"AllowDynamicQueryParameters":false,"AllowDynamicFormParameters":false,"IsMultiContentStreaming":false}}}},"definitions":{"MarkOrderAsDispatchedResponse":{"title":"Mark Order As Dispatched response","type":"object","properties":{"success":{"description":"","type":"boolean"},"message":{"description":"","type":"string"},"id":{"description":"","type":"integer","format":"int32"},"updated_at":{"description":"","type":"string"},"status":{"description":"","type":"string"}},"required":["success","message","id","updated_at","status"]},"MarkOrderAsDeliveredResponse":{"title":"Mark Order As Delivered response","type":"object","properties":{"success":{"description":"","type":"boolean"},"message":{"description":"","type":"string"},"id":{"description":"","type":"integer","format":"int32"},"updated_at":{"description":"","type":"string"},"status":{"description":"","type":"string"}},"required":["success","message","id","updated_at","status"]},"RefundOrderRequest":{"title":"Refund Order request","type":"object","properties":{"custom_amount":{"description":"If passed in, will attempt to refund a custom amount. Must be in \"pennies\" e.g £49.99 will be 4999","type":"number","format":"double"}}},"RefundOrderResponse":{"title":"Refund Order response","type":"object","properties":{"success":{"description":"","type":"boolean"},"message":{"description":"","type":"string"},"id":{"description":"","type":"integer","format":"int32"},"updated_at":{"description":"","type":"string"},"status":{"description":"","type":"string"}},"required":["success","message","id","updated_at","status"]}}}