Using the QueueID via REST API

Follow

What you can get from this article

This article aims to explain how to use the REST API with a QueueID to determine the status of a lead after it's been submitted.

This includes information such as - 

  • Was it accepted into your campaign?
  • Was it sold to a buyer?
  • Which buyer was it sold to?
  • Which deliveries were triggered and what was their status?

 

The Basics

When submitting a lead through the REST API, your request is queued.

SO you'll typically get something which looks like the below -

{
   "status": "Success",
   "code": 1,
   "message": "",
   "results": [
       {
           "queueId": "ac1e0206-6d6fd2fa-62ce91e7-ba33-5cc458e6",
           "status": "Queued",
           "code": 1
       }
   ]
}

 

If you want to find out the result of this lead, you'd need to make a 2nd request to LeadByte using the QueueID. (Make sure your REST API key has the "API queue" permission enabled)

The request you'd make -

[GET] https://{account}.leadbyte.com/restapi/v1.2/apiqueue/ac1e0206-6d6fd2fa-62ce91e7-ba33-5cc458e6?key=cb266b24ef4a5b59b722ca5801431120

 

Which would return the following response - 

31960026-98c8-43ca-aab3-b3b4cab7b0e2.png

As you can see the Lead above is valid, and it was accepted into the campaign on 13th July 2022 at 09:35 UTC.

 

More Options

As it stands, polling the queue ID is ONLY returning very basic information about the lead.

However, if you head to your REST API key settings and scroll down, you should find a section called API Queue Settings. 

You can include any or all of the below - 

  • Info about the delivery(s) the lead was sent to
  • Info about the campaign the lead entered
  • Info about the supplier who submitted the lead
  • Info about the buyer who bought the lead
  • The lead data itself

 

As an example - 

d873da34-2135-450f-a371-fa02ea2e3993.png

 

As always, if you have any further questions please raise a support ticket.

Was this article helpful?
0 out of 0 found this helpful

Comments