Migration guide
If you are an existing user of the Provisioning API, and using version v1alpha1
or v1alpha2
, you must migrate to the v1
version of the Provisioning API.
Learn how to migrate from the following versions:
Migrating from v1alpha1 to v1alpha2
Unless listed below, the endpoints are the same in v1alpha2
as they were in v1alpha1
WhatsApp template changes
For all relevant endpoints, the format of the WhatsApp template data has changed to keep structure consistent between different resource endpoints.
-
The
components
object has moved todetails.components
. Similarly, if changes are presented, thechanges.components
has moved tochanges.details.components
. -
The
changes
field contains astatus
field describing the status of the change, or initial submission. -
The root level now contains a
state
field describing the status of the existing resource. -
The field
rejectionCode
describing why a template was rejected is moved to the root level.
Examples
DRAFT
/ IN_PROGRESS
v1alpha1
{
"status": "DRAFT", // "IN_PROGRESS"
"name": "name",
"language": "en",
"category": "AUTHENTICATION",
"allowCategoryChange": false,
"components": []
}
v1alpha2
{
"name": "name",
"language": "en",
"category": "AUTHENTICATION",
"changes": {
"status": "DRAFT", // "IN_PROGRESS"
"allowCategoryChange": false,
"details": {
"components": []
}
}
}
APPROVED / PAUSED / DISABLED
v1alpha1
{
"whatsappId": "whatsappId",
"status": "APPROVED", // "PAUSED"
"name": "name",
"language": "en",
"category": "AUTHENTICATION",
"components": []
}
v1alpha2
{
"whatsappId": "whatsappId",
"state": "APPROVED", // "PAUSED"
"name": "name",
"language": "en",
"category": "AUTHENTICATION",
"details": {
"components": []
}
}
REJECTED (missing rejectionCode)
v1alpha1
{
"whatsappId": "whatsappId",
"status": "REJECTED",
"name": "name",
"language": "en",
"category": "AUTHENTICATION",
"allowCategoryChange": false,
"rejectionCode": "SCAM", // missing
"components": []
}
v1alpha2
{
"whatsappId": "whatsappId",
"state": "REJECTED",
"name": "name",
"category": "AUTHENTICATION",
"language": "en",
"rejectionCode": "SCAM", // missing
"details": {
"components": []
}
}
update APPROVED (DRAFT / IN_PROGRESS)
v1alpha1
{
"whatsappId": "whatsappId",
"status": "APPROVED",
"name": "name",
"language": "en",
"category": "MARKETING",
"allowCategoryChange": false,
"components": [],
"changes": {
"status": "DRAFT", // "IN_PROGRESS"
"components": []
}
}
v1alpha2
{
"whatsappId": "whatsappId",
"state": "APPROVED",
"name": "name",
"language": "en",
"category": "MARKETING",
"changes": {
"status": "DRAFT", // "IN_PROGRESS"
"allowCategoryChange": false,
"details": {
"components": []
}
},
"details": {
"components": []
}
}
update REJECTED (DRAFT / IN_PROGRESS / REJECTED) (missing rejectionCode)
v1alpha1
{
"whatsappId": "whatsappId",
"status": "REJECTED",
"name": "name",
"language": "en",
"category": "MARKETING",
"allowCategoryChange": false,
"rejectionCode": "SCAM", // missing
"components": [],
"changes": {
"status": "DRAFT", // "IN_PROGRESS" / "REJECTED"
"components": []
}
}
v1alpha2
{
"whatsappId": "whatsappId",
"name": "name",
"state": "REJECTED",
"category": "MARKETING",
"language": "en",
"rejectionCode": "SCAM", // missing
"changes": {
"status": "DRAFT", // "IN_PROGRESS" / "REJECTED"
"allowCategoryChange": false,
"details": {
"components": []
}
},
"details": {
"components": []
}
}
Migrating from v1alpha2 to v1
There are no migration steps needed for this migration. Simply update your endpoints.