Create a store

Stores are necessary for us to know where we have to go to collect your packages.

It’s important to store the resultant ID from the Store created fot the next steps, that are deliveries creation.

Requirements:

  • Use your API Key and know how to use it.


Argument Structure:

Name

Type

Required

Observations

Name

Type

Required

Observations

name

string

Yes

 

description

string

Yes

 

referenceId

string

Yes

 

location

object

Yes

*Check details object location.

contact

object

Yes

**Check details object contact.

*Object Location

Name

Type

Name

Type

street

String

longitude

Float

latitude

Float

zipCode

String

externalNumber

String

internalNumber

String

neighborhood

String

state

String

city

String

instructions

String

**Object Contact

Name

Type

Name

Type

name

String!

phone

String!

email

String

 


Request:

For the creation of a new Store, the Mutation createStore is used.

If it is very important to use your own storeId in the referenceId parameter. This will be used when creating a new delivery.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 mutation { createStore(input: { name: "Store for TEST", description: "Store for TEST", referenceId: "1224", location: { street: "Carlos B Zetina", longitude: 19.4101249, latitude: -99.1810582, zipCode: "11800", externalNumber: "138", internalNumber: "1", neighborhood: "Escandón I Sección", state: "CDMX", city: "CDMX", instructions: "DESCRIBE THE INSTRUCTION" }, contact: { name: "IVOY", phone: "5523456789", email: "ivoyTest@ivoy.mx" } }) { id } }

Response:

The expected response should be like the shown below.

1 2 3 4 5 6 7 { "data": { "createStore": { "id": "3279" } } }

Next steps