| POST | /cmd/users/profile |
|---|
package dtos
import (
"time"
)
type Name struct {
First *string `json:"first,omitempty"`
Last *string `json:"last,omitempty"`
Full *string `json:"full,omitempty"`
}
type Ref struct {
Id string `json:"id"`
Val string `json:"val"`
}
type GPSCoordinates struct {
Lat float64 `json:"lat,omitempty"`
Lng float64 `json:"lng,omitempty"`
}
type Address struct {
Street string `json:"street"`
City string `json:"city"`
State string `json:"state"`
PostalCode string `json:"postalCode"`
Country Ref `json:"country"`
Gps GPSCoordinates `json:"gps"`
Data RecordDictionary[string, string] `json:"data"`
}
type ContactInfo struct {
Phone *string `json:"phone,omitempty"`
Email *string `json:"email,omitempty"`
}
type Person struct {
Name *Name `json:"name,omitempty"`
Address *Address `json:"address,omitempty"`
DateOfBirth *time.Time `json:"dateOfBirth,omitempty"`
ContactInfo *ContactInfo `json:"contactInfo,omitempty"`
}
type BettorWalletProfile struct {
Id *string `json:"id,omitempty"`
Username *string `json:"username,omitempty"`
Person *Person `json:"person,omitempty"`
Data *RecordDictionary[string, string] `json:"data,omitempty"`
}
type StoreUserProfile struct {
Profile *BettorWalletProfile `json:"profile,omitempty"`
}
type RecordDictionary[TKey any, TVal any] map[TKey]TVal
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /cmd/users/profile HTTP/1.1
Host: api.bettor.webhop.biz
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"profile":{"id":"String","username":"String","person":{"name":{"first":"String","last":"String","full":"String String"},"address":{"street":"String","city":"String","state":"String","postalCode":"String","country":{"id":"String","val":"String"},"gps":{"lat":0,"lng":0},"data":{"String":"String"}},"dateOfBirth":"0001-01-01T00:00:00.0000000Z","contactInfo":{"phone":"String","email":"String"}},"data":{"String":"String"}}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}