POST data to an API when creating a new listing

Every time my client uploads a new item (in this case a vehicle) to his website, the information also needs to be "POST"ed to an API

this is what it will look like;

"Vehicles": [
    {
      "Physical": {
        "ExternalVehicleID": "12345",
        "OnTheRoadPrice": "13995",
        "Status": "PreOwned",
        "Type": "Car",
        "VIN": "",
        "IsNew": false,
        "Registration": {
          "RegistrationNumber": "AA21 AAA",
          "DateRegisteredWithDvla": "11/09/2021"
        },
        "Mileage": 34000,
        "Images": [
          {
            "Url": ""
          }
        ],
        "DetailedVehicleLink": "www.codeweavers.net",
        "Codes": [
          {
            "Type": "Vrm",
            "Value": "AA21 AAA"
          }
        ]
      }
    }
  ],
  "Action": "AddOrUpdate"
}

what is the easiest way to achieve this with Kirby.

Thanks - Josh

You can do it with hooks. you probably want page save and update.

The remote helper is probably useful too

Thanks man, are there any ways to POST to an API with authentication easier with any kirby features?

I am very new to APIs and am learning on the fly with this job… :upside_down_face:

The Remote class @jimbobrjames linked to above supports all sort of requests. so GET, POST etc.

Example: Is There a 'Kirby-Way' to Send a POST Request? - #2 by texnixe