createAddress
Creates an address.
CreateAddressMutationInput
Autogenerated input type of CreateAddressMutation
- clientMutationId: String
A unique identifier for the client performing the mutation.
- userId: ID!required
- firstName: String!required
- lastName: String!required
- addressLine1: String!required
- addressLine2: String
- addressLine3: String
- city: String!required
- region: String
- countryCode: CountryCode!required
- postalCode: String!required
- additionalInstructions: String
CreateAddressMutationPayload
Autogenerated return type of CreateAddressMutation.
- address: Address
- clientMutationId: String
A unique identifier for the client performing the mutation.
- errors: [InputError!]!
Validation errors
Query
mutation($input: CreateAddressMutationInput!) {
createAddress(input: $input) {
address {
id
firstName
lastName
addressLine1
addressLine2
addressLine3
city
region
countryCode
postalCode
additionalInstructions
}
errors {
message
path
}
}
}Variables
{
"input": {
"userId": "AccountHolder-XL3FBMGL86",
"firstName": "Britney",
"lastName": "Johnson",
"addressLine1": "44 Gateway Apartments",
"addressLine2": "11 Station Approach",
"addressLine3": "Hoe Street",
"city": "London",
"region": "London",
"countryCode": "GB",
"postalCode": "E17 9SL",
"additionalInstructions": "Hand to reception"
}
}Response
{
"data": {
"createAddress": {
"address": {
"id": "Address-4ZBFYEV967J",
"firstName": "Britney",
"lastName": "Johnson",
"addressLine1": "44 Gateway Apartments",
"addressLine2": "11 Station Approach",
"addressLine3": "Hoe Street",
"city": "London",
"region": "London",
"countryCode": "GB",
"postalCode": "E17 9SL",
"additionalInstructions": "Hand to reception"
},
"errors": []
}
}
}