API Version
Product Catalog
Library

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": 1528093653, "updated_at": 1528093653, "object": "resource_migration" }

API Index URL GET

https://{site}.chargebee.com/api/v2/resource_migrations

Model Class

Chargebee\Resources\ResourceMigration\ResourceMigration
from_site
string, min chars=4, max chars=50
Domain name to which the item is moved.
entity_type
enumerated string
Type of the entity this record is stored for
Possible values are
customerEntity that represents a customer
customerEntity that represents a customer
Show all values[+]
entity_id
string, max chars=100
Handle of the customer in the current site.
status
enumerated string, default=failed
Status of the copy customer process.
Possible values are
scheduledScheduledfailedFailedsucceededSucceeded
scheduledScheduledfailedFailedsucceededSucceeded
Show all values[+]
errors
optional, string, max chars=65k
Filled only if the copy operation gets failed
created_at
timestamp(UTC) in seconds
Time the log is created
updated_at
timestamp(UTC) in seconds
Time the log is updated
from_site from_site
string, min chars=4, max chars=50
Domain name to which the item is moved.
entity_type entity_type
enumerated string
Type of the entity this record is stored for
Possible values are
customerEntity that represents a customer
customerEntity that represents a customer
Show all values[+]
entity_id entity_id
string, max chars=100
Handle of the customer in the current site.
status status
enumerated string, default=failed
Status of the copy customer process.
Possible values are
scheduledScheduledfailedFailedsucceededSucceeded
scheduledScheduledfailedFailedsucceededSucceeded
Show all values[+]
errors errors
optional, string, max chars=65k
Filled only if the copy operation gets failed
created_at created_at
timestamp(UTC) in seconds
Time the log is created
updated_at updated_at
timestamp(UTC) in seconds
Time the log is updated

Gets the last migration details.

Notes

Sample Codes
require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
  "site" => "{site}",
  "apiKey" => "{apiKey}",
]);

$result = $chargebee->resourceMigration()->retrieveLatest([
    "from_site" => "merchant-test",
    "entity_type" => "customer",
    "entity_handle" => "test123"
]);
$resourceMigration = $result->resource_migration;
copy
Click to Copy
require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
  "site" => "{site}",
  "apiKey" => "{apiKey}",
]);

$result = $chargebee->resourceMigration()->retrieveLatest([
    "from_site" => "merchant-test",
    "entity_type" => "customer",
    "entity_handle" => "test123"
]);
$resourceMigration = $result->resource_migration;

Sample Result [ JSON ]

Show more...
{
    "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

Method

$chargebee->resourceMigration->retrieveLatest([<param name> : <value>,<param name> : <value> ...])
from_site[]
required, string, min chars=4, max chars=50
Domain name to which the item is moved.
entity_type[]
required, enumerated string
Type of the entity this record is stored for.
Possible values are
customerEntity that represents a customer
customerEntity that represents a customer
Show all values[+]
entity_id[]
required, string, max chars=100
Handle of the customer in the current site.
resource_migration resource_migration
always returned
Resource object representing resource_migration

Sample admin console URL

https://{site}.chargebee.com/admin-console/resource_migrations/123x