Create a gas type
const url = 'https://example.com/gas-types';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"name":"example","supplierId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","supplierName":"example","colour":"#D7263D","dangerousGoods":{"unNumber":"1978","shippingName":"PROPANE","hazardClass":"2.1"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" } }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fExample
#D7263Dobject
The UN number, four digits without “UN”.
Example
1978The proper shipping name from the ADR list, as on the cylinder label.
Example
PROPANEThe 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.
Example
2.1Responses
Section titled “Responses”Created
object
UUID v7
UUID v7
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
The UN number, four digits without “UN”.
The proper shipping name from the ADR list, as on the cylinder label.
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.
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
object
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}