Luo ja aktivoi mukautettuja agenttilistoja.
Tämän artikkelin osiot:
Luo agentilista
POST /agents
Luo mukautetun agentilistan geolokalisaation tai postinumerovälin perusteella.
- Jos agentilista tulee aktivoida heti, activate tulee asettaa arvoon true.
-
type tulee asettaa arvoon normal geolokalisaatiota varten ja zipcode postinumeroväliä varten.
- Jos normal, mapLongitude ja mapLatitude ovat pakollisia.
- Jos zipcode, kullekin agentille vaaditaan agentZipcodes-taulukko.
-
countryCode on aina pakollinen.
Body-esimerkki – geolokalisaatio
{
"key": "listkey",
"activate": "true",
"type": "normal",
"countryCode": "SE",
"agents": [
{
"id": "1",
"name": "Agent name 1",
"address1": "Test gatan 1",
"address2": "",
"zipcode": "41118",
"city": "Göteborg",
"state": "",
"countryCode": "SE",
"mapLongitude": "22.2",
"mapLatitude": "-11.1",
"phone": "07443332211",
"email": "test@test.com",
"additionalInfo": "Additional information",
"flags": [
"express",
"hem"
],
"openingHourWeekdays": [
{
"weekday": "monday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "tuesday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "wednesday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "thursday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "friday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "saturday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "sunday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
}
],
"openingHourSpecialDays": [
{
"date": "2018-04-27",
"hours": [
{
"start": "10:00",
"stop": "16:00"
}
]
},
{
"date": "2018-04-28",
"hours": [
{
"start": "10:00",
"stop": "16:00"
}
]
},
{
"date": "2018-10-10",
"hours": [
{
"start": "10:00",
"stop": "16:00"
}
]
}
]
},
{
"id": "2",
"name": "Agent name 2",
"address1": "Testvägen 10",
"address2": "",
"zipcode": "11359",
"city": "Stockholm",
"state": "",
"countryCode": "SE",
"mapLongitude": "33.3",
"mapLatitude": "17.4",
"phone": "0700331122",
"email": "test2@test2.com",
"additionalInfo": "Additional information",
"flags": [
"hem"
],
"openingHourWeekdays": [
{
"weekday": "monday",
"hours": [
{
"start": "10:00",
"stop": "23:00"
}
]
},
{
"weekday": "tuesday",
"hours": [
{
"start": "10:00",
"stop": "23:00"
}
]
},
{
"weekday": "wednesday",
"hours": [
{
"start": "10:00",
"stop": "23:00"
}
]
},
{
"weekday": "thursday",
"hours": [
{
"start": "10:00",
"stop": "23:00"
}
]
},
{
"weekday": "friday",
"hours": [
{
"start": "10:00",
"stop": "23:00"
}
]
},
{
"weekday": "saturday",
"hours": [
{
"start": "10:00",
"stop": "23:00"
}
]
},
{
"weekday": "sunday",
"hours": [
{
"start": "10:00",
"stop": "23:00"
}
]
}
],
"openingHourSpecialDays": [
{
"date": "2020-12-24",
"hours": [
{
"start": "10:00",
"stop": "16:00"
}
]
},
{
"date": "2020-12-25",
"hours": [
{
"start": "10:00",
"stop": "16:00"
}
]
},
{
"date": "2020-12-26",
"hours": [
{
"start": "10:00",
"stop": "16:00"
}
]
}
]
}
]
}
Body-esimerkki – postinumero
{
"key": "listkey",
"activate": "true",
"type": "zipcode",
"countryCode": "SE",
"agents": [
{
"id": "1",
"name": "Agent name 1",
"address1": "Test gatan 1",
"address2": "",
"zipcode": "41118",
"city": "Göteborg",
"state": "",
"country": "SE",
"phone": "07443332211",
"email": "test@test.com",
"additionalInfo": "Additional information",
"flags": [
"express",
"hem"
],
"agentZipcodes": [
{
"from": "40000",
"to": "45000"
},
{
"from": "46000",
"to": ""
}
],
"openingHourWeekdays": [
{
"weekday": "monday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "tuesday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "wednesday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "thursday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "friday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "saturday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
},
{
"weekday": "sunday",
"hours": [
{
"start": "08:00",
"stop": "22:00"
}
]
}
],
"openingHourSpecialDays": [
{
"date": "2018-04-27",
"hours": [
{
"start": "10:00",
"stop": "16:00"
}
]
},
{
"date": "2018-04-28",
"hours": [
{
"start": "10:00",
"stop": "16:00"
}
]
},
{
"date": "2018-10-10",
"hours": [
{
"start": "10:00",
"stop": "16:00"
}
]
}
]
}
]
}
Vastausesimerkki
{
"id": "11111"
}Ominaisuuksien kuvaukset löydät Ominaisuuksien viiteoppaasta.
Skeemaa ja testausta varten katso https://api.unifaun.com/rs-docs/ ja siirry kohtaan /agents POST.
Hae agenttilistoja
GET /agents
Hakee kaikki Delivery Checkout -konfiguraation mukautetut agenttilistat.
Vastausesimerkki
[
{
"id": "11111",
"name": "listkey",
"active": true,
"status": "OK",
"created": "2021-05-19T14:08:00.179+0000"
}
]Ominaisuuksien kuvaukset löydät Ominaisuuksien viiteoppaasta.
Skeemaa ja testausta varten katso https://api.unifaun.com/rs-docs/ ja siirry kohtaan /agents GET.
Aktivoi agentilista
POST /agents/{id}Aktivoi mukautetun agentilistan.
URI-parametrit
| Agent list id | string | Agentilistan tunniste | Pakollinen |
Vastaustekstiä ei palauteta, kun agentilista on aktivoitu onnistuneesti.
Ominaisuuksien kuvaukset löydät Ominaisuuksien viiteoppaasta.
Skeemaa ja testausta varten katso https://api.unifaun.com/rs-docs/ ja siirry kohtaan /agents/{id} POST.
Poista agentilista
DELETE /agents/{id}Poistaa agentilistan.
URI-parametrit
| Agent list id | string | Agentilistan tunniste | Pakollinen |
Vastaustekstiä ei palauteta, kun agentilista on poistettu onnistuneesti.
Ominaisuuksien kuvaukset löydät Ominaisuuksien viiteoppaasta.
Skeemaa ja testausta varten katso https://api.unifaun.com/rs-docs/ ja siirry kohtaan
/agents/{id} DELETE.