curl --request POST \
--url https://api.example.com/api/v1/sms/send/contract \
--header 'Content-Type: application/json' \
--data '
{
"contract_id": "<string>",
"recipients": [
{}
],
"terms": {}
}
'{
"contract_id": "<string>",
"recipients": [
{}
],
"message": "<string>",
"sms_result": {}
}Send formatted contract notification SMS to parties
curl --request POST \
--url https://api.example.com/api/v1/sms/send/contract \
--header 'Content-Type: application/json' \
--data '
{
"contract_id": "<string>",
"recipients": [
{}
],
"terms": {}
}
'{
"contract_id": "<string>",
"recipients": [
{}
],
"message": "<string>",
"sms_result": {}
}curl -X POST http://localhost:8000/api/v1/sms/send/contract \
-H "Content-Type: application/json" \
-d '{
"contract_id": "AG-2024-001",
"recipients": ["+254712345678", "+254798765432"],
"terms": {
"product": "Maize",
"quantity": "100 bags",
"total_amount": 50000,
"currency": "KES",
"delivery_deadline": "2024-02-15"
}
}'
{
"contract_id": "AG-2024-001",
"recipients": [
"+254712345678",
"+254798765432"
],
"message": "VoicePact Contract AG-2024-001\nProduct: Maize (100 bags)\nAmount: KES 50,000\nDelivery: 2024-02-15\nReply YES-AG-2024-001 to confirm",
"sms_result": {
"status": "success",
"message_ids": ["ATXid_abc123", "ATXid_def456"],
"sent_count": 2
}
}
VoicePact Contract {contract_id}
Product: {product} ({quantity})
Amount: {currency} {total_amount:,}
Delivery: {delivery_deadline}
Reply YES-{contract_id} to confirm
{
"detail": "Contract SMS failed: Invalid contract data"
}
200 - Contract SMS sent successfully500 - SMS send failed503 - SMS service unavailablegenerate_contract_sms() method from the Africa’s Talking client (source: africastalking_client.py:224-242) to format contract details into a concise SMS message.