Create an application membership
How to create an application membership via API
To create a new application membership, send a POST
request to the /api/application_memberships
endpoint, passing the resource arguments in the request body.
Request
POST https://provisioning.commercelayer.io/api/application_memberships
Arguments
Body Parameter
Type
Required
type
string
Required
attributes.filters
object
Optional
attributes.reference
string
Optional
attributes.reference_origin
string
Optional
attributes.metadata
object
Optional
relationships.api_credential
object
Required
relationships.membership
object
Optional
relationships.membership_profile
object
Optional
relationships.organization
object
Required
relationships.role
object
Required
Example
The following request creates a new application membership:
curl -g -X POST \
'https://provisioning.commercelayer.io/api/application_memberships' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer {{your_access_token}}' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"data": {
"type": "application_memberships",
"relationships": {
"api_credential": {
"data": {
"type": "api_credentials",
"id": "ABCRtyUpBa"
}
},
"organization": {
"data": {
"type": "organizations",
"id": "BCDRtyUpBa"
}
},
"role": {
"data": {
"type": "roles",
"id": "CDERtyUpBa"
}
}
}
}
}'
Last updated