Logo Site EngageLab Mark Colored TransparentDokumentation
Suchen

Liste aller Vorlagen abrufen

Diese Schnittstelle unterstützt derzeit keine Paginierung und gibt eine Kurzliste aller Vorlagen zurück. Dabei werden im Wesentlichen die konkreten Inhalte entfernt; wenn Sie die Inhalte benötigen, verwenden Sie bitte die Detail-Schnittstelle.

Anfrage-URL

GET https://otp.api.engagelab.cc/v1/template-configs

Authentifizierung

Bitte lesen Sie Authentifizierung, um zu erfahren, wie Sie die API-Authentifizierung durchführen.

Anfrage

Anfrageparameter

Keine

Anfragebeispiel

Anfrage-Header

GET /v1/template-configs HTTP/1.1 Authorization: Basic amlndWFuZ2RldjpkZXZfc2VjcmV0
              
              GET /v1/template-configs  HTTP/1.1
Authorization: Basic amlndWFuZ2RldjpkZXZfc2VjcmV0

            
Diesen Codeblock im schwebenden Fenster anzeigen

Anfragetext

Keiner

Antwort

Antwortparameter

Kein äußeres Wrapper-Feld, gibt direkt ein JSON-Array zurück.

Antwortbeispiel

Erfolgsantwort

[ { "template_id": "test-template-1", // Custom template id, unique within the application "description": "Test template 1", // Description of the template "send_channel_strategy": "whatsapp|sms",// Template delivery strategy, supports whatsapp/sms/voice/email. Combined strategies use the | character to indicate fallback on failure "brand_name": "Brand Name", // Brand name, used for signatures in template content in some countries/regions (e.g., some countries require registered signatures in the SMS channel) "verify_code_config": { // Verification code configuration, used to configure automatically generated verification codes, returned when the template contains a verification code type "verify_code_type": 1, // Verification code type, value range [1,7] "verify_code_len": 6, // Verification code length, value range [4,10] "verify_code_ttl": 1 // Verification code validity period, value range [1,10], note that when the strategy includes whatsapp, the value can only be 1, 5, 10 }, "whatsapp_config": { // whatsapp strategy configuration, returned when the delivery strategy includes whatsapp "template_type": 1 // whatsapp template type, currently only supports default template, fixed value is 1 }, "sms_config": { // sms strategy configuration, returned when the delivery strategy includes sms "template_type": 2, // sms template type, values: 1-default template/2-custom template "template_parts": 1 // Estimated billing parts for sms template, if the template is too long, the specific price = billing parts * billing unit price }, "voice_config": { // voice strategy configuration, returned when the delivery strategy includes voice "template_type": 1 // voice template type, currently only supports default template, fixed value is 1 }, "email_config": { // email strategy configuration, returned when the delivery strategy includes email "template_name": "email template name" // email template name }, "pwa_config": { // pwa related configuration, returned only when there is pwa configuration "pwa_platform": "xx", // pwa platform used "pwa_code": "xx" // code in the pwa platform used }, "created_time": 1234567890, // Creation time of the template, timestamp format, accurate to seconds "status": 1, // Template status, values: 1-pending review/2-approved/3-rejected "audit_remark": "xx" // Audit remark, generally when the audit is rejected, you can check this field for the rejection reason } ]
              
              [
  {
    "template_id": "test-template-1",       // Custom template id, unique within the application
    "description": "Test template 1",       // Description of the template
    "send_channel_strategy": "whatsapp|sms",// Template delivery strategy, supports whatsapp/sms/voice/email. Combined strategies use the | character to indicate fallback on failure
    "brand_name": "Brand Name",             // Brand name, used for signatures in template content in some countries/regions (e.g., some countries require registered signatures in the SMS channel)
    "verify_code_config": {                 // Verification code configuration, used to configure automatically generated verification codes, returned when the template contains a verification code type
        "verify_code_type": 1,              // Verification code type, value range [1,7]
        "verify_code_len": 6,               // Verification code length, value range [4,10]
        "verify_code_ttl": 1                // Verification code validity period, value range [1,10], note that when the strategy includes whatsapp, the value can only be 1, 5, 10
    },
    "whatsapp_config": {                    // whatsapp strategy configuration, returned when the delivery strategy includes whatsapp
        "template_type": 1                  // whatsapp template type, currently only supports default template, fixed value is 1
    },
    "sms_config": {                         // sms strategy configuration, returned when the delivery strategy includes sms
        "template_type": 2,                 // sms template type, values: 1-default template/2-custom template
        "template_parts": 1                 // Estimated billing parts for sms template, if the template is too long, the specific price = billing parts * billing unit price
    },
    "voice_config": {                       // voice strategy configuration, returned when the delivery strategy includes voice
        "template_type": 1                  // voice template type, currently only supports default template, fixed value is 1
    },
    "email_config": {                       // email strategy configuration, returned when the delivery strategy includes email
        "template_name": "email template name" // email template name
    },
    "pwa_config": {                         // pwa related configuration, returned only when there is pwa configuration
        "pwa_platform": "xx",               // pwa platform used
        "pwa_code": "xx"                    // code in the pwa platform used
    },
    "created_time": 1234567890,             // Creation time of the template, timestamp format, accurate to seconds
    "status": 1,                            // Template status, values: 1-pending review/2-approved/3-rejected
    "audit_remark": "xx"                    // Audit remark, generally when the audit is rejected, you can check this field for the rejection reason
  }
]

            
Diesen Codeblock im schwebenden Fenster anzeigen

Fehlerantwort

{ "code": 4001, "message": "config not exist" }
              
              {
    "code": 4001,
    "message": "config not exist"
}

            
Diesen Codeblock im schwebenden Fenster anzeigen

Fehlercodes

Fehlercode HTTP-Code Beschreibung
1000 500 Interner Fehler
2001 401 Authentifizierung fehlgeschlagen, falsches Token übermittelt
2002 401 Authentifizierung fehlgeschlagen, Token ist abgelaufen oder deaktiviert
2004 403 Keine Berechtigung zum Aufruf dieser API
4001 400 Vorlage existiert nicht
Icon Solid Transparent White Qiyu
Vertrieb kontaktieren