Académique Documents
Professionnel Documents
Culture Documents
Table of Contents
1. Overview ..............................................................................................................................2
2. Technology...........................................................................................................................2
3. Functional Overview ..........................................................................................................2
3.1 All Operations ...............................................................................................................2
3.2 Operation Specifications .............................................................................................4
3.2.1 GeLatest10Accounts ..........................................................................................4
3.2.2 GeAccountsByPaging ........................................................................................5
3.2.3 GetAccountById ..................................................................................................6
3.2.4 CreateAccount .....................................................................................................7
3.2.5 UpdateAccount ...................................................................................................8
3.2.6 DeleteAccount .....................................................................................................9
3.2.7 GetLatest10CaseOrders..................................................................................10
3.2.8 GeCaseOrdersByPaging ..................................................................................11
3.2.9 GeCaseOrderById .............................................................................................12
3.2.10 CreateCaseOrder............................................................................................13
3.2.11 UpdateCaseOrder ..........................................................................................14
3.2.12 DeleteCaseOrder ............................................................................................15
3.2.13 GetLatest10CaseInvoices ............................................................................16
3.2.14 GeCaseInvoicesByPaging .............................................................................16
3.2.16 CreateCaseInvoice .........................................................................................19
3.2.17 UpdateCaseInvoice ........................................................................................21
3.2.18 DeleteCaseInvoice .........................................................................................23
3.2.19 GetLatest10CaseInvoiceItems....................................................................24
3.2.20 GeCaseInvoiceItemsByPaging ....................................................................25
3.2.21 GetCaseInvoiceItemById ............................................................................26
3.2.22 CreateCaseInvoiceItem ................................................................................27
3.2.23 UpdateCaseInvoiceItem ...............................................................................28
3.2.24 DeleteCaseInvoiceItem ................................................................................29
3.2.25 GetLatest10CaseIssues.................................................................................30
3.2.26 GeCaseIssuesByPaging .................................................................................31
3.2.27 GetCaseIssueById .........................................................................................32
3.2.28 CreateCaseIssue .............................................................................................33
3.2.29 UpdateCaseIssue ............................................................................................34
3.2.30 DeleteCaseIssue .............................................................................................35
3.2.31 GetLatest10RMAs ..........................................................................................36
3.2.32 GetRMAsByPaging .........................................................................................37
3.2.33 GetRMAById ...................................................................................................38
3.2.34 CreateRMA .......................................................................................................39
Page 1
1. Overview
This document describes the BYF Dental API. The API is designed to allow external
applications to interface with the BYF Dental MS Dynamic CRM system. Client
Applications can request for any operation defined in the API service.
Service Url: http://<APIUrl>/api
2. Technology
The API is implemented as a Secure Web API Service. It will be accessible via the
Internet over HTTP or HTTPS/SSL only.
Security API user's are validated using their assigned username and password.
3. Functional Overview
3.1 All Operations
The API supports the following distinct data records for consumption:
Name
GetLatest10Accounts
GetAccountsByPaging
GetAccountById
CreateAccount
UpdateAccount
DeleteAccount
GetLatest10CaseOrders
GetCaseOrdersByPaging
GetCaseOrderById
CreateCaseOrder
UpdateCaseOrder
DeleteCaseOrder
GetLatest10CaseInvoices
GetCaseInvoicesByPaging
GetCaseInvoiceById
CreateCaseInvoice
UpdateCaseInvoice
DeleteCaseInvoice
Description
Returns a list of account records
Returns a list of account records
Returns an account record
Create a new account record
Update an account record
Delete an account record
Returns a list of case orders
Returns a list of case order records
Returns a case order record
Create a new case order record
Update a case order record
Delete a case order record
Returns a list of case invoices
Returns a list of case invoice records
Returns a case invoice record
Create a new case invoice record
Update a case invoice record
Delete a case invoice record
Page 2
GetLatest10CaseInvoiceItems
GetCaseInvoiceItemsByPaging
GetCaseInvoiceItemById
CreateCaseInvoiceItem
UpdateCaseInvoiceItem
DeleteCaseInvoiceItem
GetLatest10CaseIssues
GetCaseIssuesByPaging
GetCaseIssueById
CreateCaseIssue
UpdateCaseIssue
DeleteCaseIssue
GetLatest10RMAs
GetRMAsByPaging
GetRMAById
CreateRMA
UpdateRMA
DeleteRMA
Page 3
Type
string
string
Description
Api username
Password
Response:
A list of dynamics crm account records in json format.
[{"Id":"023edab2-0558-e511-80e4-3863bb3c1190","Name":"Le, Katrina,
DDS","CompanyName":null,"Telephone1":"(650) 9691774","Fax":null,"EmailAddress1":"t.le.dds@gmail.com","PrimaryContact":null,"Address1_Lin
e1":"777 Coesta Dr. #130","Address1_City":"Mountain
View","Address1_StateOrProvince":"CA","Address1_PostalCode":"94040","createdon":
"9/10/2015 12:53:39 AM","modifiedon": "10/23/2015 8:37:55 PM"},{"Id":"b711f51f-4957-e51180e4-3863bb3c1190","Name":"Marina Park Dental","CompanyName":"Marina Park
Dental","Telephone1":"(415) 5631600","Fax":null,"EmailAddress1":"sf@marinaparkdental.com","PrimaryContact":null,"Address
1_Line1":"2001 Union St. #385","Address1_City":"San
Francisco","Address1_StateOrProvince":"CA","Address1_PostalCode":"94123","createdon":
"9/10/2015 12:53:39 AM","modifiedon": "10/23/2015 8:37:55 PM"}]
Page 4
3.2.2 GeAccountsByPaging
Description:
This will return a list of Dynamics CRM account records based on page size, page
number and sort expression.
Request Url:
http://52.89.207.54/api/accounts/1/10/createdon
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
PageNumber
PageSize
SortBy
Type
string
string
int
int
string
Description
Api username
Password
Page number.
Page size
Sort by param
Response:
A list of dynamics crm account records in json format.
[{"Id":"023edab2-0558-e511-80e4-3863bb3c1190","Name":"Le, Katrina,
DDS","CompanyName":null,"Telephone1":"(650) 9691774","Fax":null,"EmailAddress1":"t.le.dds@gmail.com","PrimaryContact":null,"Address1_Lin
e1":"777 Coesta Dr. #130","Address1_City":"Mountain
View","Address1_StateOrProvince":"CA","Address1_PostalCode":"94040","createdon":
"9/10/2015 12:53:39 AM","modifiedon": "10/23/2015 8:37:55 PM"},{"Id":"b711f51f-4957-e51180e4-3863bb3c1190","Name":"Marina Park Dental","CompanyName":"Marina Park
Dental","Telephone1":"(415) 5631600","Fax":null,"EmailAddress1":"sf@marinaparkdental.com","PrimaryContact":null,"Address
1_Line1":"2001 Union St. #385","Address1_City":"San
Francisco","Address1_StateOrProvince":"CA","Address1_PostalCode":"94123","createdon":
"9/10/2015 12:53:39 AM","modifiedon": "10/23/2015 8:37:55 PM"}]
Page 5
3.2.3 GetAccountById
Description:
This will return a Dynamics CRM account record.
Request Url:
http://52.89.207.54/api/accounts/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Type
string
string
string
Description
Api username
Password
AccountId (Guid)
Response:
A dynamics crm account record in json format.
{"Id":"023edab2-0558-e511-80e4-3863bb3c1190","Name":"Le, Katrina,
DDS","CompanyName":null,"Telephone1":"(650) 9691774","Fax":null,"EmailAddress1":"t.le.dds@gmail.com","PrimaryContact":null,"Address1_Lin
e1":"777 Coesta Dr. #130","Address1_City":"Mountain
View","Address1_StateOrProvince":"CA","Address1_PostalCode":"94040","createdon":
"9/10/2015 12:53:39 AM","modifiedon": "10/23/2015 8:37:55 PM"}
Page 6
3.2.4 CreateAccount
Description:
This will create a new account record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/accounts
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Account
Type
string
string
object
Description
Api username
Password
An account object
Response:
A dynamics crm account record in json format.
{"Name":"Le, Katrina, DDS","CompanyName":null,"Telephone1":"(650) 9691774","Fax":null,"EmailAddress1":"t.le.dds@gmail.com","PrimaryContact":"94040","Address1_
Line1":"777 Coesta Dr. #130","Address1_City":"Mountain
View","Address1_StateOrProvince":null,"Address1_PostalCode":null}
Page 7
3.2.5 UpdateAccount
Description:
This will update an account record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/accounts/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Account
Type
string
string
string
object
Description
Api username
Password
AccountId (guid)
An account object
Response:
A dynamics crm account record in json format.
{"Name":"Le, Katrina, DDS","CompanyName":null,"Telephone1":"(650) 9691774","Fax":null,"EmailAddress1":"t.le.dds@gmail.com","PrimaryContact":"94040","Address1_
Line1":"777 Coesta Dr. #130","Address1_City":"Mountain
View","Address1_StateOrProvince":null,"Address1_PostalCode":null}
Page 8
3.2.6 DeleteAccount
Description:
This will update an account record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/accounts/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Type
string
string
string
Description
Api username
Password
AccountId (guid)
Response:
HTTP response
Javascript Code Sample:
The following Javascript code shows how to call DeleteAccount:
function DeleteAccount() {
var id = $('#txtId').val()
if (id != '') {
$.ajax({
url: 'http://52.89.207.54/api/accounts/' + id,
type: 'DELETE',
contentType: "application/json;charset=utf-8",
beforeSend: function (xhr) {
xhr.setRequestHeader('X-ApiUsername', 'byfdeveloper');
xhr.setRequestHeader('x-ApiPassword', 'ByFD3v3l0per$2015');
},
success: function (data) {
WriteResponse(data);
},
error: function (x, y, z) {
alert(x + '\n' + y + '\n' + z);
}
});
}
else {
alert("Id is missing.");
}
}
Page 9
3.2.7 GetLatest10CaseOrders
Description:
This will return a list of all Dynamics CRM case order records.
Request Url:
http://52.89.207.54/api/caseorders
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Type
string
string
Description
Api username
Password
Response:
A list of dynamics crm case order records in json format.
[{"Id":"2b27e539-ee58-e511-80e43863bb3c1190","Name":null,"byf_caseorder":null,"byf_customer":{"Id":"4fc89135-a025-e51180fe-fc15b4283a2c","Name":"Patel, Neilesh, DDS" },
"ark_drinitials":null,"ark_listedduedate":"9/25/2015 7:00:00
AM","ark_prosthodontics":null,"byf_patientfullname":"Cynthia
Carter","ark_age":null,"ark_abutment":null,"byf_redo":"No","ark_turn_around_time":
null,"byf_entryon": "10/22/2015 7:00:00 AM", "byf_name": "X00000010","byf_casestatus":
"Action Required","byf_teethnumber": "U","byf_shade_list": "A1","createdon": "10/28/2015
10:10:31 AM","modifiedon": "10/28/2015 10:10:41 AM"},{"Id":"12dcd70f-ee58-e511-80e43863bb3c1190","Name":null,"byf_caseorder":null,"byf_customer":{"Id":"4fc89135-a025-e51180fe-fc15b4283a2c","Name":"Patel, Neilesh,
DDS"},"ark_drinitials":null,"ark_listedduedate":"9/25/2015 7:00:00
AM","ark_prosthodontics":null,"byf_patientfullname":"Cynthia
Carter","ark_age":null,"ark_abutment":null,"byf_redo":"No"ark_turn_around_time": null,
"byf_entryon": "10/22/2015 7:00:00 AM","byf_name": "X00000010","byf_casestatus": "Action
Required","byf_teethnumber": "U","byf_shade_list": "A1","createdon": "10/28/2015 10:10:31
AM","modifiedon": "10/28/2015 10:10:41 AM"}]
Page 10
3.2.8 GeCaseOrdersByPaging
Description:
This will return a list of Dynamics CRM case order records based on page size, page
number and sort expression.
Request Url:
http://52.89.207.54/api/caseorders/pageNumber/pageSize/sortBy
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
PageNumber
PageSize
SortBy
Type
string
string
int
int
string
Description
Api username
Password
Page number.
Page size
Sort by param
Response:
A list of dynamics crm case order records in json format.
[{"Id":"2b27e539-ee58-e511-80e43863bb3c1190","Name":null,"byf_caseorder":null,"byf_customer":{"Id":"4fc89135-a025-e51180fe-fc15b4283a2c","Name":"Patel, Neilesh, DDS" },
"ark_drinitials":null,"ark_listedduedate":"9/25/2015 7:00:00
AM","ark_prosthodontics":null,"byf_patientfullname":"Cynthia
Carter","ark_age":null,"ark_abutment":null,"byf_redo":"No","ark_turn_around_time":
null,"byf_entryon": "10/22/2015 7:00:00 AM", "byf_name": "X00000010","byf_casestatus":
"Action Required","byf_teethnumber": "U","byf_shade_list": "A1","createdon": "10/28/2015
10:10:31 AM","modifiedon": "10/28/2015 10:10:41 AM"},{"Id":"12dcd70f-ee58-e511-80e43863bb3c1190","Name":null,"byf_caseorder":null,"byf_customer":{"Id":"4fc89135-a025-e51180fe-fc15b4283a2c","Name":"Patel, Neilesh,
DDS"},"ark_drinitials":null,"ark_listedduedate":"9/25/2015 7:00:00
AM","ark_prosthodontics":null,"byf_patientfullname":"Cynthia
Carter","ark_age":null,"ark_abutment":null,"byf_redo":"No"ark_turn_around_time": null,
"byf_entryon": "10/22/2015 7:00:00 AM","byf_name": "X00000010","byf_casestatus": "Action
Required","byf_teethnumber": "U","byf_shade_list": "A1","createdon": "10/28/2015 10:10:31
AM","modifiedon": "10/28/2015 10:10:41 AM"}]
Page 11
3.2.9 GeCaseOrderById
Description:
This will return a Dynamics CRM case order record.
Request Url:
http://52.89.207.54/api/caseorders/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Type
string
string
string
Description
Api username
Password
Case order id (Guid)
Response:
A dynamics crm case order record in json format.
{"Id":"12dcd70f-ee58-e511-80e43863bb3c1190","Name":null,"byf_caseorder":null,"byf_customer":{"Id":"4fc89135-a025-e51180fe-fc15b4283a2c","Name":"Patel, Neilesh,
DDS"},"ark_drinitials":null,"ark_listedduedate":"9/25/2015 7:00:00
AM","ark_prosthodontics":null,"byf_patientfullname":"Cynthia
Carter","ark_age":null,"ark_abutment":null,"byf_redo":"No"ark_turn_around_time": null,
"byf_entryon": "10/22/2015 7:00:00 AM","byf_name": "X00000010","byf_casestatus": "Action
Required","byf_teethnumber": "U","byf_shade_list": "A1","createdon": "10/28/2015 10:10:31
AM","modifiedon": "10/28/2015 10:10:41 AM"}
Page 12
3.2.10 CreateCaseOrder
Description:
This will create a new case order record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseorders
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
CaseOrder
Type
string
string
object
Description
Api username
Password
An case order object
Response:
A dynamics crm case order record in json format.
{"Name":null,"byf_caseorder":null,"byf_customer":{"Id":"4fc89135-a025-e511-80fefc15b4283a2c","Name":"Patel, Neilesh,
DDS"},"ark_drinitials":null,"ark_listedduedate":"9/25/2015 7:00:00
AM","ark_prosthodontics":null,"byf_patientfullname":"Cynthia
Carter","ark_age":null,"ark_abutment":null,"byf_redo":"No"ark_turn_around_time": null,
"byf_entryon": "10/22/2015 7:00:00 AM","byf_name": "X00000010","byf_casestatus": "Action
Required","byf_teethnumber": "U","byf_shade_list": "A1"}
Page 13
3.2.11 UpdateCaseOrder
Description:
This will update a case order record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseorders/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
CaseOrder
Type
string
string
string
object
Description
Api username
Password
Case order id (guid)
An case order object
Response:
A dynamics crm case order record in json format.
{"Name":null,"byf_caseorder":null,"byf_customer":{"Id":"4fc89135-a025-e511-80fefc15b4283a2c","Name":"Patel, Neilesh,
DDS"},"ark_drinitials":null,"ark_listedduedate":"9/25/2015 7:00:00
AM","ark_prosthodontics":null,"byf_patientfullname":"Cynthia
Carter","ark_age":null,"ark_abutment":null,"byf_redo":"No"ark_turn_around_time": null,
"byf_entryon": "10/22/2015 7:00:00 AM","byf_name": "X00000010","byf_casestatus": "Action
Required","byf_teethnumber": "U","byf_shade_list": "A1"}
Page 14
3.2.12 DeleteCaseOrder
Description:
This will delete a case order record from Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseorders/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Type
string
string
string
Description
Api username
Password
Case order id (guid)
Response:
HTTP response
Javascript Code Sample:
The following Javascript code shows how to call DeleteCaseOrder:
function DeleteCaseOrder() {
var id = $('#txtId').val()
if (id != '') {
$.ajax({
url: 'http://52.89.207.54/api/caseorders/' + id,
type: 'DELETE',
contentType: "application/json;charset=utf-8",
beforeSend: function (xhr) {
xhr.setRequestHeader('X-ApiUsername', 'byfdeveloper');
xhr.setRequestHeader('x-ApiPassword', 'ByFD3v3l0per$2015');
},
success: function (data) {
WriteResponse(data);
},
error: function (x, y, z) {
alert(x + '\n' + y + '\n' + z);
}
});
}
else {
alert("Id is missing.");
}
}
Page 15
3.2.13 GetLatest10CaseInvoices
Description:
This will return a list of Dynamic CRM case invoice records.
Request Url:
http://52.89.207.54/api/caseinvoices
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Type
string
string
Description
Api username
Password
Response:
A list of dynamics crm case invoice records in json format.
[{"byf_caseinvoiceid":"5ec4f6b7-0658-e511-80e73863bb3610e8","byf_customer":{"Id":"bf0f911d-227e-e311-bb6d6c3be5a881a4","Name":"Timbers, Cory,
DDS"},"byf_name":"014255R","byf_invoicedate":"9/11/2015 7:00:00
AM","byf_caseorder":{"Id":"54afbcbf-6953-e511-80e03863bb347ba8","Name":null,"byf_caseorder":"B00010565","byf_customer":null,"ark_drinitials
":null,"ark_listedduedate":null,"ark_prosthodontics":null,"byf_patientfullname":null,"ark
_age":null,"ark_abutment":null,"byf_redo":null},"byf_patientfullname":"Gicela
Hernandez","byf_teethnumber":"30","byf_shadelist":"A1","ark_drname1":{"Id":"03202778137e-e311-bb6d-6c3be5a881a4","Name":"Cory Timbers, DDS,"firstname": "Cory","lastname":
"Timbers, DDS","middlename":null}, "byf_totalamount":0.0000, "ark_taxable_total":0.0000,
"byf_salestaxamount":0.0000,"byf_total_discount_amount":0.0000,"byf_finalamount":0.0000}
,{"byf_caseinvoiceid":"5115580f-d96e-e511-80ec-3863bb3610e8",
"byf_customer":{"Id":"7bd2bdeb-3469-e511-80e5-3863bb347ba8","Name":"DEV TEST"},
"byf_name":null,"byf_invoicedate":null,"byf_caseorder":null,"byf_patientfullname":null,"b
yf_teethnumber":null,"byf_shadelist":null,"ark_drname1":null,"byf_totalamount":100.0000,"
ark_taxable_total":13.0000,"byf_salestaxamount":0.0000,"byf_total_discount_amount":10.000
0,"byf_finalamount":100.0000}]
Page 16
This will return a list of Dynamics CRM case invoice records based on page size,
page number and sort expression.
Request Url:
http://52.89.207.54/api/caseinvoices/pageNumber/pageSize/sortBy
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
PageNumber
PageSize
SortBy
Type
string
string
int
int
string
Description
Api username
Password
Page number.
Page size
Sort by param
Response:
A list of dynamics crm case invoice records in json format.
[{"byf_caseinvoiceid":"5ec4f6b7-0658-e511-80e73863bb3610e8","byf_customer":{"Id":"bf0f911d-227e-e311-bb6d6c3be5a881a4","Name":"Timbers, Cory,
DDS"},"byf_name":"014255R","byf_invoicedate":"9/11/2015 7:00:00
AM","byf_caseorder":{"Id":"54afbcbf-6953-e511-80e03863bb347ba8","Name":null,"byf_caseorder":"B00010565","byf_customer":null,"ark_drinitials
":null,"ark_listedduedate":null,"ark_prosthodontics":null,"byf_patientfullname":null,"ark
_age":null,"ark_abutment":null,"byf_redo":null},"byf_patientfullname":"Gicela
Hernandez","byf_teethnumber":"30","byf_shadelist":"A1","ark_drname1":{"Id":"03202778137e-e311-bb6d-6c3be5a881a4","Name":"Cory Timbers, DDS,"firstname": "Cory","lastname":
"Timbers, DDS","middlename":null}, "byf_totalamount":0.0000, "ark_taxable_total":0.0000,
"byf_salestaxamount":0.0000,"byf_total_discount_amount":0.0000,"byf_finalamount":0.0000}
,{"byf_caseinvoiceid":"5115580f-d96e-e511-80ec-3863bb3610e8",
"byf_customer":{"Id":"7bd2bdeb-3469-e511-80e5-3863bb347ba8","Name":"DEV TEST"},
"byf_name":null,"byf_invoicedate":null,"byf_caseorder":null,"byf_patientfullname":null,"b
yf_teethnumber":null,"byf_shadelist":null,"ark_drname1":null,"byf_totalamount":100.0000,"
ark_taxable_total":13.0000,"byf_salestaxamount":0.0000,"byf_total_discount_amount":10.000
0,"byf_finalamount":100.0000}]
Page 17
Type
string
string
string
Description
Api username
Password
Case invoice id (Guid)
Response:
A dynamic crm case invoice record in json format.
{"byf_caseinvoiceid":"5ec4f6b7-0658-e511-80e73863bb3610e8","byf_customer":{"Id":"bf0f911d-227e-e311-bb6d6c3be5a881a4","Name":"Timbers, Cory,
DDS"},"byf_name":"014255R","byf_invoicedate":"9/11/2015 7:00:00
AM","byf_caseorder":{"Id":"54afbcbf-6953-e511-80e03863bb347ba8","Name":null,"byf_caseorder":"B00010565","byf_customer":null,"ark_drinitials
":null,"ark_listedduedate":null,"ark_prosthodontics":null,"byf_patientfullname":null,"ark
_age":null,"ark_abutment":null,"byf_redo":null},"byf_patientfullname":"Gicela
Hernandez","byf_teethnumber":"30","byf_shadelist":"A1","ark_drname1":{"Id":"03202778137e-e311-bb6d-6c3be5a881a4","Name":"Cory Timbers, DDS,"firstname": "Cory","lastname":
"Timbers, DDS","middlename":null}, "byf_totalamount":0.0000, "ark_taxable_total":0.0000,
"byf_salestaxamount":0.0000,"byf_total_discount_amount":0.0000,"byf_finalamount":0.0000}
Page 18
3.2.16 CreateCaseInvoice
Description:
This will create a new case invoice record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseinvoices
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
CaseInvoice
Type
string
string
object
Description
Api username
Password
An case invoice object
Response:
A dynamics crm case invoice record in json format.
{"byf_customer":{"Id":"bf0f911d-227e-e311-bb6d-6c3be5a881a4","Name":"Timbers, Cory,
DDS","CompanyName":null,"Telephone1":null,"Fax":null,"EmailAddress1":null,"PrimaryContact
":null,"Address1_Line1":null,"Address1_City":null,"Address1_StateOrProvince":null,"Addres
s1_PostalCode":null},"byf_name":"014255R","byf_invoicedate":"9/11/2015 7:00:00
AM","byf_caseorder":{"Id":"54afbcbf-6953-e511-80e03863bb347ba8","Name":null,"byf_caseorder":"B00010565","byf_customer":null,"ark_drinitials
":null,"ark_listedduedate":null,"ark_prosthodontics":null,"byf_patientfullname":null,"ark
_age":null,"ark_abutment":null,"byf_redo":null},"byf_patientfullname":"Gicela
Hernandez","byf_teethnumber":"30","byf_shadelist":"A1","ark_drname1":{"Id":"03202778137e-e311-bb6d-6c3be5a881a4","Name":"Cory Timbers,
DDS"},"byf_totalamount":0.0000,"ark_taxable_total":0.0000,"byf_salestaxamount":0.0000,"by
f_total_discount_amount":0.0000,"byf_finalamount":0.0000}
Page 19
Page 20
3.2.17 UpdateCaseInvoice
Description:
This will update an case invoice record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseinvoices/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
CaseInvoice
Type
string
string
string
object
Description
Api username
Password
Case Invoice id (guid)
A case invoice object
Response:
A dynamics crm account record in json format.
{"byf_customer":{"Id":"bf0f911d-227e-e311-bb6d-6c3be5a881a4","Name":"Timbers, Cory,
DDS","CompanyName":null,"Telephone1":null,"Fax":null,"EmailAddress1":null,"PrimaryContact
":null,"Address1_Line1":null,"Address1_City":null,"Address1_StateOrProvince":null,"Addres
s1_PostalCode":null},"byf_name":"014255R","byf_invoicedate":"9/11/2015 7:00:00
AM","byf_caseorder":{"Id":"54afbcbf-6953-e511-80e03863bb347ba8","Name":null,"byf_caseorder":"B00010565","byf_customer":null,"ark_drinitials
":null,"ark_listedduedate":null,"ark_prosthodontics":null,"byf_patientfullname":null,"ark
_age":null,"ark_abutment":null,"byf_redo":null},"byf_patientfullname":"Gicela
Hernandez","byf_teethnumber":"30","byf_shadelist":"A1","ark_drname1":{"Id":"03202778137e-e311-bb6d-6c3be5a881a4","Name":"Cory Timbers,
DDS"},"byf_totalamount":0.0000,"ark_taxable_total":0.0000,"byf_salestaxamount":0.0000,"by
f_total_discount_amount":0.0000,"byf_finalamount":0.0000}
Page 21
Page 22
3.2.18 DeleteCaseInvoice
Description:
This will delete a case invoice record from Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseinvoices/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Type
string
string
string
Description
Api username
Password
Case invoice id (guid)
Response:
HTTP response
Javascript Code Sample:
The following Javascript code shows how to call DeleteCaseInvoice:
function DeleteCaseInvoice() {
var id = $('#txtId').val()
if (id != '') {
$.ajax({
url: 'http://52.89.207.54/api/caseinvoices/' + id,
type: 'DELETE',
contentType: "application/json;charset=utf-8",
beforeSend: function (xhr) {
xhr.setRequestHeader('X-ApiUsername', 'byfdeveloper');
xhr.setRequestHeader('x-ApiPassword', 'ByFD3v3l0per$2015');
},
success: function (data) {
WriteResponse(data);
},
error: function (x, y, z) {
alert(x + '\n' + y + '\n' + z);
}
});
}
else {
alert("Id is missing.");
}
}
Page 23
3.2.19 GetLatest10CaseInvoiceItems
Description:
This will return a list of all Dynamics CRM case invoice item records.
Request Url:
http://52.89.207.54/api/caseinvoiceitems
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Type
string
string
Description
Api username
Password
Response:
A list of dynamics crm case invoice item records in json format.
[{"byf_caseinvoiceitemid":"f19bf8bd-0658-e511-80e73863bb3610e8","byf_product":{"Id":"de7a5222-db77-e311-bb6d6c3be5a881a4","Name":"FEX020"},"byf_quantity":1.0000000000,"byf_amount":0.0000,"byf_exten
dedamount":0.0000,"byf_caseinvoice":{"byf_caseinvoiceid":"5ec4f6b7-0658-e511-80e73863bb3610e8","byf_customer":null,"byf_name":"014255R","byf_invoicedate":null,"byf_caseor
der":null,"byf_patientfullname":null,"byf_teethnumber":null,"byf_shadelist":null,"ark_drn
ame1":null,"byf_totalamount":0.0,"ark_taxable_total":0.0,"byf_salestaxamount":0.0,"byf_to
tal_discount_amount":0.0,"byf_finalamount":0.0}},{"byf_caseinvoiceitemid":"ea9bf8bd-0658e511-80e7-3863bb3610e8","byf_product":{"Id":"5d40344e-b50b-e411-88266c3be5a8362c","Name":"MTL210"},"byf_quantity":1.0000000000,"byf_amount":0.0000,"byf_exten
dedamount":0.0000,"byf_caseinvoice":{"byf_caseinvoiceid":"5ec4f6b7-0658-e511-80e73863bb3610e8","byf_customer":null,"byf_name":"014255R","byf_invoicedate":null,"byf_caseor
der":null,"byf_patientfullname":null,"byf_teethnumber":null,"byf_shadelist":null,"ark_drn
ame1":null,"byf_totalamount":0.0,"ark_taxable_total":0.0,"byf_salestaxamount":0.0,"byf_to
tal_discount_amount":0.0,"byf_finalamount":0.0}}]
Page 24
3.2.20 GeCaseInvoiceItemsByPaging
Description:
This will return a list of Dynamics CRM case invoice item records based on page
size, page number and sort expression.
Request Url:
http://52.89.207.54/api/caseinvoiceitems/pageNumber/pageSize/sortBy
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
PageNumber
PageSize
SortBy
Type
string
string
int
int
string
Description
Api username
Password
Page number.
Page size
Sort by param
Response:
A list of dynamics crm case invoice item records in json format.
[{"byf_caseinvoiceitemid":"f19bf8bd-0658-e511-80e73863bb3610e8","byf_product":{"Id":"de7a5222-db77-e311-bb6d6c3be5a881a4","Name":"FEX020"},"byf_quantity":1.0000000000,"byf_amount":0.0000,"byf_exten
dedamount":0.0000,"byf_caseinvoice":{"byf_caseinvoiceid":"5ec4f6b7-0658-e511-80e73863bb3610e8","byf_customer":null,"byf_name":"014255R","byf_invoicedate":null,"byf_caseor
der":null,"byf_patientfullname":null,"byf_teethnumber":null,"byf_shadelist":null,"ark_drn
ame1":null,"byf_totalamount":0.0,"ark_taxable_total":0.0,"byf_salestaxamount":0.0,"byf_to
tal_discount_amount":0.0,"byf_finalamount":0.0}},{"byf_caseinvoiceitemid":"ea9bf8bd-0658e511-80e7-3863bb3610e8","byf_product":{"Id":"5d40344e-b50b-e411-88266c3be5a8362c","Name":"MTL210"},"byf_quantity":1.0000000000,"byf_amount":0.0000,"byf_exten
dedamount":0.0000,"byf_caseinvoice":{"byf_caseinvoiceid":"5ec4f6b7-0658-e511-80e73863bb3610e8","byf_customer":null,"byf_name":"014255R","byf_invoicedate":null,"byf_caseor
der":null,"byf_patientfullname":null,"byf_teethnumber":null,"byf_shadelist":null,"ark_drn
ame1":null,"byf_totalamount":0.0,"ark_taxable_total":0.0,"byf_salestaxamount":0.0,"byf_to
tal_discount_amount":0.0,"byf_finalamount":0.0}}]
Page 25
3.2.21 GetCaseInvoiceItemById
Description:
This will return a Dynamics CRM case invoice item record.
Request Url:
http://52.89.207.54/api/caseinvoiceitems/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Type
string
string
string
Description
Api username
Password
Case invoice item id (Guid)
Response:
A dynamic crm case invoice item record in json format.
{"byf_caseinvoiceitemid":"f19bf8bd-0658-e511-80e73863bb3610e8","byf_product":{"Id":"de7a5222-db77-e311-bb6d6c3be5a881a4","Name":"FEX020"},"byf_quantity":1.0000000000,"byf_amount":0.0000,"byf_exten
dedamount":0.0000,"byf_caseinvoice":{"byf_caseinvoiceid":"5ec4f6b7-0658-e511-80e73863bb3610e8","byf_customer":null,"byf_name":"014255R","byf_invoicedate":null,"byf_caseor
der":null,"byf_patientfullname":null,"byf_teethnumber":null,"byf_shadelist":null,"ark_drn
ame1":null,"byf_totalamount":0.0,"ark_taxable_total":0.0,"byf_salestaxamount":0.0,"byf_to
tal_discount_amount":0.0,"byf_finalamount":0.0}}
Page 26
3.2.22 CreateCaseInvoiceItem
Description:
This will create a new case invoice item record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseinvoiceitems
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
CaseInvoiceItem
Type
string
string
object
Description
Api username
Password
A case invoice item
Response:
A dynamics crm case invoice item record in json format.
{"byf_product":{"Id":"de7a5222-db77-e311-bb6d6c3be5a881a4","Name":"FEX020"},"byf_quantity":1.0000000000,"byf_amount":0.0000,"byf_exten
dedamount":0.0000,"byf_caseinvoice":{"byf_caseinvoiceid":"5ec4f6b7-0658-e511-80e73863bb3610e8","byf_customer":null,"byf_name":"014255R","byf_invoicedate":null,"byf_caseor
der":null,"byf_patientfullname":null,"byf_teethnumber":null,"byf_shadelist":null,"ark_drn
ame1":null,"byf_totalamount":0.0,"ark_taxable_total":0.0,"byf_salestaxamount":0.0,"byf_to
tal_discount_amount":0.0,"byf_finalamount":0.0}}
Page 27
3.2.23 UpdateCaseInvoiceItem
Description:
This will update a case invoice item record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseinvoiceitems/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
CaseInvoiceItem
Type
string
string
GUID
object
Description
Api username
Password
Case invoice item id
A case invoice item
Response:
A dynamics crm case invoice item record in json format.
{"byf_product":{"Id":"de7a5222-db77-e311-bb6d6c3be5a881a4","Name":"FEX020"},"byf_quantity":1.0000000000,"byf_amount":0.0000,"byf_exten
dedamount":0.0000,"byf_caseinvoice":{"byf_caseinvoiceid":"5ec4f6b7-0658-e511-80e73863bb3610e8","byf_customer":null,"byf_name":"014255R","byf_invoicedate":null,"byf_caseor
der":null,"byf_patientfullname":null,"byf_teethnumber":null,"byf_shadelist":null,"ark_drn
ame1":null,"byf_totalamount":0.0,"ark_taxable_total":0.0,"byf_salestaxamount":0.0,"byf_to
tal_discount_amount":0.0,"byf_finalamount":0.0}}
Page 28
3.2.24 DeleteCaseInvoiceItem
Description:
This will delete a case invoice item record from Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseinvoiceitems/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Type
string
string
string
Description
Api username
Password
Case invoice item id (guid)
Response:
HTTP response
Javascript Code Sample:
The following Javascript code shows how to call DeleteCaseInvoiceItem:
function DeleteCaseInvoiceItem() {
var id = $('#txtId').val()
if (id != '') {
$.ajax({
url: 'http://52.89.207.54/api/caseinvoiceitems/' + id,
type: 'DELETE',
contentType: "application/json;charset=utf-8",
beforeSend: function (xhr) {
xhr.setRequestHeader('X-ApiUsername', 'byfdeveloper');
xhr.setRequestHeader('x-ApiPassword', 'ByFD3v3l0per$2015');
},
success: function (data) {
WriteResponse(data);
},
error: function (x, y, z) {
alert(x + '\n' + y + '\n' + z);
}
});
}
else {
alert("Id is missing.");
}
}
Page 29
3.2.25 GetLatest10CaseIssues
Description:
This will return a list of all Dynamics CRM case issue records.
Request Url:
http://52.89.207.54/api/caseissues
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Type
string
string
Description
Api username
Password
Response:
A list of dynamics crm case issue records in json format.
[{"byf_caseissueid":"7d004470-e271-e511-80e53863bb347ba8","byf_caseorder":{"Id":"9bf3bd25-ea58-e511-80e43863bb3c1190","Name":"B00010696"},"ark_category1":{"Id":"67afcbf7-c5dc-e411-80fcc4346bacdc5c","Name":"Shipping Out Case"},"byf_customer":{"Id":"cfef87b5-e120-e511-80fefc15b4283a2c","Name":"Thanh, Kelly,
DDS"},"ark_drcost":92.4500,"byf_response_time":null,"createdon":"10/13/2015 7:41:51
PM","modifiedon":"10/13/2015 7:41:55 PM"},{"byf_caseissueid":"5c25cfc7-5261-e511-80e03863bb347ba8"," byf_caseorder":{"Id":"9bf3bd25-ea58-e511-80e43863bb3c1190","Name":"B00010696"},"ark_category1":{"Id":"67afcbf7-c5dc-e411-80fcc4346bacdc5c","Name":"Shipping Out Case"},"byf_customer":{"Id":"cfef87b5-e120-e511-80fefc15b4283a2c","Name":"Thanh, Kelly,
DDS"},"ark_drcost":92.4500,"byf_response_time":null,"createdon":"10/13/2015 7:41:51
PM","modifiedon":"10/13/2015 7:41:55 PM"}]
Page 30
3.2.26 GeCaseIssuesByPaging
Description:
This will return a list of Dynamics CRM case issue records based on page size, page
number and sort expression.
Request Url:
http://52.89.207.54/api/caseissues/pageNumber/pageSize/sortBy
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
PageNumber
PageSize
SortBy
Type
string
string
int
int
string
Description
Api username
Password
Page number.
Page size
Sort by param
Response:
A list of dynamics crm case invoice item records in json format.
[{"byf_caseissueid":"7d004470-e271-e511-80e53863bb347ba8","byf_caseorder":{"Id":"9bf3bd25-ea58-e511-80e43863bb3c1190","Name":"B00010696"},"ark_category1":{"Id":"67afcbf7-c5dc-e411-80fcc4346bacdc5c","Name":"Shipping Out Case"},"byf_customer":{"Id":"cfef87b5-e120-e511-80fefc15b4283a2c","Name":"Thanh, Kelly,
DDS"},"ark_drcost":92.4500,"byf_response_time":null,"createdon":"10/13/2015 7:41:51
PM","modifiedon":"10/13/2015 7:41:55 PM"},{"byf_caseissueid":"5c25cfc7-5261-e511-80e03863bb347ba8"," byf_caseorder":{"Id":"9bf3bd25-ea58-e511-80e43863bb3c1190","Name":"B00010696"},"ark_category1":{"Id":"67afcbf7-c5dc-e411-80fcc4346bacdc5c","Name":"Shipping Out Case"},"byf_customer":{"Id":"cfef87b5-e120-e511-80fefc15b4283a2c","Name":"Thanh, Kelly,
DDS"},"ark_drcost":92.4500,"byf_response_time":null,"createdon":"10/13/2015 7:41:51
PM","modifiedon":"10/13/2015 7:41:55 PM"}]
Page 31
3.2.27 GetCaseIssueById
Description:
This will return a Dynamics CRM case issue record.
Request Url:
http://52.89.207.54/api/caseissues/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Type
string
string
string
Description
Api username
Password
Case issue id (Guid)
Response:
A dynamic crm case issue record in json format.
{"byf_caseissueid":"7d004470-e271-e511-80e53863bb347ba8","byf_caseorder":{"Id":"9bf3bd25-ea58-e511-80e43863bb3c1190","Name":"B00010696"},"ark_category1":{"Id":"67afcbf7-c5dc-e411-80fcc4346bacdc5c","Name":"Shipping Out Case"},"byf_customer":{"Id":"cfef87b5-e120-e511-80fefc15b4283a2c","Name":"Thanh, Kelly,
DDS"},"ark_drcost":92.4500,"byf_response_time":null,"createdon":"10/13/2015 7:41:51
PM","modifiedon":"10/13/2015 7:41:55 PM"}
Page 32
3.2.28 CreateCaseIssue
Description:
This will create a new case issue record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseissues
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
CaseInvoiceItem
Type
string
string
object
Description
Api username
Password
A case issue object
Response:
A dynamics crm case issue record in json format.
{"byf_caseorder":{"Id":"9bf3bd25-ea58-e511-80e43863bb3c1190","Name":"B00010696"},"ark_category1":{"Id":"67afcbf7-c5dc-e411-80fcc4346bacdc5c","Name":"Shipping Out Case"},"byf_customer":{"Id":"cfef87b5-e120-e511-80fefc15b4283a2c","Name":"Thanh, Kelly,
DDS"},"ark_drcost":92.4500,"byf_response_time":null,"createdon":"10/13/2015 7:41:51
PM","modifiedon":"10/13/2015 7:41:55 PM"}
Page 33
3.2.29 UpdateCaseIssue
Description:
This will update a case issue record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseissues/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
CaseIssue
Type
string
string
GUID
object
Description
Api username
Password
Case issue id
A case issue object
Response:
A dynamics crm case issue record in json format.
{"byf_caseorder":{"Id":"9bf3bd25-ea58-e511-80e43863bb3c1190","Name":"B00010696"},"ark_category1":{"Id":"67afcbf7-c5dc-e411-80fcc4346bacdc5c","Name":"Shipping Out Case"},"byf_customer":{"Id":"cfef87b5-e120-e511-80fefc15b4283a2c","Name":"Thanh, Kelly,
DDS"},"ark_drcost":92.4500,"byf_response_time":null,"createdon":"10/13/2015 7:41:51
PM","modifiedon":"10/13/2015 7:41:55 PM"}
Page 34
3.2.30 DeleteCaseIssue
Description:
This will delete a case issue record from Dynamics CRM.
Request Url:
http://52.89.207.54/api/caseissues/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Type
string
string
string
Description
Api username
Password
Case issue id (guid)
Response:
HTTP response
Javascript Code Sample:
The following Javascript code shows how to call DeleteCaseIssue:
function DeleteCaseIssue() {
var id = $('#txtId').val()
if (id != '') {
$.ajax({
url: 'http://52.89.207.54/api/caseissues/' + id,
type: 'DELETE',
contentType: "application/json;charset=utf-8",
beforeSend: function (xhr) {
xhr.setRequestHeader('X-ApiUsername', 'byfdeveloper');
xhr.setRequestHeader('x-ApiPassword', 'ByFD3v3l0per$2015');
},
success: function (data) {
WriteResponse(data);
},
error: function (x, y, z) {
alert(x + '\n' + y + '\n' + z);
}
});
}
else {
alert("Id is missing.");
}
}
Page 35
3.2.31 GetLatest10RMAs
Description:
This will return a list of all Dynamics CRM RMA records.
Request Url:
http://52.89.207.54/api/rms
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Type
string
string
Description
Api username
Password
Response:
A list of dynamics crm rma records in json format.
[{"byf_rmaid": "c0f5cdf3-5757-e511-80e0-3863bb347ba8","ark_redo": 172940000,
"byf_redorepairreason": 172940052, "ark_rootcause1": {"Id": "6f810252-9cc6-e411-80e3c4346bad36a8","Name": "RRC032"},"ark_rootcausedescription1": "New bite provided",
"byf_customer":{"Id":"cfef87b5-e120-e511-80fe-fc15b4283a2c","Name":"Thanh, Kelly,
DDS"},"ark_drcost":92.4500, "byf_typeofreturn": "Repair","createdon": "9/10/2015 1:05:00
AM","modifiedon": "9/11/2015 2:41:00 PM"},{"byf_rmaid": "6bea365f-5657-e511-80e03863bb347ba8","ark_redo": 172940000,"byf_redorepairreason": 172940011,"ark_rootcause1":
{"Id": "8f810252-9cc6-e411-80e3-c4346bad36a8","Name":
"RRC048"},"ark_rootcausedescription1": "Other", "byf_customer":{"Id":"cfef87b5-e120-e51180fe-fc15b4283a2c","Name":"Thanh, Kelly, DDS"},"ark_drcost":92.4500, "byf_typeofreturn":
"Repair","createdon": "9/10/2015 12:53:39 AM","modifiedon": "10/23/2015 8:37:55 PM"}]
Page 36
3.2.32 GetRMAsByPaging
Description:
This will return a list of Dynamics CRM RMA records based on page size, page
number and sort expression.
Request Url:
http://52.89.207.54/api/rmas/pageNumber/pageSize/sortBy
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
PageNumber
PageSize
SortBy
Type
string
string
int
int
string
Description
Api username
Password
Page number.
Page size
Sort by param
Response:
A list of dynamics crm RMA records in json format.
[{"byf_rmaid": "c0f5cdf3-5757-e511-80e0-3863bb347ba8","ark_redo": 172940000,
"byf_redorepairreason": 172940052, "ark_rootcause1": {"Id": "6f810252-9cc6-e411-80e3c4346bad36a8","Name": "RRC032"},"ark_rootcausedescription1": "New bite provided",
"byf_customer":{"Id":"cfef87b5-e120-e511-80fe-fc15b4283a2c","Name":"Thanh, Kelly,
DDS"},"ark_drcost":92.4500, "byf_typeofreturn": "Repair","createdon": "9/10/2015 1:05:00
AM","modifiedon": "9/11/2015 2:41:00 PM"},{"byf_rmaid": "6bea365f-5657-e511-80e03863bb347ba8","ark_redo": 172940000,"byf_redorepairreason": 172940011,"ark_rootcause1":
{"Id": "8f810252-9cc6-e411-80e3-c4346bad36a8","Name":
"RRC048"},"ark_rootcausedescription1": "Other", "byf_customer":{"Id":"cfef87b5-e120-e51180fe-fc15b4283a2c","Name":"Thanh, Kelly, DDS"},"ark_drcost":92.4500, "byf_typeofreturn":
"Repair","createdon": "9/10/2015 12:53:39 AM","modifiedon": "10/23/2015 8:37:55 PM"}]
Page 37
3.2.33 GetRMAById
Description:
This will return a Dynamics CRM RMA record.
Request Url:
http://52.89.207.54/api/rmas/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Type
string
string
string
Description
Api username
Password
RMA id (Guid)
Response:
A dynamic CRM RMA record in json format.
{"byf_rmaid": "c0f5cdf3-5757-e511-80e0-3863bb347ba8","ark_redo": 172940000,
"byf_redorepairreason": 172940052, "ark_rootcause1": {"Id": "6f810252-9cc6-e411-80e3c4346bad36a8","Name": "RRC032"},"ark_rootcausedescription1": "New bite provided",
"byf_customer":{"Id":"cfef87b5-e120-e511-80fe-fc15b4283a2c","Name":"Thanh, Kelly,
DDS"},"ark_drcost":92.4500, "byf_typeofreturn": "Repair","createdon": "9/10/2015 1:05:00
AM","modifiedon": "9/11/2015 2:41:00 PM"}
Page 38
3.2.34 CreateRMA
Description:
This will create a new RMA record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/rmas
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
RMA
Type
string
string
object
Description
Api username
Password
A rma object
Response:
A dynamics crm rma record in json format.
{"ark_redo": 172940000, "byf_redorepairreason": 172940052, "ark_rootcause1": {"Id":
"6f810252-9cc6-e411-80e3-c4346bad36a8","Name": "RRC032"},"ark_rootcausedescription1":
"New bite provided", "byf_customer":{"Id":"cfef87b5-e120-e511-80fefc15b4283a2c","Name":"Thanh, Kelly, DDS"},"ark_drcost":92.4500, "byf_typeofreturn":
"Repair"}
Page 39
3.2.45 UpdateRMA
Description:
This will update a RMA record in Dynamics CRM.
Request Url:
http://52.89.207.54/api/rmas/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
RMA
Type
string
string
GUID
object
Description
Api username
Password
RMA id
A rma object
Response:
A dynamics crm case issue record in json format.
{"ark_redo": 172940000, "byf_redorepairreason": 172940052, "ark_rootcause1": {"Id":
"6f810252-9cc6-e411-80e3-c4346bad36a8","Name": "RRC032"},"ark_rootcausedescription1":
"New bite provided", "byf_customer":{"Id":"cfef87b5-e120-e511-80fefc15b4283a2c","Name":"Thanh, Kelly, DDS"},"ark_drcost":92.4500, "byf_typeofreturn":
"Repair"}
Page 40
3.2.36 DeleteRMA
Description:
This will delete a RMA record from Dynamics CRM.
Request Url:
http://52.89.207.54/api/rmas/id
Request Parameters:
Name
X-ApiUsername
X-ApiPassword
Id
Type
string
string
GUID
Description
Api username
Password
RMA id (guid)
Response:
HTTP response
Javascript Code Sample:
The following Javascript code shows how to call DeleteRMA:
function DeleteRMA() {
var id = $('#txtId').val()
if (id != '') {
$.ajax({
url: 'http://52.89.207.54/api/rmas/' + id,
type: 'DELETE',
contentType: "application/json;charset=utf-8",
beforeSend: function (xhr) {
xhr.setRequestHeader('X-ApiUsername', 'byfdeveloper');
xhr.setRequestHeader('x-ApiPassword', 'ByFD3v3l0per$2015');
},
success: function (data) {
WriteResponse(data);
},
error: function (x, y, z) {
alert(x + '\n' + y + '\n' + z);
}
});
}
else {
alert("Id is missing.");
}
}
Page 41
Error Message
Page 42