NodiRef LogoNodiRef

Register Conversion

The endpoint POST /v1/convert is used to register a new conversion for a referral.

In order to create a new conversion, you will need a referral to link it back to the partner who created it. If your flow does not require users to sign up for the conversion, you might create a new Referral using the POST /v1/referral route and using the ID provided to create the conversion.

Request Body

  • referral_id (string): The referral ID for the conversion. You can also use the external_id instead, if you've register it in the Referral creation.

  • event_type (string): The type of event for the conversion.

  • payload (object): The payload containing the data to be converted.

If the request is being sent in the back-end, in order to enable the correct Fraud Detection checks, make sure to forward the headers sent from the front-end to correctly register them. The most important headers are:

  • REMOTE_ADDR -> The IP Address of the client, make sure it's the IP sent by the client. If you use a internal proxy, you might have a X-FORWARDED-FOR header with the client's IP forwarded by your proxy or the X-Real-IP forwarded by external proxys.

  • User-Agent -> This is the User Agent of your client, if you cannot override the User-Agent in the Headers of your request, you can sent a X-User-Agent instead with the client's User Agent.

POST/v1/convert

Authorization

AuthorizationRequired<token>

In: header

Request Body

application/jsonOptional

Response Body

OK

TypeScript Definitions

Use the response body type in TypeScript.

responseRequiredstring
curl -X POST "https://api.nodiref.com/v1/convert" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "referral_id": "9eed7027-ce39-4e55-9d0d-bb1ac5985a39",
    "event_type": "subscription",
    "payload": {
      "amount": 79.98
    }
  }'
"string"