0% found this document useful (0 votes)
29 views

Inti Go Docs

Documentation API IntiGo Delivery

Uploaded by

Saf Bes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Inti Go Docs

Documentation API IntiGo Delivery

Uploaded by

Saf Bes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

On this document, we will describe how you can use our delivery system external API the right

way.

1. Links:

The links will be composed always from two parts, the first part will be always fixed cause it will be composed from a
subdomain concatenated with the restful API base URL with the specific endpoint URL.

Example:

https://my.intigo.tn/ : APP-PROD subdomain.

https://dev-my.intigo.tn/ : APP-STAGING subdomain.


https://partner-app.intigo.tn/ : API-PROD subdomain.
https://dev-partner-app.intigo.tn/ : API-STAGING subdomain.
api/v1/externalapi/ : the API base URL.

/adddelivery : The specific endpoint used for example to add a delivery request.
https://partner-app.intigo.tn/ api/v1/externalapi/ : The full base URL.
https://partner-app.intigo.tn/ api/v1/externalapi/adddelivery : The full API URL used to add a delivery
request. On the next parts, we will only specify the endpoint URL that you will use to send or receive
data.

2. Authentication:

Every partner has an API KEY that he can get once he connects on the dashboard and open the section "Profile" and
scroll to the end of the page.

https://my.intigo.tn/profile (PROD)

https://dev-my.intigo.tn/profile (STAGING)

API KEY example: “0c82a54f22f775a3ed8b97b2dea74036”.

So, this API Key should be always sent within the body object elements.
For example, you will send a new delivery object:
{

"apiKey":"a55561b3a4555726287aboke5035135101",
"id":153,
"pickUp":{
"address":"“54 Rue Mouawiya Ibn Abi Sofiene,Ariana",
"pickUpDate":"2021-01-21",
"fromTo":"08:00-12:00",
"city":"Béja", // pickup city

"coordinates": [ //optional
10.5420251,
36.3721756999999
cit
]
},
"paymentStatus":1,
"dropOff":{
"address":"“54 Rue Mouawiya Ibn Abi Sofiene,Ariana",
"coordinates": [ //optional
10.5420251,
36.3721756999999
]
},
"ClientName":"zaid selmi",
"ClientPhone":"--------",
"city":"Tunis",
"subDivision":"Bardo",
"additionalInfo":"test test", //optional
"descProduit":"test test" //optional
}

3. API endpoints:

Depending on the action you want to do, there is a number of fields that you should populate with the right information
to get a success result. Here is the list of all the actions allowed on our API:
Action Request type Endpoint URL

Create new delivery request POST /adddelivery

Get the delivery request infos POST /getdelivery

filter deliveries POST /deliveries

The following table represents the data that you can send for every action:
Action Field name Required Elements
Type
/O
ptional

Create id required String/ ● Your delivery request unique identifier.


new
Number
delivery
request

pickUp Required Object ● field name: coordinates


● Optional
● Field type: Array
● Format: [longitude,latitude]

● Field name: address


● Required
● Field type: String
● Example: “54 Rue Mouawiya Ibn Abi
Sofiene, Ariana”

● Field name: pickUpDate


● Required
● Field type: Date
● Format : “Year-Month-Day”
● Example: “2020-11-21”
● You put here the date you want for
the pickUp.

● Field name: fromTo


● Required
● Field type: String
● This field can take one of those
string: − “14:00-17:00”

● Field name: city


● Required
● Field type: String
paymentStatus Required Number ● 1: Payed
● 2: Collect payment

amount Optional Number This should be set if the payment status is 2.

dropOff Required Object ● Field name: coordinates


● Optional
● field type: Array
● Format: [longitude,latitude]

● Field name: address


● Required
● Field type: String
● Example: “54 Rue Mouawiya Ibn Abi
Sofiene, Ariana”

ClientName required String ● The full client name (first name + last name)

ClientPhone required String The phone number of the client

city Required String ● City name. // dropOff city


● Example: Tunis, Ariana, Nabeul...

subDivision Required String ● Region name.


● Example: La marsa, Bardo...

additionalInfo Optional String ● Any additional information you want


to add.

descProduit Optional String ● Simply the product description.

isExchange Optional Boolean ● If this is an exchange variable value


must be true

apiKey Required String ● Your API KEY from profile section.


Get the nid Required String/N ● Our identifier that you received on
delivery um the delivery request creation.
ber ● You will receive the full information of
the delivery request with the same
nid with
the status updated.

request apiKey Required String ● Your API KEY from profile section.
infos

Filter apiKey Required String ⚫ Your API KEY from profile section.
deliveries

ClientName Optional String ⚫ final client name

ClientPhone Optional String ⚫ final client phone number

itemsPerPage Optional String ⚫ how many delivery you want per page

page Optional String ⚫ page number


nid Optional String ⚫ package number (id in our db)

cid Optional String ⚫ package number (id in your db)

Responses:
Action Success status Failure status Response body

Create new delivery 201 400 Example:


request
{
“nid”: 201
}
● You should store the “nid” because you will
need to send it when you want to get the
delivery status changes and infos.

Get the delivery 200 400 Example:


request infos
{
“nid”: 201,
“cid” : “YOUR ID”

status: “Delivered”
}

● Here you get the full infos of the delivery


request with the updated status.
filter deliveries 200 400 Example :

docs : [

{
“nid”: 201,

“cid” : “YOUR ID”


paymentstatus: 1
}

],

“totalDocs”:2,
“limit”:50,

“totalPages”:1,
“page”:1,

“pagingCounter”:1,
“hasPrevPage”:false,
“hasNextPage”:false,
“prevPage”:null,

“nextPage”:null
}

Note:

For the pickUp and dropOff objects, the coordinates array is not required but for example if you have a fixed pickUp
points, you can create a new table on your database and add the coordinates on it and send the required one withing
your requests data.

example of add POST request to “/api/v1/externalapi/adddelivery”


{
"apiKey": "a555a613a42355726287adb1a2e5051b35101",
"id": 153,
"pickUp": {
"address": "nahj hamourabi tunis Marsa",
"pickUpDate": "2021-02-09",
"fromTo": "08:00-12:00",
"city": "Tunis", //pickUp CITY
"coordinates": [ //optional
10.5420251,
36.3721756999999
]
},
"paymentStatus": 1,
"dropOff": {
"address": "Ariana rue des fleurs",
"coordinates": [ //optional
10.5420251,
36.3721756999999
]
},
"ClientName": "zaid ss",
"ClientPhone": "52202772",
"city": "Tunis", //dropOff CITY
"subDivision": "Bardo",
"additionalInfo": "test test", //optional
"descProduit": "test test", //optional
"isExchange": false, // boolean variable (true || false)

example of a response of “/api/v1/externalapi/adddelivery”


{
"nid": 5212
}

Please get the list of cities and subdivisions to be used via this url :

[GET] https://partner-app.intigo.tn/api/deliveryrequest/regions

example of a POST request to “/api/v1/externalapi/deliveries”

{
"apiKey":"a555613a455726287ab1a2azd5135101",
"itemPerPage":"50", //optional
"page":2, //optional
"ClientName":"NAAAME CLIENT", //optional
"ClientPhone":"53886427", //optional
"city": "azrabegen", //optional
"subDivision":"bangladech", //optional
"additionalInfo":"very tired here", //optional
"descProduit":"desc produit" //optional
}
example of a response from “/api/v1/externalapi/deliveries”
{
"docs": [
{
"cid": "x23DD4",
"nid": "5211",
"ClientName": "NAAAME CLIENT",
"city": "azrabegen",
"subDivision": "bangladech",
"paymentStatus": 1,
"dropOff": {
"address": "54 ADDRESS BAD, ARIANA",
"status": "En attente de livraison"
},
"pickUp": {
"address": "54 ADDRESS BAD, ARIANA",
"status": "En attente d'enlévement"
}
}
],
"totalDocs": 2,
"limit": 50,
"totalPages": 1,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}
example of a POST request to “/api/v1/externalapi/getDelivery” {

"apiKey":"a555613a455726287aola2e505135101",
"nid":"5209"
}
example of a response from “/api/v1/externalapi/getDelivery” {
"cid": "x234",
"nid": "5209",
"ClientName": "NAAAME CLIENT",
"city": "azrabegen",
"subDivision": "bangladech",
"paymentStatus": 1,
"addInfo": "very here",
"descProduit": "desc produit",
"dropOff": {
"address": "54 ADDRESS BAD, ARIANA",
"status": "En attente de livraison"
},
"pickUp": {
"address": "54 ADDRESS BAD, ARIANA",
"status": "En attente d'enlévement"
}
}
GETTING PDF

example of a [GET] REQUEST from “/api/v1/externalapi/bordereau/:nid”

Example
https://dev-partner-app.intigo.tn/api/v1/externalapi/bordereau/31350
Status - Livraison
status = [
{
name: 'En attente de livraison',
value: 1,
},
{
name: 'Assigné',
value: 2,
},
{
name: 'Livraison en cours',
value: 10,
},
{
name: 'Refusé par chauffeur',
value: 4,
},
{
name: 'Commencée',
value: 5,
},
{
name: 'Point Relais',
value: 18,
},
{
name: 'Commande livrée',
value: 6,
},
{
name: 'declined by admin',
value: 8,
},
{
name: 'Annulée par vendeur',
value: 14,
},
{
name: 'Retour depuis point relais',
value: 19,
},
{
name: 'Retour provisoire',
value: 15,
},
{
name: 'Retour définitif',
value: 16,
},
{
name: 'Retour vendeur',
value: 17,
},
{
name: 'Adresse non exacte',
value: 12,
},
{
name: 'Transfert en cours',
value: 20,
},
{
name: 'Retour vers dépôt',
value: 24,
},
{
name: 'En dépôt',
value: 25,
},
{
name: 'Colis perdu',
value: 21,
},];

Status - pickup
status = [
{
name: "En attente d'enlèvement",
value: 1,
},
{
name: 'Assigné',
value: 2,
},
{
name: 'Accepted',
value: 3,
},
{
name: 'Pickup assurée',
value: 10,
},
{
name: 'Refusé par chauffeur',
value: 4,
},
{
name: 'Commencé',
value: 5,
},
{
name: 'Entrée au centrale',
value: 6,
},
{
name: 'Annulée par chauffeur aprés acceptation',
value: 7,
},
{
name: 'Annulée par admin',
value: 8,
},
{
name: 'Annulée par vendeur',
value: 14,
},
{
name: 'Retour définitif',
value: 16,
},
{
name: 'Retour vendeur',
value: 17,
},
{
name: 'Colis perdu',
value: 21,
},
];

You might also like