Get client emails for an order - celdotro/marketplace GitHub Wiki

About

Returns a graph with the conversations made through the email with the client

Class

celmarket\Email\EmailOrder

Method

getClientEmailsForOrder

API

  • method: email
  • action: getClientEmailsForOrder

Parameters

  • cmd = order's ID

Response

An object with the following attributes

  • (attribute) = email
    • (name) = number of order on its level (starting with 1)
    • (value) = an object with the following attributes
      • date = email send date in UNIX time format
      • subject = email's subject (beware of malicious content! the received content is left unchanged upon return)
      • body = HTML content of the message (beware of malicious content! the received content is left unchanged upon return)
      • type = email type
        • to = sent to the client
        • from = received from the client
      • in_reply_to = email's ID of which the current email is a reply
      • message_id = current email's ID
      • clientName = client's name
      • affiliateName = affiliate's name
      • references = all the messages' IDs in the series of replies
      • generated = date of list generation
      • children = emails received as a reply to the current email -> array
        • (array element) = object that describes an email (contains the attributes presented so far)
      • hasAttachments = number of attachments
      • id_email = email's ID

Example - PHP

https://github.com/celdotro/marketplace_examples/blob/master/Email/2.getClientEmailsForOrder.php

Example - JSON

{
  "request": {
   "cmd": 1 
  },
  
  "response": {
    "1" : {
      "date": "01-01-2018",
      "subject": "X",
      "body": "X",
      "type": {
        "to": "X",
        "from": "X"
      },
      "in_reply_to": "X",
      "message_id": "X",
      "clientName": "X",
      "affiliateName": "X",
      "references": "X",
      "generated": "01-01-2018",
      "children": [],
      "hasAttachments": 1,
      "id_email": 1
    }
  }
}
⚠️ **GitHub.com Fallback** ⚠️