upsertDeliveryPartnerConfig
Requires permission settings:integration:update.
Creates or updates a delivery partner configuration. Secret fields are write-only and stored encrypted, and an empty value keeps the stored one. Changing credentials takes an enabled partner offline until it is verified again. A rate-card courier prices in the organization's base currency, and a manual courier is verified on save. Setting up a provider that is already set up is refused. Needs the delivery partners plan feature and permission to update integrations.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation UpsertDeliveryPartnerConfig($input: UpsertDeliveryPartnerConfigInput!) {
upsertDeliveryPartnerConfig(input: $input) {
id
displayName
available
configuredSecretKeys
environment
isEnabled
nonSecretValues {
key
value
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpsertDeliveryPartnerConfig($input: UpsertDeliveryPartnerConfigInput!) {\n upsertDeliveryPartnerConfig(input: $input) {\n id\n displayName\n available\n configuredSecretKeys\n environment\n isEnabled\n nonSecretValues {\n key\n value\n }\n }\n}",
"variables": {
"input": {
"environment": "LIVE",
"providerKey": "string"
}
}
}
EOF
Variables:
{
"input": {
"environment": "LIVE",
"providerKey": "string"
}
}
Response:
{
"data": {
"upsertDeliveryPartnerConfig": {
"id": "id",
"displayName": "string",
"available": true,
"configuredSecretKeys": [
"string"
],
"environment": "LIVE",
"isEnabled": true,
"nonSecretValues": [
{
"key": "string",
"value": "string"
}
]
}
}
}
upsertDeliveryPartnerConfig(
input: UpsertDeliveryPartnerConfigInput!
): DeliveryPartnerConfigGql!
Arguments
upsertDeliveryPartnerConfig.input ● UpsertDeliveryPartnerConfigInput! non-null input
The provider, display name, credentials and provider settings.
Type
DeliveryPartnerConfigGql object
A delivery partner the organization has set up. Secret credentials are never returned.