Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions specification/paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@
"/onboarding/v1/invitations/{invitation_id}/onboard": {
"$ref": "./paths/Onboarding-v1-invitations-invitation_id-onboard.json"
},
"/orders/v1/orders/{reference}": {
"$ref": "./paths/Orders-v1-orders-reference.json"
},
"/organizations": {
"$ref": "./paths/Organizations.json"
},
Expand Down
80 changes: 80 additions & 0 deletions specification/paths/Orders-v1-orders-reference.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"parameters": [
{
"name": "reference",
"in": "path",
"description": "Order reference to retrieve the order by.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "shop_id",
"in": "query",
"required": true,
"description": "Id of the shop to retrieve the order for.",
"schema": {
"$ref": "#/components/schemas/Uuid"
}
},
{
"name": "email",
"in": "query",
"description": "Email address of the receiver of the order. This query parameter is mutually exclusive with postal code query parameter. Either one is required.",
"schema": {
"$ref": "#/components/schemas/Email"
}
},
{
"name": "postal_code",
"in": "query",
"description": "Postal code of the receiver of the order. This query parameter is mutually exclusive with email query parameter. Either one is required.",
"schema": {
"type": "string",
"example": "1111AA"
}
}
],
"get": {
"tags": [
"Orders"
],
"security": [
{
"OAuth2": [
"returns.manage"
]
}
],
"summary": "Get an order resource by reference and email or postal code.",
"description": "This endpoint retrieves an order resource by the specified reference and either email address or postal code.",
"responses": {
"200": {
"description": "Retrieved the order.",
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"required": [
"data"
],
"additionalProperties": false,
"properties": {
"data": {
"$ref": "#/components/schemas/OrderResponse"
}
}
}
}
}
},
"404": {
"description": "No order was found with the provided input."
},
"409": {
"description": "One or more of the orders resource is handled by a 3rd party."
}
}
}
}
42 changes: 31 additions & 11 deletions specification/paths/Returns-v1-return-methods-resolve.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,39 @@
"example": "35eddf50-1d84-47a3-8479-6bfda729cd99"
},
"consumer_address": {
"required": [
"country_code",
"email"
],
"properties": {
"country_code": {
"$ref": "#/components/schemas/CountryCode"
"oneOf": [
{
"title": "Resolve order by email",
"required": [
"country_code",
"email"
],
"properties": {
"country_code": {
"$ref": "#/components/schemas/CountryCode"
},
"email": {
"$ref": "#/components/schemas/Email"
}
}
},
"email": {
"$ref": "#/components/schemas/Email",
"example": "s.holmes@holmesinvestigations.com"
{
"title": "Resolve order by postal code",
"required": [
"country_code",
"postal_code"
],
"properties": {
"country_code": {
"$ref": "#/components/schemas/CountryCode"
},
"postal_code": {
"type": "string",
"example": "1111AA"
}
}
}
}
]
},
"weight": {
"type": "integer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
]
}
],
"deprecated": true,
"summary": "Get an order resource.",
"description": "This endpoint retrieves an order resource by the specified reference and email address.",
"responses": {
Expand Down
3 changes: 3 additions & 0 deletions specification/tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
{
"name": "Onboarding"
},
{
"name": "Orders"
},
{
"name": "Organizations",
"externalDocs": {
Expand Down