Response
Last update: 7 days ago by Irais Aguirre
The response returned by the service is a JSON string that varies according to the response type.
Successful response example
{"mappings": [{"name": " Google Short URL","originalURL": "http://google.com","shortURL": "http://bcm.com/2g3L","shortenedPrev": false},{"name": "1-201905311532397","originalURL": "https://mail.google.com","shortURL": "http://bcm.com/2g3M","shortenedPrev": true}]}
| Name | Description |
|---|---|
| mappings | Array containing the result for each requested URL |
| name | Name assigned to the URL; if none was provided, it is generated automatically. |
| originalURL | Original URL. |
| shortURL | Shortened URL. |
| shortenedPrev | Flag indicating whether the URL was shortened for the first time or had already been requested. |
Error response example
When there is a problem processing the request, the JSON string changes; the string you will receive is shown below.
{"error": {"code": "ERROR_INVALID_PARAMETER","message": "Bad arguments","status": 400}}
| Name | Description |
|---|---|
| code | Result code; its value indicates the type of error that occurred. |
| message | Describes the type of error that occurred. |
| status | Identifies the error that occurred with a numeric value. |
