POST api/Customers/Create

Request Information

URI Parameters

None.

Body Parameters

Customer
NameDescriptionTypeAdditional information
Id

integer

None.

Name

string

None.

FatherName

string

None.

Cnic

string

None.

Occupation

string

None.

MembershipNo

string

None.

ResAddress

string

None.

MobileNo

string

None.

PhoneNo

string

None.

OfficeNo

string

None.

OfficeAddress

string

None.

Email

string

None.

PostalAddress

string

None.

CreatedBy

integer

None.

CreatedDate

date

None.

Image

Collection of byte

None.

Owners

Collection of Owner

None.

Receipts

Collection of Receipt

None.

ImageUploaders

Collection of ImageUploader

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Name": "sample string 2",
  "FatherName": "sample string 3",
  "Cnic": "sample string 4",
  "Occupation": "sample string 5",
  "MembershipNo": "sample string 6",
  "ResAddress": "sample string 7",
  "MobileNo": "sample string 8",
  "PhoneNo": "sample string 9",
  "OfficeNo": "sample string 10",
  "OfficeAddress": "sample string 11",
  "Email": "sample string 12",
  "PostalAddress": "sample string 13",
  "CreatedBy": 14,
  "CreatedDate": "2025-10-27T15:50:29.3385234-05:00",
  "Image": "QEA=",
  "Owners": [
    {
      "$id": "2",
      "Id": 1,
      "CustId": 2,
      "StatusId": 3,
      "NomineeName": "sample string 4",
      "RelationType": 5,
      "RealtionName": "sample string 6",
      "RelationWNominee": "sample string 7",
      "NomineeAddress": "sample string 8",
      "NomineeContactNo": "sample string 9",
      "NomineeOccupation": "sample string 10",
      "NomineeCnic": "sample string 11",
      "CreatedBy": 12,
      "CreatedDate": "2025-10-27T15:50:29.3385234-05:00",
      "ScheduleBooking_Id": 1,
      "TransferCharges": 1,
      "Customer": {
        "$ref": "1"
      },
      "ScheduleBooking": {
        "$id": "3",
        "Id": 1,
        "UnitId": 2,
        "AgentName": "sample string 3",
        "AgentComission": "sample string 4",
        "PaymentType": 5,
        "TotalCost": 6,
        "CreatedBy": 7,
        "CreatedDate": "2025-10-27T15:50:29.3385234-05:00",
        "RegistrationNum": "sample string 9",
        "IsDefaulter": true,
        "IsCancelled": true,
        "Installments": [
          {
            "$id": "4",
            "Id": 1,
            "NumberOfInstallnment": 2,
            "NumberOfInstallnmentReceived": 3,
            "GapsOfMonth": 4,
            "Amount": 5,
            "Type": 6,
            "Description": "sample string 7",
            "RatePerInstallnment": 8,
            "CreatedBy": 9,
            "CreatedDate": "2025-10-27T15:50:29.3385234-05:00",
            "ScheduleBooking_Id": 1,
            "isForBlackList": true,
            "ScheduleBooking": {
              "$ref": "3"
            },
            "Receipts": [
              {
                "$id": "5",
                "Id": 1,
                "CustomerId": 2,
                "ScheduleId": 3,
                "DocCode": "sample string 4",
                "CustomDocCode": "sample string 5",
                "Amount": 6,
                "PaymentType": 7,
                "CreatedBy": "sample string 8",
                "ReceiptCreatedBy": "sample string 9",
                "Description": "sample string 10",
                "Title": "sample string 11",
                "CreatedDate": "2025-10-27T15:50:29.3385234-05:00",
                "ReceiptCreatedDate": "2025-10-27T15:50:29.3385234-05:00",
                "PaymentMethod": 1,
                "InstallmentId": 1,
                "Customer": {
                  "$ref": "1"
                },
                "Installment": {
                  "$ref": "4"
                },
                "ScheduleBooking": {
                  "$ref": "3"
                }
              },
              {
                "$ref": "5"
              }
            ]
          },
          {
            "$ref": "4"
          }
        ],
        "Owners": [
          {
            "$ref": "2"
          },
          {
            "$ref": "2"
          }
        ],
        "Receipts": [
          {
            "$ref": "5"
          },
          {
            "$ref": "5"
          }
        ],
        "Unit": {
          "$id": "6",
          "Id": 1,
          "No": "sample string 2",
          "UnitName": "sample string 3",
          "CreatedBy": 4,
          "CreatedDate": "2025-10-27T15:50:29.3385234-05:00",
          "subBlock_Id": 1,
          "IsBooked": true,
          "ScheduleBookings": [
            {
              "$ref": "3"
            },
            {
              "$ref": "3"
            }
          ],
          "subBlock": {
            "$id": "7",
            "Id": 1,
            "Name": "sample string 2",
            "Size": "sample string 3",
            "CreatedDate": "2025-10-27T15:50:29.3385234-05:00",
            "Block_Id": 1,
            "Block": {
              "$id": "8",
              "Id": 1,
              "Name": "sample string 2",
              "CreatedBy": 3,
              "CreatedDate": "2025-10-27T15:50:29.3385234-05:00",
              "Projects_Id": 1,
              "Project": {
                "$id": "9",
                "Id": 1,
                "Name": "sample string 2",
                "Description": "sample string 3",
                "CreatedBy": 4,
                "CreatedDate": "2025-10-27T15:50:29.3385234-05:00",
                "Blocks": [
                  {
                    "$ref": "8"
                  },
                  {
                    "$ref": "8"
                  }
                ]
              },
              "subBlocks": [
                {
                  "$ref": "7"
                },
                {
                  "$ref": "7"
                }
              ]
            },
            "MaintainenceCharges": [
              {
                "$id": "10",
                "Id": 1,
                "SubBlockId": 1,
                "ApplyingDate": "2025-10-27T15:50:29.3385234-05:00",
                "CreatedDate": "2025-10-27T15:50:29.3385234-05:00",
                "CreatedBy": "sample string 2",
                "Description": "sample string 3",
                "GapsOfMonth": 1,
                "Type": 1,
                "Amount": 1,
                "ExpirationDate": "2025-10-27T15:50:29.3395234-05:00",
                "subBlock": {
                  "$ref": "7"
                }
              },
              {
                "$ref": "10"
              }
            ],
            "Units": [
              {
                "$ref": "6"
              },
              {
                "$ref": "6"
              }
            ]
          }
        },
        "Payments": [
          {
            "$id": "11",
            "Id": 1,
            "VendorId": 1,
            "ScheduleId": 1,
            "DocCode": "sample string 2",
            "CustomDocCode": "sample string 3",
            "Amount": 4,
            "ExpenseCategory": "sample string 5",
            "PaymentType": "sample string 6",
            "CreatedBy": "sample string 7",
            "Description": "sample string 8",
            "Title": "sample string 9",
            "CreatedDate": "2025-10-27T15:50:29.3395234-05:00",
            "PaymentDate": "2025-10-27T15:50:29.3395234-05:00",
            "PaymentMethod": "sample string 10",
            "ScheduleBooking": {
              "$ref": "3"
            },
            "Vendor": {
              "$id": "12",
              "Id": 1,
              "Name": "sample string 2",
              "FatherName": "sample string 3",
              "Cnic": "sample string 4",
              "MobileNo": "sample string 5",
              "OfficeNo": "sample string 6",
              "Email": "sample string 7",
              "CreatedBy": 8,
              "CreatedDate": "2025-10-27T15:50:29.3395234-05:00",
              "Payments": [
                {
                  "$ref": "11"
                },
                {
                  "$ref": "11"
                }
              ]
            }
          },
          {
            "$ref": "11"
          }
        ]
      }
    },
    {
      "$ref": "2"
    }
  ],
  "Receipts": [
    {
      "$ref": "5"
    },
    {
      "$ref": "5"
    }
  ],
  "ImageUploaders": [
    {
      "$id": "13",
      "CustomerId": 1,
      "ImageId": "sample string 1",
      "Path": "sample string 2",
      "Remarks": "sample string 3",
      "ImageFormat": "sample string 4",
      "Id": 5,
      "Customer": {
        "$ref": "1"
      }
    },
    {
      "$ref": "13"
    }
  ]
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'PMS_WEBAPI_UPDATED.ImageUploader' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'PMS_WEBAPI_UPDATED.ImageUploader' contains cycles and cannot be serialized if reference tracking is disabled.

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Customer'.

Response Information

Resource Description

Customer
NameDescriptionTypeAdditional information
Id

integer

None.

Name

string

None.

FatherName

string

None.

Cnic

string

None.

Occupation

string

None.

MembershipNo

string

None.

ResAddress

string

None.

MobileNo

string

None.

PhoneNo

string

None.

OfficeNo

string

None.

OfficeAddress

string

None.

Email

string

None.

PostalAddress

string

None.

CreatedBy

integer

None.

CreatedDate

date

None.

Image

Collection of byte

None.

Owners

Collection of Owner

None.

Receipts

Collection of Receipt

None.

ImageUploaders

Collection of ImageUploader

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Name": "sample string 2",
  "FatherName": "sample string 3",
  "Cnic": "sample string 4",
  "Occupation": "sample string 5",
  "MembershipNo": "sample string 6",
  "ResAddress": "sample string 7",
  "MobileNo": "sample string 8",
  "PhoneNo": "sample string 9",
  "OfficeNo": "sample string 10",
  "OfficeAddress": "sample string 11",
  "Email": "sample string 12",
  "PostalAddress": "sample string 13",
  "CreatedBy": 14,
  "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
  "Image": "QEA=",
  "Owners": [
    {
      "$id": "2",
      "Id": 1,
      "CustId": 2,
      "StatusId": 3,
      "NomineeName": "sample string 4",
      "RelationType": 5,
      "RealtionName": "sample string 6",
      "RelationWNominee": "sample string 7",
      "NomineeAddress": "sample string 8",
      "NomineeContactNo": "sample string 9",
      "NomineeOccupation": "sample string 10",
      "NomineeCnic": "sample string 11",
      "CreatedBy": 12,
      "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
      "ScheduleBooking_Id": 1,
      "TransferCharges": 1,
      "Customer": {
        "$ref": "1"
      },
      "ScheduleBooking": {
        "$id": "3",
        "Id": 1,
        "UnitId": 2,
        "AgentName": "sample string 3",
        "AgentComission": "sample string 4",
        "PaymentType": 5,
        "TotalCost": 6,
        "CreatedBy": 7,
        "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
        "RegistrationNum": "sample string 9",
        "IsDefaulter": true,
        "IsCancelled": true,
        "Installments": [
          {
            "$id": "4",
            "Id": 1,
            "NumberOfInstallnment": 2,
            "NumberOfInstallnmentReceived": 3,
            "GapsOfMonth": 4,
            "Amount": 5,
            "Type": 6,
            "Description": "sample string 7",
            "RatePerInstallnment": 8,
            "CreatedBy": 9,
            "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
            "ScheduleBooking_Id": 1,
            "isForBlackList": true,
            "ScheduleBooking": {
              "$ref": "3"
            },
            "Receipts": [
              {
                "$id": "5",
                "Id": 1,
                "CustomerId": 2,
                "ScheduleId": 3,
                "DocCode": "sample string 4",
                "CustomDocCode": "sample string 5",
                "Amount": 6,
                "PaymentType": 7,
                "CreatedBy": "sample string 8",
                "ReceiptCreatedBy": "sample string 9",
                "Description": "sample string 10",
                "Title": "sample string 11",
                "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
                "ReceiptCreatedDate": "2025-10-27T15:50:29.3965227-05:00",
                "PaymentMethod": 1,
                "InstallmentId": 1,
                "Customer": {
                  "$ref": "1"
                },
                "Installment": {
                  "$ref": "4"
                },
                "ScheduleBooking": {
                  "$ref": "3"
                }
              },
              {
                "$ref": "5"
              }
            ]
          },
          {
            "$ref": "4"
          }
        ],
        "Owners": [
          {
            "$ref": "2"
          },
          {
            "$ref": "2"
          }
        ],
        "Receipts": [
          {
            "$ref": "5"
          },
          {
            "$ref": "5"
          }
        ],
        "Unit": {
          "$id": "6",
          "Id": 1,
          "No": "sample string 2",
          "UnitName": "sample string 3",
          "CreatedBy": 4,
          "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
          "subBlock_Id": 1,
          "IsBooked": true,
          "ScheduleBookings": [
            {
              "$ref": "3"
            },
            {
              "$ref": "3"
            }
          ],
          "subBlock": {
            "$id": "7",
            "Id": 1,
            "Name": "sample string 2",
            "Size": "sample string 3",
            "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
            "Block_Id": 1,
            "Block": {
              "$id": "8",
              "Id": 1,
              "Name": "sample string 2",
              "CreatedBy": 3,
              "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
              "Projects_Id": 1,
              "Project": {
                "$id": "9",
                "Id": 1,
                "Name": "sample string 2",
                "Description": "sample string 3",
                "CreatedBy": 4,
                "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
                "Blocks": [
                  {
                    "$ref": "8"
                  },
                  {
                    "$ref": "8"
                  }
                ]
              },
              "subBlocks": [
                {
                  "$ref": "7"
                },
                {
                  "$ref": "7"
                }
              ]
            },
            "MaintainenceCharges": [
              {
                "$id": "10",
                "Id": 1,
                "SubBlockId": 1,
                "ApplyingDate": "2025-10-27T15:50:29.3965227-05:00",
                "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
                "CreatedBy": "sample string 2",
                "Description": "sample string 3",
                "GapsOfMonth": 1,
                "Type": 1,
                "Amount": 1,
                "ExpirationDate": "2025-10-27T15:50:29.3965227-05:00",
                "subBlock": {
                  "$ref": "7"
                }
              },
              {
                "$ref": "10"
              }
            ],
            "Units": [
              {
                "$ref": "6"
              },
              {
                "$ref": "6"
              }
            ]
          }
        },
        "Payments": [
          {
            "$id": "11",
            "Id": 1,
            "VendorId": 1,
            "ScheduleId": 1,
            "DocCode": "sample string 2",
            "CustomDocCode": "sample string 3",
            "Amount": 4,
            "ExpenseCategory": "sample string 5",
            "PaymentType": "sample string 6",
            "CreatedBy": "sample string 7",
            "Description": "sample string 8",
            "Title": "sample string 9",
            "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
            "PaymentDate": "2025-10-27T15:50:29.3965227-05:00",
            "PaymentMethod": "sample string 10",
            "ScheduleBooking": {
              "$ref": "3"
            },
            "Vendor": {
              "$id": "12",
              "Id": 1,
              "Name": "sample string 2",
              "FatherName": "sample string 3",
              "Cnic": "sample string 4",
              "MobileNo": "sample string 5",
              "OfficeNo": "sample string 6",
              "Email": "sample string 7",
              "CreatedBy": 8,
              "CreatedDate": "2025-10-27T15:50:29.3965227-05:00",
              "Payments": [
                {
                  "$ref": "11"
                },
                {
                  "$ref": "11"
                }
              ]
            }
          },
          {
            "$ref": "11"
          }
        ]
      }
    },
    {
      "$ref": "2"
    }
  ],
  "Receipts": [
    {
      "$ref": "5"
    },
    {
      "$ref": "5"
    }
  ],
  "ImageUploaders": [
    {
      "$id": "13",
      "CustomerId": 1,
      "ImageId": "sample string 1",
      "Path": "sample string 2",
      "Remarks": "sample string 3",
      "ImageFormat": "sample string 4",
      "Id": 5,
      "Customer": {
        "$ref": "1"
      }
    },
    {
      "$ref": "13"
    }
  ]
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'PMS_WEBAPI_UPDATED.ImageUploader' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'PMS_WEBAPI_UPDATED.ImageUploader' contains cycles and cannot be serialized if reference tracking is disabled.