Create or update a trailer

PUT /api/trailer

Tries to find a trailer by both Trailer Number and Carrier Id. If found it will update it, otherwise it will create a new Trailer Asset

Headers

  • Specify effective organization_id for Admin and Group Organization Admins. This is a global header for all endpoints only taken into consideration when it makes sense (it won't be used in Auth, for example)

application/json

Body

Responses

PUT /api/trailer
curl \
 -X PUT http://127.0.0.1:8080/api/trailer \
 -H "Content-Type: application/json" \
 -d '{"carrier_id":42,"number":"string","type":"string"}'
Request examples
# Headers

# Payload
{
  "carrier_id": 42,
  "number": "string",
  "type": "string"
}
Response examples (200)
{
  "carrier": {
    "address": "string",
    "address_additional_info": "string",
    "authorized": true,
    "created_at": "2024-05-04T09:42:00+00:00",
    "created_by": "string",
    "email": "string",
    "fleet_id": "string",
    "id": 42,
    "last_modified_at": "2024-05-04T09:42:00+00:00",
    "last_modified_by": "string",
    "name": "string",
    "rfc": "string",
    "scac": "string",
    "usdot": "string",
    "yards": [
      {
        "authorized": true,
        "carrier_capacity": 42,
        "yard_id": 42
      }
    ]
  },
  "custom_fields": {
    "key": "string"
  },
  "id": 42,
  "number": "string",
  "tags": [
    {
      "associated_at": "2024-05-04T09:42:00+00:00",
      "color": "string",
      "created_at": "2024-05-04T09:42:00+00:00",
      "id": 42,
      "last_modified_at": "2024-05-04T09:42:00+00:00",
      "name": "string"
    }
  ],
  "type": "string"
}