Skip to content

Update transport

POST /transport/update

Update a transport by its external ID.
Usually the callback from an external partner containing any status updates and comments.

{
    "id": string,
    "comment": string,
    "PNO": string,
    "status": string
}
{
    "message": string,
    "status": enum
}
<?php
    $ch = curl_init();

    curl_setopt_array($ch, [
        CURLOPT_URL => 'YOUR-BASEURL/transport/update',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS =>'{
            "id": string,
            "comment": string,
            "status": string,
            "PNO": string
        }',
        CURLOPT_HTTPHEADER => [
            'X-Api-Key: YOUR-API-KEY'
        ],
    ]);

    $response = curl_exec($ch);

    curl_close($ch);
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    private static readonly HttpClient client = new HttpClient();

    static async Task Main(string[] args)
    {
        var baseUrl = "YOUR-BASEURL/transport/update";
        var apiKey = "YOUR-API-KEY";

        client.DefaultRequestHeaders.Clear();
        client.DefaultRequestHeaders.Add("X-Api-Key", apiKey);

        var postData = new StringContent(@"
        {
            ""id"": ""string"",
            ""comment"": ""string"",
            ""status"": ""string"",
            ""PNO"": ""string""
        }",
        System.Text.Encoding.UTF8,
        "application/json"
        );

        HttpResponseMessage response = await client.PostAsync(baseUrl, postData);
        response.EnsureSuccessStatusCode();
        string responseBody = await response.Content.ReadAsStringAsync();

        Console.WriteLine(responseBody);
    }
}
Parameter Required Description
id This is the ID given by AP when transport order was created
status A short string representing current transport status
comment Optional comment or remark worth noting, fx. reason for a cancelled transport.
PNO The PNO from AP

Current supported status codes are.
Although not enforced, once a final state is recieved, the transport order must no longer recieve further status updates.

Status Final Description
created Automatically assigned when transport order is created
confirmed Transport order has been confirmed by the provider
pickedup Vehicle has been picked up, and is on route to its final destination
delivered The vehicle vehicle has arrived at its final destination. use in conjunction with comment
cancelled If the order is cancelled, use in conjunction with comment
invain If the vehicle was not found on the pickup location, use in conjunction with comment