{
"openapi": "3.0.1",
"info": {
"title": "OpenAPI Plant Store",
"description": "A sample API that uses a plant store as an example to demonstrate features in the OpenAPI specification",
"license": {
"name": "MIT"
},
"version": "1.0.0"
},
"servers": [
{
"url": "https://www.transdirect.com.au/api/"
}
],
"security": [
{
"bearerAuth": []
}
],
"paths": {
"/bookings/v4": {
"post": {
"description": "Creates a new plant in the store",
"requestBody": {
"description": "Plant to add to the store",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewPlant"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "plant response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Plant"
}
}
}
},
"400": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/bookings/v4/?since=&sort=": {
"get": {
"description": "Returns all plants from the system that the user has access to",
"parameters": [
{
"name": "since",
"in": "path",
"description": "Timestamp in ISO 8601 format: YYYY-MM-DD+HH:MM:SS Only bookings created at or after this time are returned. Example 2015-04-15+11:42:00", "schema": { "type": "string" } }, { "name": "sort", "in": "path", "description": "The sort order by field of the bookings returned. Options are booking_time, pickup_date, cost, etc. Example booking_time (default)", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/bookings/v4/{id}": { "get": { "description": "", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "put": { "description": "", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "delete": { "description": "Deletes a single plant based on the ID supplied", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "204": { "description": "Plant deleted", "content": {} }, "400": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/bookings/v4/{id}/confirm": { "post": { "description": "Creates a new plant in the store", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "description": "Plant to add to the store", "content": { "application/json": { "schema": { "$ref": " " } } }, "required": true }, "responses": { "200": { "description": "plant response", "content": { "application/json": { "schema": { "$ref": " " } } } }, "400": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/bookings/track/v4/{id}": { "get": { "description": "Returns all plants from the system that the user has access to", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v4/{id}/custom_declaration": { "post": { "description": "Creates a new plant in the store", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "description": "Plant to add to the store", "content": { "application/json": { "schema": { "$ref": " " } } }, "required": true }, "responses": { "200": { "description": "plant response", "content": { "application/json": { "schema": { "$ref": " " } } } }, "400": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/bookings/v4/{id}/items": { "get": { "description": "", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "post": { "description": "Creates a new plant in the store", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "description": "Plant to add to the store", "content": { "application/json": { "schema": { "$ref": " " } } }, "required": true }, "responses": { "200": { "description": "plant response", "content": { "application/json": { "schema": { "$ref": " " } } } }, "400": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/bookings/v4/{id}/items/{item_id}": { "get": { "description": "", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking.", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "item_id", "in": "path", "description": "ID of the item.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "put": { "description": "", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking.", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "item_id", "in": "path", "description": "ID of the item.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "delete": { "description": "Deletes a single plant based on the ID supplied", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking.", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "item_id", "in": "path", "description": "ID of the item.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "204": { "description": "Plant deleted", "content": {} }, "400": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/bookings/v4/{id}/label": { "get": { "description": "", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/bookings/v4/{id}/invoice": { "get": { "description": "Returns all plants from the system that the user has access to", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/bookings/v4/{id}/tntregeneralabel": { "get": { "description": "Returns all plants from the system that the user has access to", "parameters": [ { "name": "id", "in": "path", "description": "ID of the booking.", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/member": { "get": { "description": "", "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/locations": { "get": { "description": "", "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/locations?q=": { "get": { "description": "", "parameters": [ { "name": "q", "in": "path", "description": "Search term. This will be matched on postcode or suburb name. Example 4000", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": " " } } } } }, "400": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/locations/postcode/{postCode}": { "get": { "description": "", "parameters": [ { "name": "postcode", "in": "path", "description": "Post code to search for locations. Example 2000 for Sydney", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Plant response", "content": { "application/json": { "schema": { "type": "array" } } } }, "400": { "description": "Unexpected error", "content": { "application/json": {} } } } } }, "/orders": { "post": { "description": "Creates a new plant in the store", "requestBody": { "description": "Plant to add to the store", "content": { "application/json": { "schema": { "$ref": " " } } }, "required": true }, "responses": { "200": { "description": "plant response", "content": { "application/json": { "schema": { "$ref": " " } } } }, "400": { "description": "unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/orders/?since=": { "get": { "description": "", "parameters": [ { "name": "since", "in": "path", "description": "Timestamp in ISO 8601 format: YYYY-MM-DD+HH:MM:SS Only bookings created at or after this time are returned. Example 2015-04-15+11:42:00",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Plant response",
"content": {
"application/json": {
"schema": {
"type": "array"
}
}
}
},
"400": {
"description": "Unexpected error",
"content": {
"application/json": {}
}
}
}
}
},
"/orders/{id}": {
"get": {
"description": "",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the saved order",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "Plant response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": " "
}
}
}
}
},
"400": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"put": {
"description": "",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the saved order",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "Plant response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": " "
}
}
}
}
},
"400": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"description": "Deletes a single plant based on the ID supplied",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the saved order",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"204": {
"description": "Plant deleted",
"content": {}
},
"400": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/couriers": {
"get": {
"description": "",
"responses": {
"200": {
"description": "Plant response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": " "
}
}
}
}
},
"400": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Plant": {
"required": [
"name"
],
"type": "object",
"properties": {}
},
"NewPlant": {
"allOf": [
{
"$ref": " "
},
{
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"description": "Identification number of the plant",
"type": "integer",
"format": "int64"
}
}
}
]
},
"Error": {
"required": [
"error",
"message"
],
"type": "object",
"properties": {
"error": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}
}
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"declared_value": {
"type": "string",
"example": "1000.00"
},
"description": {
"type": "string",
"example": "TEST BOOKINGS 2"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string",
"example": "carton"
},
"weight": {
"type": "number",
"example": 38.63
},
"height": {
"type": "number",
"example": 40.25
},
"width": {
"type": "number",
"example": 1.65
},
"length": {
"type": "number",
"example": 3.32
},
"quantity": {
"type": "integer",
"example": 1
}
}
}
},
"receiver": {
"type": "object",
"properties": {
"postcode": {
"type": "string",
"example": "3000"
},
"suburb": {
"type": "string",
"example": "MELBOURNE"
},
"type": {
"type": "string",
"example": "business"
},
"country": {
"type": "string",
"example": "AU"
}
}
},
"sender": {
"type": "object",
"properties": {
"postcode": {
"type": "string",
"example": "2000"
},
"suburb": {
"type": "string",
"example": "SYDNEY"
},
"type": {
"type": "string",
"example": "business"
},
"country": {
"type": "string",
"example": "AU"
}
}
},
"tailgate_pickup": {
"type": "boolean",
"example": true
},
"tailgate_delivery": {
"type": "boolean",
"example": true
}
},
"required": [
"declared_value",
"tailgate_pickup",
"tailgate_delivery",
"items",
"sender",
"receiver"
]
}
}
}
}