POST /refresh_embedded_js_urls
Changed onRetrieves or regenerates the <code>embedded_js_url</code> for one or more orders. The endpoint supports requests for a specific order (using <code>pnm_order_identifier</code> or <code>site_order_identifier</code>) or for multiple orders associated with a consumer (using <code>pnm_customer_identifier</code> or <code>site_customer_identifier</code>).</br></br> The <code>embedded_js_url</code> is required to invoke the Embedded Form. This URL expires 30 minutes after order creation, whether the order is created via bulk file upload or through the /create_order endpoint. Before an agent can invoke the Embedded Form, the <code>embedded_js_url</code> must be regenerated if it has expired.</br></br>When regenerating the <code>embedded_js_url</code> for all orders associated with a customer, pagination parameters can be used to control the response size. The <code>limit</code> parameter specifies the maximum number of orders (up to <code>5</code>) to return per request (default is <code>2</code>). Use the <code>offset</code> parameter to specify the number of orders to skip in the response (default is <code>0</code>). </br></br>To regenerate the <code>embedded_js_url</code> for all matching orders regardless of expiration status, set the <code>force</code> parameter to <code>true</code>. If <code>force</code> is set to <code>false</code> or is not provided, the <code>embedded_js_url</code> is regenerated only for orders where the existing URL has expired.
Request
- Base URLhttps://api.paynearme-sandbox.com/json-api
- Auth
- OAuth 2Client credentialsToken URLhttps://login.paynearme.com/oauth/token
- or API key in query parameter signature
Request body
Example request
{
"pnm_order_identifier": "84338052224"
}Response
Successful Operation
Example response
{
"status": "ok",
"embedded_js_urls": [
{
"pnm_order_identifier": "83517813169",
"site_order_identifier": "2142455462",
"pnm_customer_identifier": "U9745174469",
"site_customer_identifier": "12345678",
"url": "https://www.paynearme-sandbox.com/api/embedded/jfcEO4vPld85QZfF9ke_2A/script.js"
}
]
}Changes
- breaking
added
subschema #1to the response bodyoneOflist for the response status - breaking
the response's body type changed from
objectto no type, and format fromarrayto no format for status - warning
removed the optional property
pnm_customer_identifierfrom the response with the status
9 more changes in this revision
- breaking