Request
curl -X PUT https://sandbox.api.lendeasy.ai /v1/merchant-advances/$ADVANCE_ID \
-H "Authorization: Bearer $TOKEN" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"terms": {
"purchasePrice": "48000.00",
"purchasedAmount": "60000.00",
"remittanceRate": "0.12"
},
"expectedVersion": 1
}' await fetch(`https://sandbox.api.lendeasy.ai /v1/merchant-advances/${advanceId}` , {
method: "PUT" ,
headers: { Authorization: `Bearer ${token}` , "Idempotency-Key" : idempotencyKey, "Content-Type" : "application/json" },
body: JSON.stringify({
"terms": {
"purchasePrice": "48000.00",
"purchasedAmount": "60000.00",
"remittanceRate": "0.12"
},
"expectedVersion": 1
}),
});requests.put(
f"https://sandbox.api.lendeasy.ai /v1/merchant-advances/{advance_id}" ,
headers={"Authorization" : f"Bearer {token}" , "Idempotency-Key" : idempotency_key},
json={
"terms": {
"purchasePrice": "48000.00",
"purchasedAmount": "60000.00",
"remittanceRate": "0.12"
},
"expectedVersion": 1
},
)200 400 401 403 404 409
{
"advanceId": "ma_northstar_6N8Q",
"externalId": "northstar-advance-2026",
"merchantId": "party_NORTHSTAR_4",
"productId": "prod_MERCHANT_ADVANCE_1",
"status": "submitted",
"currency": "USD",
"purchasePrice": "48000.00",
"purchasedAmount": "60000.00",
"remainingPurchasedAmount": "58574.95",
"remittanceRate": "0.12",
"projectedCompletionDate": "2027-07-04",
"version": 2
}{
"developerMessage": "Request was understood but rejected; inspect errors for field-level causes.",
"httpStatusCode": "400",
"defaultUserMessage": "The request could not be applied.",
"userMessageGlobalisationCode": "validation.msg.validation.errors.exist",
"errors": []
}{
"developerMessage": "Request was understood but rejected; inspect errors for field-level causes.",
"httpStatusCode": "401",
"defaultUserMessage": "The request could not be applied.",
"userMessageGlobalisationCode": "error.msg.not.authenticated",
"errors": []
}{
"developerMessage": "Request was understood but rejected; inspect errors for field-level causes.",
"httpStatusCode": "403",
"defaultUserMessage": "The request could not be applied.",
"userMessageGlobalisationCode": "error.msg.not.authorized",
"errors": []
}{
"developerMessage": "Request was understood but rejected; inspect errors for field-level causes.",
"httpStatusCode": "404",
"defaultUserMessage": "The request could not be applied.",
"userMessageGlobalisationCode": "error.msg.resource.not.found",
"errors": []
}{
"developerMessage": "Request was understood but rejected; inspect errors for field-level causes.",
"httpStatusCode": "409",
"defaultUserMessage": "The request could not be applied.",
"userMessageGlobalisationCode": "idempotency.request.in.flight",
"errors": []
}