Resource Migration is used for finding the status of customer migration between Chargebee sites.

Sample resource migration [ JSON ]

{ "from_site": "yourapp", "entity_type": "customer", "entity_id": "test123", "status": "failed", "created_at": 1539327043, "object": "resource_migration" }

API Index URL GET

https://{site}.chargebee.com/api/v2/resource_migrations
from_site
Domain name to which the item is moved.
string, min chars=4, max chars=50
entity_type
Type of the entity this record is stored for.
enumerated string
Possible values are
customerEntity that represents a customer.
entity_id
Handle of the customer in the current site.
string, max chars=100
status
Status of the copy customer process.
enumerated string, default=failed
Possible values are
scheduledScheduled.failedFailed.succeededSucceeded.
errors
Filled only if the copy operation gets failed.
optional, string, max chars=65k
created_at
Time the log is created.
timestamp(UTC) in seconds
updated_at
Time the log is updated.
timestamp(UTC) in seconds

Gets the last migration details.

Sample Request
curl  https://{site}.chargebee.com/api/v2/resource_migrations/retrieve_latest \
     -G  \
     -u {site_api_key}: \
     --data-urlencode from_site="yourapp" \
     --data-urlencode entity_type="customer" \
     --data-urlencode entity_id="test123"
copy
curl  https://{site}.chargebee.com/api/v2/resource_migrations/retrieve_latest \
     -G  \
     -u {site_api_key}: \
     --data-urlencode from_site="yourapp" \
     --data-urlencode entity_type="customer" \
     --data-urlencode entity_id="test123"

Sample Response [ JSON ]

{"resource_migration": { "from_site": "yourapp", "entity_type": "customer", "entity_id": "test123", "status": "failed", "created_at": 1539327043, "updated_at": 1539327043, "object": "resource_migration" }}

URL Format GET

https://{site}.chargebee.com/api/v2/resource_migrations/retrieve_latest
from_site
Domain name to which the item is moved.
required, string, min chars=4, max chars=50
entity_type
Type of the entity this record is stored for.
required, enumerated string
Possible values are
customerEntity that represents a customer.
entity_id
Handle of the customer in the current site.
required, string, max chars=100
Resource object representing resource_migration.
always returned