Data Models
This section details the various data structures and objects used throughout the MSDN API. Understanding these models is crucial for correctly interacting with the API, whether you are sending requests or interpreting responses.
User Profile
Represents a user's profile information.
Field | Type | Description | Required |
---|---|---|---|
userId |
String | Unique identifier for the user. | Yes |
username |
String | The user's chosen username. | Yes |
email |
String | The user's registered email address. | Yes |
firstName |
String | The user's first name. | No |
lastName |
String | The user's last name. | No |
createdAt |
DateTime | Timestamp when the user account was created. | Yes |
updatedAt |
DateTime | Timestamp when the user account was last updated. | Yes |
isActive |
Boolean | Indicates if the user account is currently active. | Yes |
Product Information
Represents a product available through the MSDN platform.
Field | Type | Description | Required |
---|---|---|---|
productId |
String | Unique identifier for the product. | Yes |
name |
String | The name of the product. | Yes |
description |
String | A detailed description of the product. | No |
price |
Number | The current price of the product. | Yes |
currency |
String | The currency of the price (e.g., "USD", "EUR"). | Yes |
category |
String | The category the product belongs to. | Yes |
imageUrl |
URL | URL to an image of the product. | No |
stockQuantity |
Integer | The number of units currently in stock. | Yes |
Order Details
Represents a customer's order.
Field | Type | Description | Required |
---|---|---|---|
orderId |
String | Unique identifier for the order. | Yes |
userId |
String | The ID of the user who placed the order. | Yes |
orderDate |
DateTime | The date and time the order was placed. | Yes |
status |
String | The current status of the order (e.g., "Pending", "Shipped", "Delivered", "Cancelled"). | Yes |
totalAmount |
Number | The total amount of the order. | Yes |
currency |
String | The currency of the total amount. | Yes |
items |
Array of OrderItem |
A list of items included in the order. | Yes |
Order Item
Represents a single item within an order.
Field | Type | Description | Required |
---|---|---|---|
productId |
String | The ID of the product ordered. | Yes |
quantity |
Integer | The number of units of this product ordered. | Yes |
pricePerUnit |
Number | The price of a single unit of this product at the time of order. | Yes |
itemName |
String | The name of the product. | Yes |
Common Data Types
- String: Represents textual data.
- Number: Represents numerical data, typically including integers and floating-point numbers.
- Integer: Represents whole numbers.
- Boolean: Represents a true or false value.
- DateTime: Represents a specific point in time, usually in ISO 8601 format (e.g.,
2023-10-27T10:00:00Z
). - URL: Represents a Uniform Resource Locator.
- Array of [Type]: Represents an ordered collection of elements of a specified type.
Refer to specific endpoint documentation for how these models are used in requests and responses.