Use this to send a photo to a user. type value is 2.
{
"txnid": "200",
"receiver": {
"type": 2,
"address": "9053XXXXXXXX "
},
"composition": {
"list": [{
"type": 2,
"message": "https://timsac.turkcell.com.tr/scontent/p2p/14112016/11/P1e646f5c03a7b4b44f6da1329ac218e322da72356e79e5116dff86e3fc255a228.png",
"size": 12000,
"ratio": 1
}]
}
}
| Field | Value | Description |
|---|---|---|
| *txnid | string | Request id value |
| *receiver | object | |
| *type | int | Recipient address type. Values: 0 -> Hashed address 1 -> All addresses following the service 2 -> MSISDN (plain number) |
| *address | string | Address in the type specified by type. If type is 0, address is hashed (value provided by bipussu). If type is 1, address must not be in the request. If type is 2, provide the address in 905XXXXXXXXX format. |
| *composition | object | |
| *list | list | Messages to send; at least 1 item required. |
| *type | int | Message type. Values: 0 – Text 2 – Photo 3 – Audio 4 – Video 5 – Sticker 6 – Caps 7 – Location 9 – Finish Line 10 – Contact 13 – Template Media Message 14 – Document. Additional parameters depend on the selected type. |
| *message | string | Photo URL uploaded to FTS |
| *size | string | Photo size in bytes |
| *ratio | string | Photo width/height ratio |
message cannot be null or empty. Must be a URL obtained via the FTS API. Max length 512 characters. The file mime type must be image/*. [1004]size cannot be null or empty. Provide in bytes; must be between 1 and 20MB. [1005]ratio cannot be null or empty. Must be between 0.1 and 3. [1006]itemid must not be provided. [1007]| resultcode | Description |
|---|---|
| 1004 | invalid content message |
| 1005 | invalid content size |
| 1006 | invalid content ratio |
| 1007 | invalid content item id |