API Calls

Clients

Contains all the functionality you need to manage the clients in your account. From adding new clients, updating their billing settings, giving them access to their account and accessing their lists, templates and campaigns.


client.svc/create

Create a new client and return the corresponding client_id.

Request

POST https://secure.salengo.com/api/client/create

Input

  • Reference (must be unique)
  • Culture (check for language supported, ie fr, en ...)
  • Currency (check for code under Appendix)
  • SendDocByEmail
  • SendDocBySnailMail
  • Notes
  • {company}
    • CompanyName(Required if LastName is empty)
    • CompanyTradeName
    • WebSite
    • Phone
    • Mobile
    • Fax
    • VATIntra
  • {contact}
    • Principal
    • Title
    • FirstName
    • MiddleName
    • LastName(Required if CompanyName is empty)
    • Suffix
    • JobTitle
    • Email
    • IM
    • IMType
    • SkypeNB
    • Phone
    • Mobile
    • Fax
    • DueDate
    • DueDate_EndOfMonth
    • Validity
    • General_Discount
  • {address}
    • Principal
    • Name
    • TradeName
    • Address1
    • Address2
    • City
    • State
    • ZIPCode
    • Country
    • Target_Invoice
    • Target_Order

Response

Status: 200 OK "Reference: 00017"

client.svc/update

Update the details of the client with the given client_id. Any fields not referenced in the request will remain unchanged.

Request

PUT https://secure.salengo.com/api/Clients.svc/update/:id

Input

Check list under client/create .

Response

Status: 200 OK "True"

client.svc/get

Return the client details associated with the given client_id.

Request

GET https://secure.salengo.com/api/client/get/:id

Response

{ "CreateDate": "/Date(1354376880000+0100)/", "Type": 0, "isPrivate": false, "Reference": "00007", "Company": { "CompanyName": "Micrasoft Corporation", "CompanyTradeName": "", "WebSite": "", "Phone": "", "Mobile": "", "Fax": "", "VATIntra": "" }, "Contacts": [ { "Principal": true, "id": "ca1b", "Title": "Mr", "FirstName": "Bill", "MiddleName": "", "LastName": "Gates", "Suffix": "III", "JobTitle": "CEO/CCO", "Email": "fakeemail@salengo.com", "IM": "", "IMType": "", "SkypeNB": "", "Phone": "555 222 11", "Mobile": "666 777 88", "Fax": "999 00 11", "DueDate_EndOfMonth": true }, { "Principal": false, "id": "9d6e", "Title": "Mr", "FirstName": "Steve", "MiddleName": "", "LastName": "Ballmer", "Suffix": "", "JobTitle": "Comptable", "Email": "steve@salengo.com", "IM": "", "IMType": "", "SkypeNB": "", "Phone": "", "Mobile": "", "Fax": "", "DueDate": 120 } ], "Addresses": [ { "Principal": true, "id": "6a13", "Name": "Office", "TradeName": "", "Address1": "115 Microsoft Way", "Address2": "", "City": "Redmond", "State": "WA", "ZIPCode": "98052-7329", "Country": "United States", "Target_Invoice": true }, { "Principal": false, "id": "8182", "Name": "Shop", "TradeName": "", "Address1": "1 Shop av", "Address2": "", "City": "San Francisco", "State": "", "ZIPCode": "1234", "Country": "United States", "Target_Invoice": true, "Target_Order": true } ], "Culture": "fr", "Currency": "0", "SendDocByEmail": true, "Notes": "this is where Steve is too !!!" }

client.svc/delete

Delete the client with the given client_id.

Request DELETE https://secure.salengo.com/api/client/delete/:id Response Status: 200 OK "true"

client.svc/list

Returns a list of client summaries in order of descending client_id.

Note: This method uses pagination.

Request

GET https://secure.salengo.com/api/Clients.svc/list

Request with Filter

GET https://secure.salengo.com/api/Clients.svc/list?filter1=fil1&filter2=fil2...

Input Filter

  • organization
  • email
  • contact
  • created_from
  • created_to
  • folder
  • notes
  • address
  • country
  • city

Response

[ { "CreateDate": "/Date(1354376880000+0100)/", "Type": 0, "isPrivate": false, "Reference": "00007", "Company": { "CompanyName": "Micrasoft Corporation", "WebSite": "" }, "Contacts": [ { "Principal": true, "id": null, "Title": "Mr", "FirstName": "Bill", "MiddleName": "", "LastName": "Gates", "Suffix": "III", "Email": "fakeemail@salengo.com", "Phone": "555 222 11", "Mobile": "" } ], "Addresses": [], "SendDocByEmail": true, "SendDocBySnailMail": true }, { "CreateDate": "/Date(1378806728000+0200)/", "Type": 0, "isPrivate": false, "Reference": "00008", "Company": { "CompanyName": "Test", "WebSite": "" }, "Contacts": [ { "Principal": true, "id": null, "Title": "", "FirstName": "", "MiddleName": "", "LastName": "", "Suffix": "", "Email": "test@salengo.com; test2@salengo.com", "Phone": "", "Mobile": "" } ], "Addresses": [], "SendDocByEmail": true, "SendDocBySnailMail": true }, ... }