Skip to main content

CreateMobileAddressInput

A new ordering address for the buyer.

input CreateMobileAddressInput {
addressLine1: String!
addressLine2: String
addressType: AddressType
city: String!
contactName: String
country: String!
customFields: JSON
instructions: String
isDualPurpose: Boolean
lat: Float
lng: Float
name: String!
phone: String
postalCode: String
state: String
}

Fields​

CreateMobileAddressInput.addressLine1 ● String! non-null scalar​

The first line of the address.

CreateMobileAddressInput.addressLine2 ● String scalar​

The second line of the address.

CreateMobileAddressInput.addressType ● AddressType enum​

Address classification (AddressType enum). Defaults to SHIPPING when omitted.

CreateMobileAddressInput.city ● String! non-null scalar​

The city.

CreateMobileAddressInput.contactName ● String scalar​

The person to ask for at the address, when the address form shows it.

CreateMobileAddressInput.country ● String! non-null scalar​

ISO-3166-1 alpha-2 country, sent by the client from TenantConfig.countryCode (no Qatar default).

CreateMobileAddressInput.customFields ● JSON scalar​

Values for the organization's own address fields, keyed by field key. Only fields buyers may fill in are accepted.

CreateMobileAddressInput.instructions ● String scalar​

Delivery notes for the address (a gate code, opening hours), when the address form shows them.

CreateMobileAddressInput.isDualPurpose ● Boolean scalar​

TRUE when the address serves BOTH the shipping and billing role. addressType stays the PRIMARY classification (one enum column cannot hold two roles) and this records the second — the same pair myAddresses already returns. Nullable/optional: app builds predating this field send nothing and the column defaults to false. Until this existed the buyer app had nowhere to put a both-ticked selection, so it encoded the combination in name ("Shipping & Billing") and parsed it back out on edit — do not go back to that.

CreateMobileAddressInput.lat ● Float scalar​

The latitude of the address on the map.

CreateMobileAddressInput.lng ● Float scalar​

The longitude of the address on the map.

CreateMobileAddressInput.name ● String! non-null scalar​

The name of the address.

CreateMobileAddressInput.phone ● String scalar​

Phone at the address in E.164 format, e.g. +97455551234. Required only when the organization's field rules require it on the buyer app's address form.

CreateMobileAddressInput.postalCode ● String scalar​

Postal / ZIP code. OPTIONAL, unlike the admin address form which requires it: many of the countries this app ships to (QA, AE, …) have no postal system, and a required field there blocks the buyer from saving a perfectly valid address. Omitted or blank stores an empty string — Address.postalCode is a NOT NULL column, so it can never be null. Until this field existed the service wrote the literal "00000" for every mobile-created address, which is why older rows carry it.

CreateMobileAddressInput.state ● String scalar​

State / province / region. Falls back to city when omitted.

Member Of​

createAddress mutation