Skip to main content
Contributor I
June 2, 2022
Solved

How do you create a profile and track orders to their profile via API?

  • June 2, 2022
  • 2 replies
  • 847 views

Hi !

I want to create custom order on Klaviyo. I only have customer name, email and phone number for creating customer on klaviyo.

and for order creating I have products name, qty , and price. Can anyone please tell me exact API's for create customer and create order against that customer.

thanks in advance.

Regards:

Abdul Majid

    This topic has been closed for replies.
    Best answer by Taylor Tarpley

    Hi @majid

     

    Welcome to the Community! Glad to have you and happy to help! 

     

    You can definitely use the information you have to create a profile in Klaviyo via API.  I’d recommend taking these steps to do so:

    1. Using the Identify Endpoint to create the profile via API
    curl --request POST \
    --url https://a.klaviyo.com/api/identify \
    --header 'Accept: text/html' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data 'data={"token": "PUBLIC_KEY","properties": {"$email":"ben.franklin@klaviyo.com"}}'
    1. Using the the Track Endpoint to track their activity
    REQUEST
    curl --request GET \
    --url 'https://a.klaviyo.com/api/v1/person/PERSON_ID/metrics/timeline?count=50&sort=desc&api_key=PRIVATE_API_KEY' \
    --header 'Accept: application/json'

     

    Additionally, if you are looking to create a profile via API and add it to a List in Klaviyo, I’d use the steps in our API documentation here. It should be noted however, that users would need to confirm their email address via the double opt-in process before they are created and added to the List. Our Klaviyo Developer Portal has many resources averrable at your fingertips that I’d recommend checking out to get more familiar with API.

     

    Finally, another Community members had a similar question that I’d suggest checking out to gain further insight!

     

    Thanks for participating in the Community!

    -Taylor

    2 replies

    Taylor Tarpley
    Community Manager
    Community Manager
    June 2, 2022

    Hi @majid

     

    Welcome to the Community! Glad to have you and happy to help! 

     

    You can definitely use the information you have to create a profile in Klaviyo via API.  I’d recommend taking these steps to do so:

    1. Using the Identify Endpoint to create the profile via API
    curl --request POST \
    --url https://a.klaviyo.com/api/identify \
    --header 'Accept: text/html' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data 'data={"token": "PUBLIC_KEY","properties": {"$email":"ben.franklin@klaviyo.com"}}'
    1. Using the the Track Endpoint to track their activity
    REQUEST
    curl --request GET \
    --url 'https://a.klaviyo.com/api/v1/person/PERSON_ID/metrics/timeline?count=50&sort=desc&api_key=PRIVATE_API_KEY' \
    --header 'Accept: application/json'

     

    Additionally, if you are looking to create a profile via API and add it to a List in Klaviyo, I’d use the steps in our API documentation here. It should be noted however, that users would need to confirm their email address via the double opt-in process before they are created and added to the List. Our Klaviyo Developer Portal has many resources averrable at your fingertips that I’d recommend checking out to get more familiar with API.

     

    Finally, another Community members had a similar question that I’d suggest checking out to gain further insight!

     

    Thanks for participating in the Community!

    -Taylor

    Omar
    Partner - Platinum
    2025 Champion
    June 6, 2022

    @majid adding to what @Taylor Tarpley mentioned I've found these instructions/examples also to be very helpful

    https://developers.klaviyo.com/en/docs/guide-to-integrating-a-platform-without-a-pre-built-klaviyo-integration

    https://developers.klaviyo.com/en/docs/custom-integration-faqs

     

    Hope it helps!

     

    Omar Lovert

    Polaris Growth

    Helping E-commerce brands maximize Lifetime Value & Profits with Klaviyo, CRO & CVO - Get your free Audit - https://link.polarisgrowth.com/free-audit