createPersonalEntity
Parameters
| Parameter | Type | Required |
|---|---|---|
| user_id | UUID | true |
| true | ||
| phone | String | false |
| first_name | String | true |
| last_name | String | true |
| address1 | String | true |
| address2 | String | false |
| city | String | false |
| state_province_region | String | false |
| postal_code | PostalCode | false |
| country | ISO3166_1 | true |
| tax_number | TaxNumber | false |
| birth_date | DateTime | true |
| accept_terms_and_conditions | Boolean | true |
| platform_id | UUID | true |
GraphQL Schema
GraphQL
mutation createPersonalEntity (
$user_id: UUID!
$email: Email!
$phone: String
$first_name: String!
$last_name: String!
$address1: String!
$address2: String
$city: String
$state_province_region: String
$postal_code: PostalCode
$country: ISO3166_1!
$tax_number: TaxNumber
$birth_date: DateTime!
$accept_terms_and_conditions: Boolean!
$platform_id: UUID!
) {
createPersonalEntity (
user_id: $user_id
email: $email
phone: $phone
first_name: $first_name
last_name: $last_name
address1: $address1
address2: $address2
city: $city
state_province_region: $state_province_region
postal_code: $postal_code
country: $country
tax_number: $tax_number
birth_date: $birth_date
accept_terms_and_conditions: $accept_terms_and_conditions
platform_id: $platform_id
)
}
query
string
Defaults to {}
``200 200
object
data
object
createPersonalEntity
string
``400 400
NodeShell
xxxxxxxxxx
const axios = require('axios');
let data = JSON.stringify({
query: `mutation createPersonalEntity (
$user_id: UUID!
$email: Email!
$phone: String
$first_name: String!
$last_name: String!
$address1: String!
$address2: String
$city: String
$state_province_region: String
$postal_code: PostalCode
$country: ISO3166_1!
$tax_number: TaxNumber
$birth_date: DateTime!
$accept_terms_and_conditions: Boolean!
$platform_id: UUID!
) {
createPersonalEntity (
user_id: $user_id
email: $email
phone: $phone
first_name: $first_name
last_name: $last_name
address1: $address1
address2: $address2
city: $city
state_province_region: $state_province_region
postal_code: $postal_code
country: $country
tax_number: $tax_number
birth_date: $birth_date
accept_terms_and_conditions: $accept_terms_and_conditions
platform_id: $platform_id
)
}`,
variables: {"user_id":"","email":"","phone":"","first_name":"","last_name":"","address1":"","address2":"","city":"","state_province_region":"","postal_code":"","country":"","tax_number":"","birth_date":"","accept_terms_and_conditions":true}
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://sandbox.external.routefusion.com/graphql',
headers: {
'Content-Type': 'application/json',
'Authorization': '••••••'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
xxxxxxxxxx
{
"data": {
"createPersonalEntity": "573442c4-e010-480b-9acf-861fac940e9a"
}
}