M
M
MalekBV2021-04-08 02:30:54
API
MalekBV, 2021-04-08 02:30:54

How to get ID of one city from several courier services?

Hello, there is an online store (Python).

The user must select his city
When he has already moved to the cart, he needs to select a delivery method (SDEK / Russian post / boxberry)

After checkout, I need to send a request to courier services to register the order, and it should contain the city ID from their database

. How do I do this organize so that having only the name of the user's city, I can receive ID in the above courier bases to send a request to the selected one with the corresponding id?
Perhaps this should be done in a different way, enlighten)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
neol, 2021-04-08
@malekBV

You make a table of cities, you make a table of cities from courier services, you compare all this happiness according to FIAS / KLADR and write down the relationships.
Courier services with cities have trash, waste and sodomy (duplicates, errors, typos), so this is much easier said than done.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question