GraphQL to REST API Migration Guide
This guide outlines the steps required to migrate from the GraphQL API to the new REST API for chargeback operations
Authentication Changes
- Previous: GraphQL API token
- New: REST API token generated from the Customer Hub
- Action Required: Generate a new token from the Customer Hub before migration
Endpoint Changes
- Previous GraphQL:
https://api.justt.ai/merchant-graph
- New REST:
https://api.justt.ai/v1/chargebacks
Request Format Changes
Previous GraphQL Format
POST https://api.justt.ai/merchant-graph
{
"query": "mutation createChargeback($input: CreateChargebackInput!) {
createChargeback(input: $input) {
id
status
}
}",
"variables": {
"input": {
// Your chargeback data here
}
}
}
New REST Format
POST https://api.justt.ai/v1/chargebacks
{
// Your chargeback data here with updated parameter names
}
Parameter Mapping
When migrating your requests, ensure you update the parameter names while keeping the same values:
GraphQL Parameter | REST Parameter | Notes |
---|---|---|
[Old Param Name] | [New Param Name] | Same value used |
Error Handling
- GraphQL returned errors in the
errors
array - REST API uses standard HTTP status codes with error details in the response body
Migration Checklist
- Generate new REST API token from Customer Hub
- Update API endpoint URL
- Update request format from GraphQL to REST
- Map parameters to new names
- Update error handling
- Test the migrated endpoint
Updated about 1 month ago
Did this page help you?