Killswitch API for Zapier

Technical details about the Killswitch / Zapier integration.

Integrate EV Charger OCPP system with Zapier

"New Order" API

The Killswitch "New Order" API for Zapier enables you to retrieve the Killswitch Orders created under your Killswitch Account, using a webservice call. This webservice call returns the Killswitch Order data in a JSON format over HTTPS.

To use the "New Order" API, you need to pass a valid Killswitch API Token for every webservice request. The Killswitch API Token uniquely identifies your Killswitch Account and can be generated from the Killswitch Dashboard, under Account Settings. The API Token should be passed as the webservice parameter api_token.

API usage

Request type: POST
Endpoint URL: https://app.killswitch.cc/services/apexrest/kszapierapi/v1
URL Parameters:

All parameters are required:

  • api_key - use your Killswitch Account API Token.
  • action - indicates the Order selection type.

Possible values for parameter "action" are:

  • "get_orders_paid": retrieves Orders with status "Paid".
  • "get_orders_with_payment_error": retrieves Orders with status "Payment error".
  • "get_orders_without_payment": retrieves Orders with statuses "Created", "Pay-per-use (in progress)" and "Pay-per-use (finished)".
HTTP Headers

Following HTTP headers are required:

  • KS-Trust - use the Killswitch / Zapier authentication token. This is used to make sure that only Zapier is able to call this API.
  • accept = "application/json".

Sample webservice call

CURL REQUEST:

1 curl --request POST \
2      --url 'https://app.killswitch.cc/services/apexrest/kszapierapi/v1' \
3      --data 'api_key=[Killswitch Account API Token]' \
4      --data 'action=[get_orders_paid|get_orders_with_payment_error|get_orders_without_payment]' \
5      --header 'accept: application/json' \
6      --header 'KS-Trust: [Zapier auth token]'

Sample webservice response

JSON CONTENT:

{
  "id": "a04Vc0000014DZBIA2",
  "order_number": "00001048",
  "created_date": "2024-12-11T08:04:25.000Z",
  "last_modified_date": "2024-12-13T18:56:41.000Z",
  "currency_code": "EUR",
  "status": "Paid",
  "payment_status": "Paid",
  "order_pin": "466252",
  "usage_unit": "Minute",
  "language": "fr",
  "origin": "Checkout (online)",
  "discount_code": "1234",
  "customer_name": "Name",
  "customer_company_name": "Company",
  "customer_address": "Address",
  "customer_city": "City",
  "customer_postal_code": "1234-123",
  "customer_country_code": "FR",
  "customer_fiscal_id": "123456789",
  "customer_license_plate": "XX-33-YY",
  "customer_email": "email@domain.com",
  "customer_phone": "123456789",
  "customer_apartment_no": "11",
  "customer_room_no": "22",
  "customer_custom_info_descr": "Custom info description",
  "customer_custom_info": "Custom info",
  "stop_reason": "EVDisconnected",
  "refund_reason": "Reason",
  "device_id": "a03Vc000008eNXZIA2",
  "device_name": "Oh Si Pi-Pi",
  "device_type": "ocpp",
  "device_ocpp_identity": "1523390420",
  "device_tech_id": "ks-ocpp-10325",
  "quantity": 1.42,
  "unit_price": 0.12,
  "time_zone_offset": -1.5,
  "min_usage": 1,
  "max_usage": 15,
  "usage_duration_secs": 85.2,
  "effective_usage_duration_secs": 85,
  "total_amount": 0.75,
  "sub_total": 0.1704,
  "platform_fee": 0.75,
  "discount_pct": 5.5,
  "discount_value": 0.45,
  "save_our_planet_value": 0.25,
  "meter_start": 7075,
  "meter_end": 7076,
  "metered_usage": 1,
  "refund_amount": 1.05,
  "connector_id": 1,
  "usage_start": "2024-12-11T08:04:48.000Z",
  "usage_end": "2024-12-11T08:06:13.000Z",
  "manually_disconnected_on": "2024-12-11T08:06:00.000Z",
  "confirmed_start": "2024-12-11T08:04:48.000Z",
  "confirmed_end": "2024-12-11T08:06:13.000Z",
  "pay_per_use": true,
  "payment_active": true,
  "charge_platform_fee": false,
  "invoice_requested": false,
  "donated_save_our_planet": false,
  "refunded": false,
  "usage_active": false
}

Note: the New Order API will query and return all Killswith Orders for the Killswitch Account assigned to the API Key that have been Created or Last Modified in the last 2 days, considering the GMT time-zone.

For a complete list of data fields returned by this webservice and their description, please check the Setup Killswitch with Zapier page.

Need help or have questions about the Zapier integration?