Skip to content

Create a gas type

POST
/gas-types
curl --request POST \
--url https://example.com/gas-types \
--header 'Content-Type: application/json' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token> \
--data '{ "name": "example", "supplierId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "supplierName": "example", "colour": "#D7263D", "dangerousGoods": { "unNumber": "1978", "shippingName": "PROPANE", "hazardClass": "2.1" } }'
Media typeapplication/json
object
name
required
string
>= 1 characters <= 80 characters
supplierId

UUID v7

string | null format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
supplierName
string
>= 1 characters <= 120 characters
colour
string | null
/^#[0-9a-fA-F]{6}$/

Example

#D7263D
dangerousGoods
object
unNumber
required

The UN number, four digits without “UN”.

string
/^\d{4}$/

Example

1978
shippingName
required

The proper shipping name from the ADR list, as on the cylinder label.

string
>= 1 characters <= 200 characters

Example

PROPANE
hazardClass
required

The ADR hazard class: 2.1 flammable gas, 2.2 non-flammable non-toxic gas, 2.2 (5.1) non-flammable gas that is also oxidising, 2.3 toxic gas.

string
Allowed values: 2.1 2.2 2.2 (5.1) 2.3

Example

2.1

Created

Media typeapplication/json
object
id
required

UUID v7

string format: uuid
name
required
string
supplierId
required

UUID v7

string | null format: uuid
supplier
required
string | null
colour
required
string | null
/^#[0-9a-fA-F]{6}$/
catalogueKey
required
string | null
dangerousGoods
required

How these cylinders are named for carriage by road: UN number, proper shipping name and hazard class. Shown to drivers with the cylinders on the van. Null is not set yet.

object
unNumber
required

The UN number, four digits without “UN”.

string
/^\d{4}$/
shippingName
required

The proper shipping name from the ADR list, as on the cylinder label.

string
>= 1 characters <= 200 characters
hazardClass
required

The ADR hazard class: 2.1 flammable gas, 2.2 non-flammable non-toxic gas, 2.2 (5.1) non-flammable gas that is also oxidising, 2.3 toxic gas.

string
Allowed values: 2.1 2.2 2.2 (5.1) 2.3
archivedAt
required
string | null format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time

Example

{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"name": "Flogas Propane",
"supplierId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"supplier": "Flogas",
"colour": "#D7263D",
"dangerousGoods": {
"unNumber": "1978",
"shippingName": "PROPANE",
"hazardClass": "2.1"
}
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not a member, or without the permission this needs

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string

Example

{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}